diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Completion/Linux/Command/_modutils | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index ba79d5e64..d086660d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-12-10 Andrey Borzenkov <bor@zsh.org> + + * 20617: Completion/Linux/Command/_modutils: fix + completion of compressed modules on kernel 2.6; add + trivial insmod completion. + 2004-12-09 Peter Stephenson <pws@csr.com> * 20613, 20614: Functions/Zle/match-words-by-style: fix diff --git a/Completion/Linux/Command/_modutils b/Completion/Linux/Command/_modutils index 2d3d71e43..d8c0e37e8 100644 --- a/Completion/Linux/Command/_modutils +++ b/Completion/Linux/Command/_modutils @@ -1,4 +1,4 @@ -#compdef lsmod modinfo modprobe rmmod +#compdef lsmod modinfo modprobe rmmod insmod local curcontext="$curcontext" expl state line modules ign args ret=1 @@ -51,6 +51,12 @@ case "$service" in '(-v --verbose)'{-v,--verbose}'[be verbose]' \ '*:loaded module:->loaded_modules' && ret=0 ;; + + insmod) + _arguments \ + '1:module file:_files' \ + '*:module parameters:' && ret=0 + ;; esac case "$state" in @@ -67,7 +73,7 @@ case "$state" in ;; all_modules) - modules=( ${${${${(f)"$(_call_program modules ${(M)words[1]##*/}modprobe -l 2>/dev/null)"}:#}##*/}%.*} ) + modules=( ${${${${(f)"$(_call_program modules ${(M)words[1]##*/}modprobe -l 2>/dev/null)"}:#}##*/}%%.*} ) _wanted modules expl module compadd -a modules && return ;; |