Fix NFS completion if path to showmount contains spaces (Alioth: #312285).

This commit is contained in:
Ville Skyttä 2010-01-26 23:17:48 +02:00
parent dc8af65161
commit 6328b108a2

View File

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