diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2002-09-03 12:26:53 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2002-09-03 12:26:53 +0000 |
commit | 227194d7e09c21033790e20791295e19935e72db (patch) | |
tree | 006785932186894f17d1ff143a74896255570666 /Completion/Unix/Command/_modutils | |
parent | f2159b9ce08e678931da5e1809cf66ce3791fba5 (diff) | |
download | zsh-227194d7e09c21033790e20791295e19935e72db.tar.gz zsh-227194d7e09c21033790e20791295e19935e72db.tar.xz zsh-227194d7e09c21033790e20791295e19935e72db.zip |
moved to Completion/Linux/Command
Diffstat (limited to 'Completion/Unix/Command/_modutils')
-rwxr-xr-x | Completion/Unix/Command/_modutils | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/Completion/Unix/Command/_modutils b/Completion/Unix/Command/_modutils deleted file mode 100755 index 1b47e8a3d..000000000 --- a/Completion/Unix/Command/_modutils +++ /dev/null @@ -1,87 +0,0 @@ -#compdef modprobe rmmod - -local curcontext="$curcontext" state line expl loaded - -_modutils_loaded_modules() { - -if [[ -r /proc/modules ]]; then - loaded=(${${(f)"$(</proc/modules)"}%% *}) -elif [[ -x /sbin/lsmod ]]; then - loaded=(${${(f)"$(/sbin/lsmod)"}[2,-1]%% *}) -else - return 1 -fi - -_wanted modules expl 'loaded module' compadd -a loaded -} - -case "$service" in - rmmod) - - _arguments '(--all)-a[remove all unused autocleanable modules]' \ - '(-a)--all' \ - '(--persist)-e[save persistent data]' \ - '(-e)--persist' \ - '(--help)-h[print help text]' \ - '(-h)--help' \ - '(--stacks)-r[remove a module stack]' \ - '(-r)--stacks' \ - '(--syslog)-s[output to syslog]' \ - '(-s)--syslog' \ - '(--verbose)-v[be verbose]' \ - '(-v)--verbose' \ - '(--version)-V[print version]' \ - '(-V)--version' \ - '*:loaded module:_modutils_loaded_modules' && return 0 - ;; - - modprobe) - - _modprobe_arguments=( - '(--all)-a[all]' \ - '(-a)--all' \ - '(--showconfig)-c[showconfig]' \ - '(-c)--showconfig' \ - '(--debug)-d[debug]' \ - '(-d)--debug' \ - '(--autoclean)-k[set autoclean]' \ - '(-k)--autoclean' \ - '(--show)-n[do not act]' \ - '(-n)--show' \ - '(--quiet)-q[do not complain about insmod failures]' \ - '(-q)--quiet' \ - '(--syslog)-s[report via syslog instead of stderr]' \ - '(-s)--syslog' \ - '(--type)-t[module type]:moduletype:' \ - '(-t)--type:moduletype:' \ - '(--verbose)-v[print all commands as executed]' \ - '(-v)--verbose' \ - '(--version)-V[show release version]' \ - '(-V)--version' \ - '(--config)-C[config file]:config file:_files' \ - '(-C)--config:config file:_files' - ) - - _arguments -C '(--remove)-r[remove]:*:loaded module:->modprobe_remove' \ - '(-r)--remove:*:loaded module:->modprobe_remove' \ - '(--list)-l[list matching modules]:*:module file:->modprobe_list' \ - '(-l)--list:*:module file:->modprobe_list' \ - "$_modprobe_arguments[@]" && return 0 - - ;; - -esac - -case "$state" in - modprobe_remove) - _call_function ret _modutils_$state && return ret - _arguments "$_modprobe_arguments[@]" \ - '*:loaded module:_modutils_loaded_modules' - ;; - - modprobe_list) - _call_function ret _modutils_$state && return ret - _arguments "$_modprobe_arguments[@]" \ - '*:module file:compadd ${^${(M)${(f)"$(modprobe -c)"}:#path*}#*[=]}/**/*.o(:t)' - -esac |