aboutsummaryrefslogtreecommitdiffstats
path: root/src/_redis-cli
diff options
context:
space:
mode:
Diffstat (limited to 'src/_redis-cli')
-rw-r--r--src/_redis-cli14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/_redis-cli b/src/_redis-cli
index 0320f9c..aa3647b 100644
--- a/src/_redis-cli
+++ b/src/_redis-cli
@@ -36,9 +36,7 @@
#
# ------------------------------------------------------------------------------
-
-local -a _1st_arguments
-_1st_arguments=(
+local -a redis_commands=(
'append:append a value to a key'
'auth:authenticate to the server'
'bgrewriteeaof:asynchronously rewrite the append-only file'
@@ -163,17 +161,11 @@ _1st_arguments=(
'zunionstore:add multiple sorted sets and store the resulting sorted set in a new key'
)
-local expl
-
_arguments \
'(-v --version)'{-v,--version}'[show version]' \
'(-h --help)'{-h,--help}'[show help]' \
- '*:: :->subcmds' && return 0
-
-if (( CURRENT == 1 )); then
- _describe -t commands "redis-cli subcommand" _1st_arguments
- return
-fi
+ '1::command:{ _describe -t commands "redis-cli subcommand" redis_commands }' \
+ && return 0
# Local Variables:
# mode: Shell-Script