Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Fri, 9 Aug 2002 13:38:18 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com Subject: Re: cygwin and long filenames with spaces In-Reply-To: <20020809171718.GA25546@butch.jgcomp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 9 Aug 2002, Jon LaBadie wrote: > On Fri, Aug 09, 2002 at 12:11:45PM -0400, Igor Pechtchanski wrote: > > On Fri, 9 Aug 2002, Chris Game wrote: > > > > > In an earlier post, Randall R Schulz said... > > > > > > > It sounds like you have an alias or shell procedure standing in for the > > > > built-in "cd" command. > > > > > > Ah! That vaguely rings a bell. > > > > > > Yes, long ago in the days of beta 19.whatever I must have set cd up > > > as a function including a 'pwd' line. The response is: > > > > > > cd is a function > > > cd () > > > { > > > builtin cd $1; > > > pwd > > > } > > > cd is a shell builtin > > > > > > So - I need to modify the 'builtin ...' line. > > > > > > > > > > > > Well, 'builtin cd "$*";' works! No idea if that's the correct > > > modification though. > > > > > > Thanks for all the help - what a group! > > > > I'd make that 'builtin cd "$@"' instead. Not sure if it matters in the > > case of cd, but this would make it treat quoted parameters properly... > > Good practice, anyway. :-) > > Good practice for most scripts. But it would make the two strings > separate quoted arguments when the objective is to make them one. No, the objective was to maintain the quoting of the arguments. In this particular case, a minimal change would have been 'builtin cd "$1"', but that would not have worked for commands like 'cd -P "/cygdrive/c/Program Files"', because it would ignore everything but the first argument. The current modification ('builtin cd "$*"') won't work with flags either, but for a different reason - it'll try to interpret the whole sequence as a flag. So, to keep the quotes where they belong without inserting extra ones, "$@" is the way to go. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! It took the computational power of three Commodore 64s to fly to the moon. It takes a 486 to run Windows 95. Something is wrong here. -- SC sig file -- 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/