diff options
author | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-05-02 03:46:28 +0000 |
---|---|---|
committer | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-05-02 03:46:28 +0000 |
commit | 2598e0995abf3d3fadc226cbc282f25bfe8e6521 (patch) | |
tree | c26795f3890d32ad638e34030e83081603bb1cc7 /Completion/Unix/Command/_chkconfig | |
parent | 6a9a6a4fbce997fe53c6886791e5af794d79fd2f (diff) | |
download | zsh-2598e0995abf3d3fadc226cbc282f25bfe8e6521.tar.gz zsh-2598e0995abf3d3fadc226cbc282f25bfe8e6521.tar.xz zsh-2598e0995abf3d3fadc226cbc282f25bfe8e6521.zip |
Merge of workers/{21302,21306,21310}.
Diffstat (limited to 'Completion/Unix/Command/_chkconfig')
-rw-r--r-- | Completion/Unix/Command/_chkconfig | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_chkconfig b/Completion/Unix/Command/_chkconfig new file mode 100644 index 000000000..76da38d27 --- /dev/null +++ b/Completion/Unix/Command/_chkconfig @@ -0,0 +1,28 @@ +#compdef chkconfig + +local curcontext="$curcontext" state line expl ret=1 + +case $OSTYPE in +linux*) + _arguments -C \ + '(- 2)--list[list services]' \ + '(-)--level[specify runlevels to apply to]:-:_values -s "" "run levels" 1 2 3 4 5 6 7' \ + '(- 2)--add[add new service]' \ + '(- 2)--del[remove service from chkconfig management]' \ + '1:service name:_services' \ + '2:state:(on off reset)' && ret=0 +;; +irix*) + _arguments -C \ + '(- 1)-s[print state of configuration flags]' \ + '(1 -s)-f[set flag state]:configuration flag:->flag:state:(on off)' \ + '1:configuration flag:->flag' && ret=0 + + if [[ -n "$state" ]]; then + _wanted conf-flags expl 'configuration flag' \ + compadd ${${${(f)"$($words[1])"}[4,-1]##$'\t'}%% *} && ret=0 + fi +;; +esac + +return ret |