Package: debianutils
Version: 2.28.2-0ubuntu1

If a users sets a private directory such as "~/sbin" in their PATH the which command will
not expand the "~" leaving it useless

Steps to reproduce
create an executable helloworld.sh script and place it in your ~/sbin
add ~/sbin to your PATH
execute
which helloworld

results expected.
/username/sbin/helloworld.sh

results recieved:
No results from the which command.

Suggested fix:
Allow the which script to expand the "~" via the following patch


[EMAIL PROTECTED]:/usr/bin# diff which.old which
45c45,46
<    for ELEMENT in $PATH; do
---
>    for UNEXPANDED_ELEMENT in $PATH; do
>     ELEMENT=`eval echo $UNEXPANDED_ELEMENT`





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to