[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.90-153-g199a63b
Igor Murzov
e-mail at date.by
Tue Mar 13 21:03:35 UTC 2012
The following commit has been merged in the master branch:
commit 199a63bd4db2020c8d6aaad6723cf881c023c0ff
Author: Igor Murzov <e-mail at date.by>
Date: Wed Mar 14 01:00:22 2012 +0400
insmod, modprobe: Don't hardcode path to modinfo (Alioth: #313569)
diff --git a/completions/insmod b/completions/insmod
index de619c0..545f8bc 100644
--- a/completions/insmod
+++ b/completions/insmod
@@ -9,8 +9,8 @@ _insmod()
if [[ $cword -eq 1 ]]; then
_filedir '@(?(k)o?(.gz))'
else # do module parameter completion
- COMPREPLY=( $( compgen -W "$( /sbin/modinfo -p ${words[1]} \
- 2>/dev/null | cut -d: -f1 )" -- "$cur" ) )
+ COMPREPLY=( $( compgen -W "$( PATH="$PATH:/sbin" modinfo \
+ -p ${words[1]} 2>/dev/null | cut -d: -f1 )" -- "$cur" ) )
fi
} &&
complete -F _insmod insmod insmod.static
diff --git a/completions/modprobe b/completions/modprobe
index 6db1b35..cf35f4b 100644
--- a/completions/modprobe
+++ b/completions/modprobe
@@ -73,8 +73,8 @@ _modprobe()
_filedir '@(?(k)o?(.gz))'
elif [[ -n "$module" ]]; then
# do module parameter completion
- COMPREPLY=( $( compgen -W "$( /sbin/modinfo -p "$module" \
- 2>/dev/null | cut -d: -f1 )" -- "$cur" ) )
+ COMPREPLY=( $( compgen -W "$( PATH="$PATH:/sbin" modinfo \
+ -p "$module" 2>/dev/null | cut -d: -f1 )" -- "$cur" ) )
else
_modules $version
fi
--
bash-completion
More information about the Bash-completion-commits
mailing list