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 scripts up as much as
> possible).  I'll not be able to upload a version until tonight though, I
> don't have the code base with me...
>
> /etc/profile:
> remove quotes from lines 23, 36 and 29
> brace ${...} all variables
> change ~ to ${HOME} on lines 193, 195 and 197
>
> /etc/skel/.bash_profile (via default versions)
> remove quotes from lines 13, 18 and 23
> change ~ to ${HOME} on lines 7, 8, 12, 13, 17, 18, 22 and 23
>
> If people didn't remove these files prior to the last upgrade they must
> remove them before this upgrade otherwise they will not be overwritten.

The above changes have been done...





Are there any other changes needed?

J.


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



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 within the quotes,  with  the
> > >   exception  of  $, `, and \.
> > 
> >   Well, yeh, but, like, y'know, the tilde was _outside_ the 
> quotes.  YMKMC! :)
> 
> Oh, well... *blush*
> 
> Corinna


  I spelled the acronym wrong!  I must have needed more coffee too!


cheers, 
  DaveK
-- 
Can't think of a witty .sigline today


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



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_ the quotes.  YMKMC! :)

Oh, well... *blush*

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  mailto:[EMAIL PROTECTED]
Red Hat, Inc.

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



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 parsing rules?
> > >They are a bit ridiculously complicated and full of 
> exceptions and special
> > >cases.
> > 
> > It seems like it's a bug.
> 
> AFAICT, bash behaves according to its man page:
> 
>   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_ the quotes.  YMKMC! :)


cheers, 
  DaveK
-- 
Can't think of a witty .sigline today


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



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 it's a bug.

AFAICT, bash behaves according to its man page:

  QUOTING
  [...]
  Enclosing  characters  in double quotes preserves the lit­
  eral value of all characters within the quotes,  with  the
  exception  of  $, `, and \.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  mailto:[EMAIL PROTECTED]
Red Hat, Inc.

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



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 scripts up as much as
possible).  I'll not be able to upload a version until tonight though, I
don't have the code base with me...

/etc/profile:
remove quotes from lines 23, 36 and 29
brace ${...} all variables
change ~ to ${HOME} on lines 193, 195 and 197

/etc/skel/.bash_profile (via default versions)
remove quotes from lines 13, 18 and 23
change ~ to ${HOME} on lines 7, 8, 12, 13, 17, 18, 22 and 23

If people didn't remove these files prior to the last upgrade they must
remove them before this upgrade otherwise they will not be overwritten.

Is there any other changes needed?

J.


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



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 this version of which?  What are the
advantages of the Cygwin version?
I don't know (but using it would fix the other half of the problem..) - as 
for advantages it's (probably) simpler, smaller, faster.
(btw, I stated the cygwin which.exe was 5k, it's actually about 11k - I was 
testing the previous build to see if there was any difference which there 
wasn't).

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


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 page states that ~ maps to $HOME anyway:
"If this login name is the null string, the tilde is replaced  with  the 
value  of  the shell parameter HOME.  If HOME is unset, the home directory 
of the user executing the shell 
is  substituted  instead.   Other-wise,  the  tilde-prefix is replaced with 
the home directory associated with the specified login name."

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


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! :-)
Errol
(if sh does not perform tilde expansion, shouldn't /etc/profile be modified 
so it doesn't use them?)

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


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 ~/info ]; then
>-#   INFOPATH="~/info:${INFOPATH}"
>+#   INFOPATH="${HOME}/info:${INFOPATH}"
> # fi
I don't know if man or info deal properly with ~ but neither of the
above should cause a problem for which.
 I realise they don't affect "which", but I was assuming they might affect 
man and/or info. See Igors message 
(http://www.cygwin.com/ml/cygwin/2004-09/msg01565.html) which seems to 
confirm my suspicions. Also, it was simply for consistency (no point doing 
an assignment one way on one line & another way on another without a good 
reason).

E
  

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


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:
> >> >
> >> >> 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
>
> This works fine no matter where I put the directory with spaces in it.
>
> Regardless, I don't see any reason to turn this thread into an
> exposition on what does or doesn't work with variables that contain
> spaces.  Dropping the quotes from the original example will just cause
> everything to work correctly everywhere.
>
> John Morrison, would you mind doing this, please?

I stand corrected.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,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/



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

This works fine no matter where I put the directory with spaces in it.

Regardless, I don't see any reason to turn this thread into an
exposition on what does or doesn't work with variables that contain
spaces.  Dropping the quotes from the original example will just cause
everything to work correctly everywhere.

John Morrison, would you mind doing this, please?

cgf

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



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.  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. 
> 
> Ugh..., you're right.  I'm sure I've been bitten by something very
> similar to this before though (scratches head)?

Spaces in arguments (e.g. filenames) always bites, eventually.
/giggle/ There is no escape ;-)


