From 6328b108a2b48e93b7e5f58016124a6b5c878a57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 26 Jan 2010 23:17:48 +0200 Subject: [PATCH] Fix NFS completion if path to showmount contains spaces (Alioth: #312285). --- contrib/mount | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/mount b/contrib/mount index f9fafb17..d8ba81bc 100644 --- a/contrib/mount +++ b/contrib/mount @@ -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