diff options
author | Matt Bray <mattjbray@gmail.com> | 2014-01-09 17:45:27 +0100 |
---|---|---|
committer | root <root@Mindship-03.lan> | 2014-03-01 21:05:24 +0100 |
commit | e5ac40075728c92775ce974dcdaf1a60a9533e4b (patch) | |
tree | f6d36ff0097a922246152a89856ebec0d8a6cc3d | |
parent | 79ef3fb789375dfe4f191fd42d8cf7ff2dbb8cc5 (diff) | |
download | netctl-e5ac40075728c92775ce974dcdaf1a60a9533e4b.tar.gz netctl-e5ac40075728c92775ce974dcdaf1a60a9533e4b.tar.xz |
Update zsh-completion for netctl-auto
-rw-r--r-- | contrib/zsh-completion | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/contrib/zsh-completion b/contrib/zsh-completion index 7695082..56c552d 100644 --- a/contrib/zsh-completion +++ b/contrib/zsh-completion @@ -35,15 +35,28 @@ _netctl_commands() { _describe "netctl commands" _commands } +_netctl-auto_commands() { + local -a _commands + _commands=( + 'list:List available profiles' + 'current:List currently active profiles' + 'switch-to:Switch to a profile, enable it if necessary' + 'enable:Enable a profile for automatic selection' + 'disable:Disable a profile temporarily for automatic selection' + 'enable-all:Enable all profiles for automatic selection' + 'disable-all:Disable all profiles temporarily for automatic selection' + ) + _describe "netctl-auto commands" _commands +} case $service in - netctl) + netctl|netctl-auto) case $CURRENT in 2) _arguments \ '(- :)--version[display version information]' \ '(- :)--help[display help message]' \ - '(-)::netctl commands:_netctl_commands' + '(-)::netctl commands:_${service}_commands' ;; 3) shift words @@ -52,12 +65,6 @@ case $service in ;; esac ;; - netctl-auto) - case $CURRENT in - 2) compadd start stop;; - 3) compadd "${(f)$(_wireless_interfaces)}";; - esac - ;; wifi-menu) (( CURRENT == 2 )) && compadd "${(f)$(_wireless_interfaces)}" ;; |