/Hannu E K Nevalainen, B.Sc. EE Microcomputer systems--72-->

** mailing list preference; please keep replies on list **

-- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); --
--END OF MESSAGE--

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



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 are the
advantages of the Cygwin version?

J.



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



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

Ugh..., you're right.  I'm sure I've been bitten by something very similar
to this before though (scratches head)?

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...

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



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 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/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,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/



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.  ex:
>
>/cygdrive/c/Program Files/ATI Technologies/ATI Control Panel

Try the above with a PATH that contains spaces.  Spaces are preserved.

cgf

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



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

> export PATH=~/bin:$PATH

How 'bout using a temp, or just plain $HOME as suggested before?

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...

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



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 the quotes.  AFAICT, they
aren't needed.

export PATH=~/bin:$PATH

cgf

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



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* part of the assignment is quoted or not:

  Interesting.  From "info bash", node: "Shell Parameters":

"   A variable may be assigned to by a statement of the form
 NAME=[VALUE]

If VALUE is not given, the variable is assigned the null string.  All
VALUEs undergo tilde expansion, parameter and variable expansion,
command substitution, arithmetic expansion, and quote removal [ ... ]"

  And from node "Tilde Expansion":

"  If a word begins with an unquoted tilde character (`~'), all of the
characters up to the first unquoted slash (or all characters, if there
is no unquoted slash) are considered a TILDE-PREFIX.  If none of the
characters in the tilde-prefix are quoted, the characters in the
tilde-prefix following the tilde are treated as a possible LOGIN NAME. "

  So, given that words are separated by metachars, then the first word in the
NAME=VALUE construct 

export FOO=~/bin:"${PATH}"

is the full string

~/bin:"${PATH}"

and therefore the presence of quotes later in the char shouldn't prevent bash
parsing the beginning of the word from the unquoted tilde char to the unquoted
slash immediately following it as a tilde-prefix, none of the chars in which are
quoted.

  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.

cheers, 
  DaveK
-- 
Can't think of a witty .sigline today


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



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 "~" in
> the PATH, which confuses "which" (although "type", being a 
> bash builtin, recognizes and expands it).

  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* part of the assignment is quoted or not:

[EMAIL PROTECTED] ~> echo ${PATH}
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/win/c/WINDOWS/system32:/win/c/WINDO
WS:/win/c/WINDOWS/System32/Wbem
[EMAIL PROTECTED] ~> export FOO=~/bin:"${PATH}"
[EMAIL PROTECTED] ~> echo "${FOO}"
~/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/win/c/WINDOWS/system32:/win/c
/WINDOWS:/win/c/WINDOWS/System32/Wbem
[EMAIL PROTECTED] ~> echo ${FOO}
~/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/win/c/WINDOWS/system32:/win/c
/WINDOWS:/win/c/WINDOWS/System32/Wbem
[EMAIL PROTECTED] ~> echo $FOO
~/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/win/c/WINDOWS/system32:/win/c
/WINDOWS:/win/c/WINDOWS/System32/Wbem
[EMAIL PROTECTED] ~> export FOO=~/bin:${PATH}
[EMAIL PROTECTED] ~> echo "${FOO}"
/home/dk/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/win/c/WINDOWS/system32
:/win/c/WINDOWS:/win/c/WINDOWS/System32/Wbem
[EMAIL PROTECTED] ~> echo ${FOO}
/home/dk/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/win/c/WINDOWS/system32
:/win/c/WINDOWS:/win/c/WINDOWS/System32/Wbem
[EMAIL PROTECTED] ~> echo $FOO
/home/dk/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/win/c/WINDOWS/system32
:/win/c/WINDOWS:/win/c/WINDOWS/System32/Wbem
[EMAIL PROTECTED] ~>

<  The "~" is not expanded when used in a
> variable assignment (whether quoted or unquoted), even if 
> 'echo' expands it.  

  I disagree.  The ~ is not expanded when quotation is used, even if the ~ itself
is not quoted.  The expansion seems not to be being performed by echo.


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

  Given that we don't care about the home dir of any but the currently-logged in
