Fix modprobe -r completion when a path to modprobe is specified.

This commit is contained in:
Ville Skyttä 2009-11-23 17:32:48 +02:00
parent ef025a78ab
commit 29baa6b720
2 changed files with 3 additions and 3 deletions

View File

@ -23,8 +23,8 @@ bash-completion (2.x)
* Apply cardctl completion to pccardctl too.
* Apply pine completion to alpine too.
* Remove many unnecessary short option completions where long ones exist.
* Improve configure, cvs, gkrellm, lftp, mdadm, mplayer, mysqladmin, service,
and ssh completions.
* Improve configure, cvs, gkrellm, lftp, mdadm, modprobe, mplayer,
mysqladmin, service, and ssh completions.
* Add abook and wtf completion, based on work by Raphaël Droz.
* Add k3b and lftpget completion.
* Don't overwrite other host completions when completing from multiple

View File

@ -1000,7 +1000,7 @@ _insmod()
prev=${COMP_WORDS[COMP_CWORD-1]}
# behave like lsmod for modprobe -r
if [ $1 = "modprobe" ] &&
if [ ${1##*/} = "modprobe" ] &&
[ "${COMP_WORDS[1]}" = "-r" ]; then
_installed_modules "$cur"
return 0