Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <027f01c2f948$aa7c0050$1700a8c0@RIPA3>
From: "Anders Ripa" <anders.ripa@mailbox.swipnet.se>
To: <cygwin@cygwin.com>
References: <se8ac592.005@KAKARI.KAKARI.COM>
Subject: Re: complete.tcsh doesn't handle spaces in $HOME
Date: Wed, 2 Apr 2003 20:50:00 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h32KdEg25933

If you search this list for subject "Problems starting tcsh when having spaces in username - with fix"
you wil find my diff for fixing this file.
I haven't recieved any comments so far.
It would be nice to have this in the normal sources.

Best regards
Anders Ripa

----- Original Message ----- 
From: "Aaron Humphrey" <HumphreyA@Kakari.com>
To: <cygwin@cygwin.com>
Sent: Wednesday, April 02, 2003 8:12 PM
Subject: complete.tcsh doesn't handle spaces in $HOME


I have been using Cygwin on a Windows 2000 computer running on a Novell network; my local user name is "Aaron Humphrey", and so my home directory is "/home/Aaron Humphrey".  I've been trying to use tcsh, but it would abort out of the startup scripts, saying "If: expression syntax", leaving me with an empty prompt and a number of other problems.  The latest upgrade of tcsh didn't fix the problem.

I finally traced the problem to complete.tcsh, and eventually determined that it was running into problems whenever it had a condition of the form

if (-f $HOME/filename )

because this was expanding to

if (-f /home/Aaron Humphrey/filename )

and the space made it invalid.

An easy workaround for this problem is just to wrap all of the $HOME/filename conditions in double quotes, which would probably be a good idea in a future release of tcsh.  Once I did this in complete.tcsh, tcsh started up just fine.


--
--Aaron Humphrey
Programmer, Kakari Systems Ltd. <http://www.kakari.com>



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

