summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Borzenkov <bor@users.sourceforge.net>2004-12-10 16:05:25 +0000
committerAndrey Borzenkov <bor@users.sourceforge.net>2004-12-10 16:05:25 +0000
commit582732d05fe94dcf444488e1eaa8ecc2b219abf0 (patch)
tree16ed662c2a9d4960f97d66f02ecdd915e7dcfaca
parent19913bc78444b6359f66bcec4d41af61f318f291 (diff)
downloadzsh-582732d05fe94dcf444488e1eaa8ecc2b219abf0.tar.gz
zsh-582732d05fe94dcf444488e1eaa8ecc2b219abf0.zip
20617: fix completion of compressed modules for 2.6; add insmod completion
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Linux/Command/_modutils10
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
;;