cygwin and long filenames with spaces

Jon LaBadie jcyg@jgcomp.com
Fri Aug 9 12:01:00 GMT 2002


On Fri, Aug 09, 2002 at 10:30:08AM -0700, Randall R Schulz wrote:
> At 10:17 2002-08-09, Jon LaBadie wrote:
> >On Fri, Aug 09, 2002 at 12:11:45PM -0400, Igor Pechtchanski wrote:
> >> On Fri, 9 Aug 2002, Chris Game wrote:
> >>
> >> > 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.
> 
> 
> Jon,
> 
> Not quite. It means that the number of arguments seen by the built-in "cd" 
> command will be identical to the number of arguments given in the top-level 
> (interactive or scripted) invocation of the "cd" shell function.
> 
> Since the built-in "cd" command takes options (try "help cd"), the "$@" is 
> advisable.
> 
> Usually "$@" is the right way to go, but there could be times when joining 
> multiple arguments into a single string might be called for.

Lost my head thinking the OP wanted to automagically
deal with dirnames containing spaces.

-- 
Jon H. LaBadie                  jcyg@jgcomp.com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

--
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/



More information about the Cygwin mailing list