This is the mail archive of the
mailing list for the Cygwin project.
Re: "which" command does not expand "~" in path (base-files update needed)
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 28 Sep 2004 11:31:44 -0400
- Subject: Re: "which" command does not expand "~" in path (base-files update needed)
- References: <email@example.com>
- Reply-to: cygwin at cygwin dot com
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
> 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.000000000 +1000
>+++ .bash_profile 2004-09-29 00:21:50.000000000 +1000
>@@ -10,16 +10,16 @@
> # Set PATH so it includes user's private bin if it exists
> # if [ -d ~/bin ] ; then
> # fi
You can use ~ here. Just don't quote it. It shouldn't be quoted.
> # Set MANPATH so it includes users' private man if it exists
> # if [ -d ~/man ]; then
> # fi
> # Set INFOPATH so it includes users' private info if it exists
> # if [ -d ~/info ]; then
> # fi
I don't know if man or info deal properly with ~ but neither of the
above should cause a problem for which.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html