Re: 'which' command does not expand '~' in path (base-files update needed)

2004-09-29 Thread John Morrison
> cgf wrote: >> Dropping the quotes from the original example will just cause >> everything to work correctly everywhere. >> >> John Morrison, would you mind doing this, please? > > Hi cgf, > > As I said, I wasn't following this thread for a while, so here are the > changes I'll do (I'm also trying

RE: "which" command does not expand "~" in path (base-files update needed)

2004-09-29 Thread Dave Korn
> -Original Message- > From: cygwin-owner On Behalf Of Corinna Vinschen > Sent: 29 September 2004 12:30 > On Sep 29 12:19, Dave Korn wrote: > > > QUOTING > > > [...] > > > Enclosing characters in double quotes preserves the lit- > > > eral value of all characters with

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-29 Thread Corinna Vinschen
On Sep 29 12:19, Dave Korn wrote: > > QUOTING > > [...] > > Enclosing characters in double quotes preserves the lit- > > eral value of all characters within the quotes, with the > > exception of $, `, and \. > > Well, yeh, but, like, y'know, the tilde was _outside

RE: "which" command does not expand "~" in path (base-files update needed)

2004-09-29 Thread Dave Korn
> -Original Message- > From: cygwin-owner On Behalf Of Corinna Vinschen > Sent: 29 September 2004 09:55 > On Sep 28 15:40, Christopher Faylor wrote: > > On Tue, Sep 28, 2004 at 06:49:44PM +0100, Dave Korn wrote: > > > Wonder if this is a real bug then, or if I've misread > the shell pars

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-29 Thread Corinna Vinschen
On Sep 28 15:40, Christopher Faylor wrote: > On Tue, Sep 28, 2004 at 06:49:44PM +0100, Dave Korn wrote: > > Wonder if this is a real bug then, or if I've misread the shell parsing rules? > >They are a bit ridiculously complicated and full of exceptions and special > >cases. > > It seems like

Re: 'which' command does not expand '~' in path (base-files update needed)

2004-09-29 Thread John Morrison
cgf wrote: > Dropping the quotes from the original example will just cause > everything to work correctly everywhere. > > John Morrison, would you mind doing this, please? Hi cgf, As I said, I wasn't following this thread for a while, so here are the changes I'll do (I'm also trying to clean the

Re: 'which' command does not expand '~' in path (base-files update needed)

2004-09-28 Thread Errol Smith
At 06:40 AM 29/09/2004, John Morrison wrote: Just my two penny worth; I've just pulled, ./configure[d] and make[d] the GNU which application (it built OOTB). It correctly checks ~/bin. See my original post (http://www.cygwin.com/ml/cygwin/2004-09/msg01383.html) Would it be worth considering using

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Errol Smith
At 05:43 AM 29/09/2004, Brian Ford wrote: > export PATH=~/bin:$PATH How 'bout using a temp, or just plain $HOME as suggested before? Good question, I'd like to know what was wrong with my (first ever cygwin) patch! ;-) Seriously though, is there any advantage to using ~ over $HOME? the bash man

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Errol Smith
At 03:27 AM 29/09/2004, Igor wrote: > Agreed, but aren't we talking about .bash_profile here ;-)? Ugh. Yes. FWIW, /etc/profile does use '~' (in lines 191-195), so the above point is valid anyway (though by chance, rather than by intention)... I notice that it's also full of carriage returns! :-)

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Errol Smith
At 01:31 AM 29/09/2004, Christopher Faylor wrote: > # Set MANPATH so it includes users' private man if it exists > # if [ -d ~/man ]; then >-# MANPATH="~/man:${MANPATH}" >+# MANPATH="${HOME}/man:${MANPATH}" > # fi > > # Set INFOPATH so it includes users' private info if it exists > # if [ -d ~/

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Igor Pechtchanski
On Tue, 28 Sep 2004, Christopher Faylor wrote: > On Tue, Sep 28, 2004 at 03:48:12PM -0400, Igor Pechtchanski wrote: > >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: > >> > > >

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Christopher Faylor
On Tue, Sep 28, 2004 at 03:48:12PM -0400, Igor Pechtchanski wrote: >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. A

RE: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Hannu E K Nevalainen
you wrote: > 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. W

Re: 'which' command does not expand '~' in path (base-files update needed)

2004-09-28 Thread John Morrison
Sorry, I've not been following this thread (until the brackets appeared in the subject!). Just my two penny worth; I've just pulled, ./configure[d] and make[d] the GNU which application (it built OOTB). It correctly checks ~/bin. Would it be worth considering using this version of which? What a

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Brian Ford
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 ofte

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Igor Pechtchanski
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

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Christopher Faylor
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.

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Brian Ford
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

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Christopher Faylor
On Tue, Sep 28, 2004 at 06:49:44PM +0100, Dave Korn wrote: > Wonder if this is a real bug then, or if I've misread the shell parsing rules? >They are a bit ridiculously complicated and full of exceptions and special >cases. It seems like it's a bug. Of course there is a simple solution: lose

RE: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Dave Korn
> -Original Message- > From: cygwin-owner On Behalf Of Dave Korn > Sent: 28 September 2004 18:35 > Why isn't it expanded by bash's tilde substitution at the > time the 'export' > command line is parsed then? That's sooo wrong. Oh wow. > Guess what: it depends > whether the *other* p

RE: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Dave Korn
> -Original Message- > From: cygwin-owner On Behalf Of Igor Pechtchanski > Sent: 28 September 2004 18:15 > > You can use ~ here. Just don't quote it. It shouldn't be quoted. > > > > export PATH=~/bin:"${PATH}" > > I'm sorry, but this isn't true, even for bash. It still > leaves the "

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Igor Pechtchanski
On Tue, 28 Sep 2004, Brian Ford wrote: > On Tue, 28 Sep 2004, Igor Pechtchanski wrote: > > > Oh, and your suggestion definitely won't work for sh, which also uses > > /etc/profile. IMO, any shell-specific code in /etc/profile should go > > into the shell-specific section of /etc/profile, and the

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Brian Ford
On Tue, 28 Sep 2004, Igor Pechtchanski wrote: > Oh, and your suggestion definitely won't work for sh, which also uses > /etc/profile. IMO, any shell-specific code in /etc/profile should go > into the shell-specific section of /etc/profile, and the rest of it > should be Bourne shell compatible.

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Igor Pechtchanski
On Tue, 28 Sep 2004, Christopher Faylor wrote: > On Wed, Sep 29, 2004 at 01:08:42AM +1000, Errol Smith wrote: > >At 09:23 PM 26/09/2004, "Hannu E K Nevalainen" wrote: > >>FWIW; 'man bash' has a section on Tilde Expansion - I take it as; bash does > >>this expansion for you, not which.exe -> use $H

Re: "which" command does not expand "~" in path (base-files update needed)

2004-09-28 Thread Christopher Faylor
On Wed, Sep 29, 2004 at 01:08:42AM +1000, Errol Smith wrote: >At 09:23 PM 26/09/2004, "Hannu E K Nevalainen" wrote: >>FWIW; 'man bash' has a section on Tilde Expansion - I take it as; bash does >>this expansion for you, not which.exe -> use $HOME when not typing at the >>prompt. > > This is all fin