This is the mail archive of the
cygwin
mailing list for the Cygwin project.
/etc/profile.d/complete.tcsh problem; followup to "Problems starting tcsh when having spaces in username - with fix"
- From: "David Olmsted" <linked_puffbird at comcast dot net>
- To: <cygwin at cygwin dot com>
- Date: Sun, 27 Apr 2008 12:17:51 -0600
- Subject: /etc/profile.d/complete.tcsh problem; followup to "Problems starting tcsh when having spaces in username - with fix"
Hi,
In the current /etc/profile.d/complete.tcsh file a portion of the fix
suggested below
by Anders Ripa has been applied, but another critical part has not. The
last three fixes
with explicit "$HOME/" have been quoted, but the first fix has not been
applied. Currently
I show the following as the needed patch:
> diff -c complete.tcsh complete.tcsh.orig
*** complete.tcsh Sun Apr 27 12:08:25 2008
--- complete.tcsh.orig Thu Apr 24 17:02:02 2008
***************
*** 39,45 ****
set noglob
if ( ! $?hosts ) set hosts
foreach f ("$HOME/.hosts" /usr/local/etc/csh.hosts "$HOME/.rhosts"
/etc/hosts.equiv)
! if ( -r "$f" ) then
set hosts = ($hosts `grep -v "+" $f | grep -E -v "^#" | tr -s "
" "" | cut -f 1`)
endif
end
--- 39,45 ----
set noglob
if ( ! $?hosts ) set hosts
foreach f ("$HOME/.hosts" /usr/local/etc/csh.hosts "$HOME/.rhosts"
/etc/hosts.equiv)
! if ( -r $f ) then
set hosts = ($hosts `grep -v "+" $f | grep -E -v "^#" | tr -s "
" "" | cut -f 1`)
endif
end
Thank you for your assistance
David Olmsted
================================== A copy of the original email is appended
below.
Problems starting tcsh when having spaces in username - with fix
From: "Anders Ripa" <anders dot ripa at mailbox dot swipnet dot se>
To: <cygwin at cygwin dot com>
Date: Fri, 21 Feb 2003 20:33:39 +0100
Subject: Problems starting tcsh when having spaces in username - with fix
----------------------------------------------------------------------------
----
I get the message :
================================
Anders Ripa at RIPA3 ~
$ tcsh
if: Expression Syntax.
>
================================
When I try to run the tcsh command on my Windows XP Home machine
The problem as far as I have been able to trace it is that I have set up my
user account with the name "Anders Ripa", e.g. it contains a space.
I have been able to trace the problem to the file:
/etc/profile.d/complete.tcsh
If I modify the file to use quotes in 4 places, then tcsh starts correctly.
================================
$ diff complete.tcsh fixed_complete.tcsh
2c2
< # $Id: complete.tcsh,v 1.1 2003/02/08 11:00:25 corinna Exp $
---
> # $Id: complete.tcsh,v 1.1 2001/12/21 12:22:24 corinna Exp $
26c26
< if ( -r $f ) then
---
> if ( -r "$f" ) then
30c30
< if ( -r $HOME/.netrc ) then
---
> if ( -r "$HOME/.netrc" ) then
236c236
< if ( -f $HOME/.mh_profile && -x "`which folders`" ) then
---
> if ( -f "$HOME/.mh_profile" && -x "`which folders`" ) then
643c643
< if (-r $HOME/.mailrc) then
---
> if (-r "$HOME/.mailrc") then
================================
Currently I have to reapply the fix when tcsh is updated.
I hope this can be of some help to other cygwin users.
Best regards
Anders Ripa
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/