From e5ac40075728c92775ce974dcdaf1a60a9533e4b Mon Sep 17 00:00:00 2001 From: Matt Bray Date: Thu, 9 Jan 2014 16:45:27 +0000 Subject: Update zsh-completion for netctl-auto --- contrib/zsh-completion | 23 +++++++++++++++-------- 1 file 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)}" ;; -- cgit v1.2.3-24-g4f1b