about summary refs log tree commit diff
path: root/Completion/Linux/Command
diff options
context:
space:
mode:
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
   ;;