This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [ITA] which: GNU which -- finds executables in the path
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 12/20/2007 2:41 AM, Corinna Vinschen wrote:
> Packaging looks good to me, but there's something strange:
>
> $ ./which -v
> GNU which v2.18, Copyright (C) 1999 - 2007 Carlo Wood.
> [...]
> $ ./which ls
> /usr/bin/ls
> $ ./which regedit
> ./which: no regedit in (/home/corinna/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/usr/bin)
> $ ./which regedit.exe
> ./which: no regedit.exe in (/home/corinna/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/usr/bin)
>
> Old which:
>
> $ which regedit
> /cygdrive/c/Windows/regedit
> $ which regedit.exe
> /cygdrive/c/Windows/regedit.exe
>
> Can you look into this?
This is now fixed. which was using a function copied from
bash to search the path. I had to change the function to use
access() instead of the built-in checks, same as the current
bash for Cygwin does.
Thanks for spotting this, Corinna. I'm embarrassed that I
didn't think to check this.
download:
- ----------------------------------------------------------------------
wget \
http://mysite.verizon.net/res00a7j/cygwin/which/setup.hint \
http://mysite.verizon.net/res00a7j/cygwin/which/which-2.18-1-src.tar.bz2 \
http://mysite.verizon.net/res00a7j/cygwin/which/which-2.18-1.tar.bz2
- --
David Rothenberger ---- daveroth@acm.org
Drakenberg's Discovery:
If you can't seem to find your glasses,
it's probably because you don't have them on.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Cygwin)
Comment: Key at http://mysite.verizon.net/res00a7j/key.gpg.txt
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQEVAwUBR2qjYr3xOW8bc2dhAQhEgwf9E1kCpAVxxk05ZeAPvgXaUwgrEvxktZUh
lt8+CSbv0mQaUoEMwRfF162wR9TkPbk2WnN29StdJEMbABJm6wqHqyDegXCmCbg0
EKWQk7Rb9ahRGkkGBieuC3wOKcOiXFkOCSvPNazKTRN6/pRknWwo03hCs5TLFkn3
adxYZ3l2HGriEOHXbIkYONYrvHSyreSqNT56yOANvPIcJgiEEyy/JcUY+fi+Z4VY
fNRZaFVWNWFsXYh24VrpFZtZ4lhW2P9UCDhCP7Ua2Iz+hUrxNh/0Wj5e07Cne3Ls
+BHMqGgJ/yyvceIkYTj8JlLpdXb3QZ4kU+E8zAwl8RaM1uani3Ct+g==
=fPYM
-----END PGP SIGNATURE-----