summary refs log tree commit diff
path: root/Completion/Linux/Command
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 /Completion/Linux/Command
parent19913bc78444b6359f66bcec4d41af61f318f291 (diff)
downloadzsh-582732d05fe94dcf444488e1eaa8ecc2b219abf0.tar.gz
zsh-582732d05fe94dcf444488e1eaa8ecc2b219abf0.tar.xz
zsh-582732d05fe94dcf444488e1eaa8ecc2b219abf0.zip
20617: fix completion of compressed modules for 2.6; add insmod completion
Diffstat (limited to 'Completion/Linux/Command')
-rw-r--r--Completion/Linux/Command/_modutils10
1 files changed, 8 insertions, 2 deletions
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
   ;;