user, there's no need to go to such lengths of grepping /etc/passwd: wouldn't the
most generic, cross platform thing to be to take advantage of the behaviour of cd
?

[EMAIL PROTECTED] ~> echo "${FOO}"
/home/dk/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/win/c/WINDOWS/system32
:/win/c/WINDOWS:/win/c/WINDOWS/System32/Wbem
[EMAIL PROTECTED] ~> echo ${FOO}
/home/dk/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/win/c/WINDOWS/system32
:/win/c/WINDOWS:/win/c/WINDOWS/System32/Wbem
[EMAIL PROTECTED] ~> echo $FOO
/home/dk/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/win/c/WINDOWS/system32
:/win/c/WINDOWS:/win/c/WINDOWS/System32/Wbem
[EMAIL PROTECTED] ~>

cheers, 
  DaveK
-- 
Can't think of a witty .sigline today


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



RE: "which" command does not expand "~" in path

2004-09-28 Thread Brian Ford
On Tue, 28 Sep 2004, Igor Pechtchanski wrote:

> On Tue, 28 Sep 2004, Brian Ford wrote:
> > On Wed, 29 Sep 2004, Errol Smith wrote:
> > > This is all fine & good, but it doesn't change the fact that the
> > > cygwin-supplied "which" does NOT work with the cygwin-supplied
> > > ".bash_profile" (when you use a personal ~/bin directory.).
> >
> > I'm just curious.  This is from the Solaris 8 man page for which:
> >
> > DESCRIPTION
> > [snip]
> > Both aliases and path are taken from the user's .cshrc file
> > [snip]
> > SEE ALSO
> > csh(1)
> > [snip]
> > So, is this a Solaris non-compliance issue, or is which not supposed to be
> > valid under any non-csh derrived shell?
>
> "which" is also a csh builtin.

The only reference to which in csh(1) is to which(1).

> I imagine that the apropos database on Solaris contains the "csh(1)"
> match for "which" before the "which(1)" entry, so "man which" finds it
> first.  Try "man -a which"... :-)

Nope.  That quote comes from which(1), and man -a which doesn't turn
anything else up.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...

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



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 rest of it
> > should be Bourne shell compatible.
>
> 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)...
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,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/



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.

Agreed, but aren't we talking about .bash_profile here ;-)?

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...

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



RE: "which" command does not expand "~" in path

2004-09-28 Thread Igor Pechtchanski
On Tue, 28 Sep 2004, Brian Ford wrote:

> On Wed, 29 Sep 2004, Errol Smith wrote:
>
> > This is all fine & good, but it doesn't change the fact that the
> > cygwin-supplied "which" does NOT work with the cygwin-supplied
> > ".bash_profile" (when you use a personal ~/bin directory.).
>
> I'm just curious.  This is from the Solaris 8 man page for which:
>
> DESCRIPTION
> [snip]
> Both aliases and path are taken from the user's .cshrc file
> [snip]
> SEE ALSO
> csh(1)
> [snip]
> So, is this a Solaris non-compliance issue, or is which not supposed to be
> valid under any non-csh derrived shell?

"which" is also a csh builtin.  I imagine that the apropos database on
Solaris contains the "csh(1)" match for "which" before the "which(1)"
entry, so "man which" finds it first.  Try "man -a which"... :-)
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,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/



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 $HOME when not typing at the
> >>prompt.
> >
> > This is all fine & good, but it doesn't change the fact that the
> >cygwin-supplied "which" does NOT work with the cygwin-supplied
> >".bash_profile" (when you use a personal ~/bin directory.).
> > Here is a simple patch which fixes half the problem (the ".bash_profile"
> >placing a raw ~ in the path):
> >
> >--- /etc/skel/.bash_profile 2004-05-15 21:40:04.0 +1000
> >+++ .bash_profile   2004-09-29 00:21:50.0 +1000
> >@@ -10,16 +10,16 @@
> >
> > # Set PATH so it includes user's private bin if it exists
> > # if [ -d ~/bin ] ; then
> >-#   PATH="~/bin:${PATH}"
> >+#   PATH="${HOME}/bin:${PATH}"
> > # fi
>
> 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 "~" in
the PATH, which confuses "which" (although "type", being a bash builtin,
recognizes and expands it).  The "~" is not expanded when used in a
variable assignment (whether quoted or unquoted), even if 'echo' expands
it.  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.

