Fix nfs mount completion if the path to showmount contains a space.

This commit is contained in:
Crestez Dan Leonard 2010-02-02 11:17:33 +02:00
parent c3bb4416d7
commit aac11de466

View File

@ -17,7 +17,7 @@ _mount()
[[ "$cur" == \\ ]] && cur="/"
if [[ "$cur" == *:* ]]; then
for sm in $(type -P showmount) {,/usr}/{,s}bin/showmount; do
for sm in "$(type -P showmount)" {,/usr}/{,s}bin/showmount; do
[ -x "$sm" ] || continue
COMPREPLY=( $( compgen -W "$( "$sm" -e ${cur%%:*} | \
awk 'NR>1 {print $1}' )" -- "${cur#*:}" ) )