diff options
Diffstat (limited to 'Completion/Linux/Command/_vserver')
| -rw-r--r-- | Completion/Linux/Command/_vserver | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/Completion/Linux/Command/_vserver b/Completion/Linux/Command/_vserver new file mode 100644 index 000000000..2401387e5 --- /dev/null +++ b/Completion/Linux/Command/_vserver @@ -0,0 +1,131 @@ +#compdef vserver + +_vserver () { + + # local variables + local curcontext="$curcontext" state line expl ret=1 + local cmd=$words[3] + + # dispatch + case "$cmd" in + apt-cache|apt-config|apt-get) + compset -n 3 + _dispatch $cmd:t $cmd $cmd:t -default- && ret=0 + ;; + exec) + _arguments -C \ + '1: :->vsnames' \ + '2: :->cmds' \ + '3:command name: _command_names -e' \ + '*::arguments: _normal' && ret=0 + ;; + stop|restart|condrestart|enter|running|status) + _arguments -C \ + '1: :->vsnames' \ + '2: :->cmds' \ + '*::arguments: _message "no more arguments"' && ret=0 + ;; + *) + _arguments -C \ + '(-)--help[print help information]' \ + '(- *)--version[print client version information]' \ + '1: :->vsnames' \ + '2: :->cmds' \ + '*:: :->args' && ret=0 + ;; + esac + + # cache initialization + if [[ -n "$state" ]]; then + if (( ! $+_cache_vserver_cfgdir )); then + typeset -g _cache_vserver_cfgdir_initialized + _vserver_cache_cfgdir + fi + if (( ! $+_cache_vserver_vsnames )); then + typeset -g _cache_vserver_vsnames_initialized + _vserver_cache_vsnames + fi + if (( ! $+_cache_vserver_cmds )); then |
