Quoted $cur to prevent quoting

See Alioth #311614, bash-completion.patch3
master
Freddy Vulto 2009-09-25 21:30:45 +02:00
parent b66425e8cf
commit 32f22b996a
2 changed files with 4 additions and 5 deletions

View File

@ -175,8 +175,7 @@ bash-completion (1.x)
* Added setting COMP_KNOWN_HOSTS_WITH_HOSTFILE. _known_hosts_real() will add
hosts from HOSTFILE, unless COMP_KNOWN_HOSTS_WITH_HOSTFILE is set to an
empty value (Alioth: #311821)
* Fix _known_hosts_real() to not glob awk script - thanks to Eric Blake
(Alioth #311614)
* Quoted $cur to prevent globbing - thanks to Eric Blake (Alioth #311614)
* Fix leaking $muttcmd from mutt completion
* Fix completing multiple hosts (Debian: #535585)

View File

@ -961,7 +961,7 @@ _insmod()
# do module parameter completion
COMPREPLY=( $( /sbin/modinfo -p ${COMP_WORDS[1]} 2>/dev/null | \
awk '{if ($1 ~ /^parm:/ && $2 ~ /^'$cur'/) { print $2 } \
else if ($1 !~ /:/ && $1 ~ /^'$cur'/) { print $1 }}' ) )
else if ($1 !~ /:/ && $1 ~ /^'"$cur"'/) { print $1 }}' ) )
else
_modules $(uname -r)
fi
@ -1112,7 +1112,7 @@ _ipsec()
;;
ranbits)
COMPREPLY=( $( compgen -W '--quick --continuous --bytes' \
-- $cur ) )
-- "$cur" ) )
;;
setup)
COMPREPLY=( $( compgen -W '--start --stop --restart' -- "$cur" ) )
@ -1544,7 +1544,7 @@ _look()
cur=`_get_cword`
if [ $COMP_CWORD = 1 ]; then
COMPREPLY=( $( compgen -W '$(look $cur 2>/dev/null)' ) )
COMPREPLY=( $( compgen -W '$(look "$cur" 2>/dev/null)' ) )
fi
} &&
complete -F _look $default look