summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Murzov <e-mail@date.by>2012-03-14 01:00:22 +0400
committerIgor Murzov <e-mail@date.by>2012-03-14 01:00:22 +0400
commit199a63bd4db2020c8d6aaad6723cf881c023c0ff (patch)
treee49e512230fbdc340372739e2a5a87ef8317a25a
parenta062777d4b9c7dc8a51d1e87c938b48fed810232 (diff)
downloadbash-completion-199a63bd4db2020c8d6aaad6723cf881c023c0ff.tar.gz
insmod, modprobe: Don't hardcode path to modinfo (Alioth: #313569)
-rw-r--r--completions/insmod4
-rw-r--r--completions/modprobe4
2 files changed, 4 insertions, 4 deletions
diff --git a/completions/insmod b/completions/insmod
index de619c01..545f8bc5 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 6db1b351..cf35f4b9 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