[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 876c8e26c162edfa2c24cc298bbe7ed3123d8eb7
Freddy Vulto
fvulto at gmail.com
Wed May 26 20:58:55 UTC 2010
The following commit has been merged in the master branch:
commit 876c8e26c162edfa2c24cc298bbe7ed3123d8eb7
Author: Freddy Vulto <fvulto at gmail.com>
Date: Wed May 26 22:57:08 2010 +0200
Prevent root PATH expansion proliferating
The PATH expansion done in `_root_command()':
PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin _command $1 $2 $3
stayed effective with bash >= 4.1.4 running in posix mode, causing PATH to grow
ever larger when doing sudo completions. This is now fixed.
To run the automated test:
./run ./completion/sudo.exp
See also:
- http://www.mail-archive.com/bug-bash@gnu.org/msg06942.html
- bash patch: bash41-004
diff --git a/bash_completion b/bash_completion
index 4aded0d..27ad613 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1729,7 +1729,8 @@ complete -F _command -o filenames nohup exec nice eval time ltrace then \
_root_command()
{
- PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin _command $1 $2 $3
+ local PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
+ _command $1 $2 $3
}
complete -F _root_command -o filenames sudo fakeroot really gksudo gksu kdesudo
--
bash-completion
More information about the Bash-completion-commits
mailing list