aboutsummaryrefslogtreecommitdiffstats
path: root/src/_redis-cli
diff options
context:
space:
mode:
authorShohei YOSHIDA <syohex@gmail.com>2024-08-04 14:19:29 +0900
committerShohei YOSHIDA <syohex@gmail.com>2024-08-04 14:19:29 +0900
commit4dfb7a51c5ae9fa61ff0cbe94538d49676687484 (patch)
tree4fd7ae5198ba142f760426062b1bb1b7f118cecb /src/_redis-cli
parentUpdate clang-tidy completion (diff)
downloadzsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar
zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.gz
zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.bz2
zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.lz
zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.xz
zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.zst
zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.zip
Cleanup code
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