Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] support module file too



modinfo/modprobe will check for local file in addition to centrally installed 
modules

-andrey
Index: Completion/Linux/Command/_modutils
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Linux/Command/_modutils,v
retrieving revision 1.5
diff -u -p -r1.5 _modutils
--- Completion/Linux/Command/_modutils	10 Dec 2004 16:05:51 -0000	1.5
+++ Completion/Linux/Command/_modutils	12 Aug 2007 08:36:23 -0000
@@ -74,7 +74,11 @@ case "$state" in
 
   all_modules)
     modules=( ${${${${(f)"$(_call_program modules ${(M)words[1]##*/}modprobe -l 2>/dev/null)"}:#}##*/}%%.*} )
-    _wanted modules expl module compadd -a modules && return
+    _tags files modules
+    while _tags; do
+      _requested files expl "module file"  _files && ret=0
+      _requested modules expl module compadd -a modules && ret=0
+    done
   ;;
 
   params)

Attachment: signature.asc
Description: This is a digitally signed message part.



Messages sorted by: Reverse Date, Date, Thread, Author