X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org X-Authority-Analysis: v=1.0 c=1 a=c5Bq8qUBWEkA:10 a=6rbcA-A28HYA:10 a=UUr5t_DyDnhbJ4JQTEEA:9 a=Rj5mYSOz9Ca987eHludUTcLcaRUA:4 a=50e4U0PicR4A:10 From: "David Olmsted" To: Subject: /etc/profile.d/complete.tcsh problem; followup to "Problems starting tcsh when having spaces in username - with fix" Date: Sun, 27 Apr 2008 12:17:51 -0600 Message-ID: <000001c8a893$020833d0$6501a8c0@bluecrownedmotmotn> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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" To: 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/