summaryrefslogtreecommitdiff
path: root/etc/completions/_twidge
diff options
context:
space:
mode:
Diffstat (limited to 'etc/completions/_twidge')
-rw-r--r--etc/completions/_twidge19
1 files changed, 4 insertions, 15 deletions
diff --git a/etc/completions/_twidge b/etc/completions/_twidge
index 6309c55..3c128e4 100644
--- a/etc/completions/_twidge
+++ b/etc/completions/_twidge
@@ -47,7 +47,7 @@ function _twidge_args {
':status'
)
- case $1 in
+ case ${words[1]} in
lsarchive)
_arguments $args_common $args_more $args_other
;;
@@ -70,22 +70,11 @@ function _twidge_args {
}
function _twidge {
- typeset -i ret=1
- typeset curcontext=$curcontext state line
- typeset -A opt_args
-
- _arguments -C \
+ _arguments \
'(-c --config)'{-c,--config}'[config file]:file:_files' \
'(-d --debug)'{-d,--debug}'[enable debugging output]' \
- '(-): :->command' \
- '(-)*:: :->command-argument' && return
-
- case $state in
- command) _call_function ret _twidge_command ;;
- command-argument) _call_function ret _twidge_args ${words[1]} ;;
- esac
-
- return ret
+ '(-): :_twidge_command' \
+ '(-)*:: :_twidge_args'
}
_twidge