Fix javadoc, lvm, and mkinitrd (_count_args) local variable leaks.

master
Ville Skyttä 2009-11-03 22:49:14 +02:00
parent 1ff30048fa
commit 5b54c41de5
4 changed files with 5 additions and 3 deletions

View File

@ -38,6 +38,7 @@ bash-completion (2.x)
* Add /sbin to $PATH when invoking ifconfig and iwconfig.
* Combine dcop and qdbus completions into the latter.
* sed usage portability fixes.
* Fix leaking local variables from various completions.
[ Freddy Vulto ]
* Added _get_pword() helper function, thanks to Sung Pae (Alioth: #312030)

View File

@ -705,10 +705,11 @@ _realcommand() {
}
# this function count the number of mandatory args
# This function counts the number of args
#
_count_args()
{
local i
args=1
for (( i=1; i < COMP_CWORD; i++ )); do
if [[ "${COMP_WORDS[i]}" != -* ]]; then

View File

@ -173,7 +173,7 @@ have javadoc &&
_javadoc()
{
COMPREPLY=()
local cur prev
local cur prev classpath
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}

View File

@ -978,7 +978,7 @@ complete -F _lvextend lvextend
_lvm()
{
local prev
local cur
COMPREPLY=()
cur=`_get_cword`