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
Date: Fri, 9 Aug 2002 14:17:48 -0400
From: Jon LaBadie <jcyg@jgcomp.com>
To: cygwin@cygwin.com
Subject: Re: cygwin and long filenames with spaces
Message-ID: <20020809181748.GA26049@butch.jgcomp.com>
Mail-Followup-To: Jon LaBadie <jcyg@jgcomp.com>, cygwin@cygwin.com
References: <Pine.GSO.4.44.0208091209400.20358-100000@slinky.cs.nyu.edu> <MPG.17bdf8ff52c958ea989697@news.gmane.org> <Pine.GSO.4.44.0208091209400.20358-100000@slinky.cs.nyu.edu> <5.1.0.14.2.20020809102600.02e7ee98@pop3.cris.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5.1.0.14.2.20020809102600.02e7ee98@pop3.cris.com>
User-Agent: Mutt/1.3.28i

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/

