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

This commit is contained in:
Ville Skyttä 2010-01-24 16:52:11 +02:00
parent dde071d009
commit 258736a47b

View File

@ -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%%:*} | \