Your message dated Fri, 28 Aug 2015 02:28:02 +0000
with message-id <[email protected]>
and subject line bash less broken now
has caused the Debian Bug report #493269,
regarding /usr/bin/which does not expand "~"
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
493269: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493269
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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
root@bork:/usr/bin# diff which.old which
45c45,46
< for ELEMENT in $PATH; do
---
> for UNEXPANDED_ELEMENT in $PATH; do
> ELEMENT=`eval echo $UNEXPANDED_ELEMENT`
--- End Message ---
--- Begin Message ---
bash 4.3.39 appears to have this fixed, and therefore no one
should have a problem anymore.
--- End Message ---