> > # 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 ~/info ]; then
> >-#   INFOPATH="~/info:${INFOPATH}"
> >+#   INFOPATH="${HOME}/info:${INFOPATH}"
> > # fi
>
> I don't know if man or info deal properly with ~ but neither of the
> above should cause a problem for which.

Neither man nor info does any ~-expansion, AFAICS.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,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/



RE: "which" command does not expand "~" in path

2004-09-28 Thread Brian Ford
On Wed, 29 Sep 2004, Errol Smith wrote:

> This is all fine & good, but it doesn't change the fact that the
> cygwin-supplied "which" does NOT work with the cygwin-supplied
> ".bash_profile" (when you use a personal ~/bin directory.).

I'm just curious.  This is from the Solaris 8 man page for which:

DESCRIPTION
[snip]
Both aliases and path are taken from the user's .cshrc file
[snip]
SEE ALSO
csh(1)
[snip]
BUGS
 Only aliases and paths from  ~/.cshrc  are  used;  importing
 from  the current environment is not attempted. Must be exe-
 cuted by csh(1), since only csh knows about aliases.

 To compensate for ~/.cshrc files  in  which  aliases  depend
 upon the prompt variable being set, which sets this variable
 to NULL. If the ~/.cshrc  produces  output  or  prompts  for
 input  when  prompt  is  set, which may produce some strange
 results.

So, is this a Solaris non-compliance issue, or is which not supposed to be
valid under any non-csh derrived shell?

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...

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



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 fine & good, but it doesn't change the fact that the 
>cygwin-supplied "which" does NOT work with the cygwin-supplied 
>".bash_profile" (when you use a personal ~/bin directory.).
> Here is a simple patch which fixes half the problem (the ".bash_profile" 
>placing a raw ~ in the path):
>
>--- /etc/skel/.bash_profile 2004-05-15 21:40:04.0 +1000
>+++ .bash_profile   2004-09-29 00:21:50.0 +1000
>@@ -10,16 +10,16 @@
>
> # Set PATH so it includes user's private bin if it exists
> # if [ -d ~/bin ] ; then
>-#   PATH="~/bin:${PATH}"
>+#   PATH="${HOME}/bin:${PATH}"
> # fi

You can use ~ here.  Just don't quote it.  It shouldn't be quoted.

export PATH=~/bin:"${PATH}"

> # 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 ~/info ]; then
>-#   INFOPATH="~/info:${INFOPATH}"
>+#   INFOPATH="${HOME}/info:${INFOPATH}"
> # fi

I don't know if man or info deal properly with ~ but neither of the
above should cause a problem for which.

cgf

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



RE: "which" command does not expand "~" in path

2004-09-28 Thread Errol Smith
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 fine & good, but it doesn't change the fact that the 
cygwin-supplied "which" does NOT work with the cygwin-supplied 
".bash_profile" (when you use a personal ~/bin directory.).
 Here is a simple patch which fixes half the problem (the ".bash_profile" 
placing a raw ~ in the path):

--- /etc/skel/.bash_profile 2004-05-15 21:40:04.0 +1000
+++ .bash_profile   2004-09-29 00:21:50.0 +1000
@@ -10,16 +10,16 @@
 # Set PATH so it includes user's private bin if it exists
 # if [ -d ~/bin ] ; then
-#   PATH="~/bin:${PATH}"
+#   PATH="${HOME}/bin:${PATH}"
 # fi
 # 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 ~/info ]; then
-#   INFOPATH="~/info:${INFOPATH}"
+#   INFOPATH="${HOME}/info:${INFOPATH}"
 # fi

This won't help anyone who expects the cygwin "which" command to be the 
same as the GNU version regarding the tilde character in paths (OK, so 
maybe that would be rare), but it will stop people running into it using 
cygwin's defaults. (I fixed the MAN & INFO paths for consistency).

Regards, Errol
btw, does anyone know why those private paths are commented out by default? 
(security?)

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


RE: "which" command does not expand "~" in path

2004-09-27 Thread Hannu E K Nevalainen
you wrote:

 script). Igor --
>>> 
>>> $ u="Hannu";sed -nre "s/^$u.*:(.*):.*$/\1/p"  
> This works only because "/" is not a valid variable name. :-p

 Ehm.. ;-P  - could that be called a lucky shot?


/Hannu E K Nevalainen, B.Sc. EE Microcomputer systems--72-->

** mailing list preference; please keep replies on list **

-- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); --
--END OF MESSAGE--

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



Re: "which" command does not expand "~" in path

