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

[PATCH] modprobe module parameters completion



modinfo is not in the default user $path, so
% sudo modprobe module <tab>
doesn't complete anything.

diff -Naur zsh-orig/Completion/Linux/Command/_modutils
zsh/Completion/Linux/Command/_modutils
--- zsh-orig/Completion/Linux/Command/_modutils 2014-01-17
05:45:30.521883787 +0400
+++ zsh/Completion/Linux/Command/_modutils      2014-01-17
05:47:03.161614562 +0400
@@ -127,7 +127,7 @@
                _message -e value 'parameter value'
            else
                local params
-               params=( ${${(M)${(f)"$(_call_program module_parameter
modinfo "$words[2]" 2>/dev/null)"}:#parm:*}##parm:[[:space:]]##} )
+               params=( ${${(M)${(f)"$(_call_program module_parameter
/sbin/modinfo "$words[2]" 2>/dev/null)"}:#parm:*}##parm:[[:space:]]##} )
                if [[ $#params -eq 0 ]]; then
                    _message -e parameter "This modules doesn't have
parameters"
                else


-- 
sergio.



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