[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 258736a47bf64f05395a178c36af43e467928362

Ville Skyttä ville.skytta at iki.fi
Sun Jan 24 14:55:19 UTC 2010


The following commit has been merged in the master branch:
commit 258736a47bf64f05395a178c36af43e467928362
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sun Jan 24 16:52:11 2010 +0200

    Look for showmount in $PATH first for easier mockability (Alioth: #312285).

diff --git a/contrib/mount b/contrib/mount
index 0474df0..503c5a7 100644
--- a/contrib/mount
+++ b/contrib/mount
@@ -16,7 +16,9 @@ _mount()
     [[ "$cur" == \\ ]] && cur="/"
     prev=${COMP_WORDS[COMP_CWORD-1]}
 
-    for i in {,/usr}/{,s}bin/showmount; do [ -x $i ] && sm=$i && break; done
+    for i in $(type -P showmount) {,/usr}/{,s}bin/showmount; do
+        [ -x $i ] && sm=$i && break
+    done
 
     if [[ -n "$sm" && "$cur" == *:* ]]; then
         COMPREPLY=( $( compgen -W "$( $sm -e ${cur%%:*} | \

-- 
bash-completion



More information about the Bash-completion-commits mailing list