Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Tue, 28 Sep 2004 15:48:12 -0400 (EDT)
From: Igor Pechtchanski <pechtcha@cs.nyu.edu>
Reply-To: cygwin@cygwin.com
To: cygwin@cygwin.com
Subject: Re: "which" command does not expand "~" in path (base-files update needed)
In-Reply-To: <20040928194740.GT26145@trixie.casa.cgf.cx>
Message-ID: <Pine.GSO.4.61.0409281546390.4220@slinky.cs.nyu.edu>
References: <NUTMEGCtgx8VUkRacUt0000013f@NUTMEG.CAM.ARTIMI.COM> <NUTMEGyMp69YDqSkcJs00000140@NUTMEG.CAM.ARTIMI.COM> <20040928194018.GR26145@trixie.casa.cgf.cx> <Pine.CYG.4.58.0409281439000.2292@fordpc.vss.fsi.com> <20040928194740.GT26145@trixie.casa.cgf.cx>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Scanned-By: MIMEDefang 2.39

On Tue, 28 Sep 2004, Christopher Faylor wrote:

> On Tue, Sep 28, 2004 at 02:43:38PM -0500, Brian Ford wrote:
> >On Tue, 28 Sep 2004, Christopher Faylor wrote:
> >
> >> Of course there is a simple solution: lose the quotes.  AFAICT, they
> >> aren't needed.
> >
> >IMHO, they are.  Windows programs often put directories containing spaces
> >in the system path.  ex:
> >
> >/cygdrive/c/Program Files/ATI Technologies/ATI Control Panel
>
> Try the above with a PATH that contains spaces.  Spaces are preserved.

They are in this case, but won't be in general.  E.g., try

PATH=~/bin:$PATH which ls

vs.

PATH=~/bin:"$PATH" which ls

	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

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