2004-09-26 Thread Sven Köhler
Instead, the shell usually substitutes ~ or ~user.
Look at this the output of these commands:
echo ~
echo "~"
This is probably common knowledge, but I learned last night that sh 
never expands ~.  Under sh, the two lines above yield the same output, 
simply ~.
I can confirm that for cygwin.
The "common knowledge" may be, because the most Linux-systems have sh 
linked to bash. Cygwin seems to have a separate "sh" installed.

But is there any command that give's me the home for a given username?
--
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/


RE: "which" command does not expand "~" in path

2004-09-26 Thread Hannu E K Nevalainen
you ([EMAIL PROTECTED]) wrote on  :

> On Sun, Sep 26, 2004 at 11:25:04AM +1000, Errol Smith wrote:
>> I do not know if stat() is expected to interpret ~ as $HOME.
>
> No, it is not.
>
> cgf

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.

/Hannu E K Nevalainen, B.Sc. EE Microcomputer systems--72-->

** mailing list preference; please keep replies on list **

-- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); --
--END OF MESSAGE--


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



Re: "which" command does not expand "~" in path

2004-09-25 Thread Christopher Faylor
On Sun, Sep 26, 2004 at 11:25:04AM +1000, Errol Smith wrote:
>I do not know if stat() is expected to interpret ~ as $HOME.

No, it is not.

cgf

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



Re: "which" command does not expand "~" in path

2004-09-25 Thread Errol Smith

From: Sven Köhler
Subject: Re: "which" command does not expand "~" in path
Date: Sat, 25 Sep 2004 20:32:31 +0200
Message-ID: <[EMAIL PROTECTED]>
Set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
  PATH="~/bin:${PATH}"
fi
Hmm, i'm not 100% percent sure, but is this supposed to work in general? I 
don't think that all programs that use the PATH varible are supposed to 
interpret ~ correctly.
 I don't know for certain (I am no expert), BUT I briefly examined source 
code of both GNU "which" and cygwin "which" and the GNU version 
specifically checks for "~" while the cygwin version does not. The cygwin 
version essentially passes the partial PATH directly to a stat() function 
call. I do not know if stat() is expected to interpret ~ as $HOME.

Instead, the shell usually substitutes ~ or ~user.
Look at this the output of these commands:
echo ~
echo "~"
 I'm fairly certain the shell is not expected to perform tilde expansion 
if the tilde is quoted, so the difference between these two is expected.

I would suggest to use
  PATH="$HOME/bin:$PATH"
or even
  PATH="$(echo -n ~)/bin:$PATH"
instead of your line.
 The "PATH=.." line I quoted is from the _cygwin default .bash_profile_, 
so if what you suggest is true, either way something in cygwin needs to be 
modified (and yes, substituting $HOME for ~ does fix it, but that doesn't 
stop someone manually putting ~ in their path). The which command on linux 
works as expected, whether the path contains ~ or not.
 I'm sure Corinna will know the correct behaviour - she's also the 
maintainer of "which" ;-)

Regards, Errol
btw, I am using a fully updated cygwin with snapshot 20040924
btw2, if anyone knows how to get Eudora to let me reply to the digest and 
have it thread properly in the archives, please let me know..

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


Re: "which" command does not expand "~" in path

2004-09-25 Thread Robert Schmidt
Sven Köhler wrote:
Set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
  PATH="~/bin:${PATH}"
fi

Hmm, i'm not 100% percent sure, but is this supposed to work in general? 
I don't think that all programs that use the PATH varible are supposed 
to interpret ~ correctly.

Instead, the shell usually substitutes ~ or ~user.
Look at this the output of these commands:
echo ~
echo "~"
This is probably common knowledge, but I learned last night that sh 
never expands ~.  Under sh, the two lines above yield the same output, 
simply ~.

So my conclusion was to never rely on ~ in scripts or variables.
(Unless something is broken in my setup?)
Cheers,
Rob
--
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/


Re: "which" command does not expand "~" in path

2004-09-25 Thread Sven Köhler
Set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
  PATH="~/bin:${PATH}"
fi
Hmm, i'm not 100% percent sure, but is this supposed to work in general? 
I don't think that all programs that use the PATH varible are supposed 
to interpret ~ correctly.

Instead, the shell usually substitutes ~ or ~user.
Look at this the output of these commands:
echo ~
echo "~"
I would suggest to use
  PATH="$HOME/bin:$PATH"
or even
  PATH="$(echo -n ~)/bin:$PATH"
instead of your line.
--
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/