diff options
| author | Clint Adams <clint@users.sourceforge.net> | 2001-03-18 14:19:02 +0000 |
|---|---|---|
| committer | Clint Adams <clint@users.sourceforge.net> | 2001-03-18 14:19:02 +0000 |
| commit | 638454bb0fa68fe567e66686f017d879fed5dd27 (patch) | |
| tree | e69e0b5741e4de2e0aacc70376bff35478af1fae /Completion/SysV/_sysv_initscripts | |
| parent | Add zkdb function. (diff) | |
| download | zsh-638454bb0fa68fe567e66686f017d879fed5dd27.tar zsh-638454bb0fa68fe567e66686f017d879fed5dd27.tar.gz zsh-638454bb0fa68fe567e66686f017d879fed5dd27.tar.bz2 zsh-638454bb0fa68fe567e66686f017d879fed5dd27.tar.lz zsh-638454bb0fa68fe567e66686f017d879fed5dd27.tar.xz zsh-638454bb0fa68fe567e66686f017d879fed5dd27.tar.zst zsh-638454bb0fa68fe567e66686f017d879fed5dd27.zip | |
13661: complete args for SysV initscripts
Diffstat (limited to 'Completion/SysV/_sysv_initscripts')
| -rw-r--r-- | Completion/SysV/_sysv_initscripts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Completion/SysV/_sysv_initscripts b/Completion/SysV/_sysv_initscripts new file mode 100644 index 000000000..2f0a520f9 --- /dev/null +++ b/Completion/SysV/_sysv_initscripts @@ -0,0 +1,17 @@ +#compdef -p /etc/(init|rc[0-9S]).d/* + +local stdargs nonstdargs expl + +if [[ -f $words[1] ]] +then +nonstdargs=(${${(s: :)${${${${(M)${(f)"$(<$words[1])"}:#[ a-z-|]##\)*}%\)*}##\ #}:gs/|/ /}:s/ //}:#(start|stop|restart|force-reload|reload)}) +stdargs=(${(M)${(s: :)${${${${(M)${(f)"$(<$words[1])"}:#[ a-z-|]##\)*}%\)*}##\ #}:gs/|/ /}:s/ //}:#(start|stop|restart|force-reload|reload)}) +else +nonstdargs=() +stdargs=(start stop restart force-reload) +fi + +_tags nonstdargs stdargs + +_wanted -V stdargs expl "standard arguments" compadd -a stdargs +_wanted nonstdargs expl "non-standard arguments" compadd -a nonstdargs |
