Cleanup code

This commit is contained in:
Shohei YOSHIDA
2024-08-04 14:19:29 +09:00
parent 8abb801db2
commit 4dfb7a51c5
11 changed files with 174 additions and 163 deletions
+3 -11
View File
@@ -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