Skip to content

Commit

Permalink
Update autocompletion scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
slowli committed Nov 7, 2024
1 parent c4d173f commit 2403cf3
Show file tree
Hide file tree
Showing 3 changed files with 220 additions and 24 deletions.
78 changes: 75 additions & 3 deletions zkstack_cli/crates/zkstack/completion/_zkstack.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2039,6 +2039,16 @@ _arguments "${_arguments_options[@]}" : \
'--help[Print help]' \
&& ret=0
;;
(build)
_arguments "${_arguments_options[@]}" : \
'--chain=[Chain to use]:CHAIN:_default' \
'-v[Verbose mode]' \
'--verbose[Verbose mode]' \
'--ignore-prerequisites[Ignores prerequisites checks]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
'*--components=[Components of server to run]:COMPONENTS:_default' \
Expand Down Expand Up @@ -2074,6 +2084,10 @@ _arguments "${_arguments_options[@]}" : \
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(build)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
Expand Down Expand Up @@ -2120,7 +2134,17 @@ _arguments "${_arguments_options[@]}" : \
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:zkstack-contract-verifier-command-$line[1]:"
case $line[1] in
(run)
(build)
_arguments "${_arguments_options[@]}" : \
'--chain=[Chain to use]:CHAIN:_default' \
'-v[Verbose mode]' \
'--verbose[Verbose mode]' \
'--ignore-prerequisites[Ignores prerequisites checks]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
'--chain=[Chain to use]:CHAIN:_default' \
'-v[Verbose mode]' \
Expand Down Expand Up @@ -2158,7 +2182,11 @@ _arguments "${_arguments_options[@]}" : \
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:zkstack-contract-verifier-help-command-$line[1]:"
case $line[1] in
(run)
(build)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
Expand Down Expand Up @@ -2846,6 +2874,10 @@ _arguments "${_arguments_options[@]}" : \
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(build)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
Expand All @@ -2870,7 +2902,11 @@ _arguments "${_arguments_options[@]}" : \
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:zkstack-help-contract-verifier-command-$line[1]:"
case $line[1] in
(run)
(build)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
Expand Down Expand Up @@ -3295,21 +3331,33 @@ _zkstack__containers_commands() {
(( $+functions[_zkstack__contract-verifier_commands] )) ||
_zkstack__contract-verifier_commands() {
local commands; commands=(
'build:Build contract verifier binary' \
'run:Run contract verifier' \
'init:Download required binaries for contract verifier' \
'help:Print this message or the help of the given subcommand(s)' \
)
_describe -t commands 'zkstack contract-verifier commands' commands "$@"
}
(( $+functions[_zkstack__contract-verifier__build_commands] )) ||
_zkstack__contract-verifier__build_commands() {
local commands; commands=()
_describe -t commands 'zkstack contract-verifier build commands' commands "$@"
}
(( $+functions[_zkstack__contract-verifier__help_commands] )) ||
_zkstack__contract-verifier__help_commands() {
local commands; commands=(
'build:Build contract verifier binary' \
'run:Run contract verifier' \
'init:Download required binaries for contract verifier' \
'help:Print this message or the help of the given subcommand(s)' \
)
_describe -t commands 'zkstack contract-verifier help commands' commands "$@"
}
(( $+functions[_zkstack__contract-verifier__help__build_commands] )) ||
_zkstack__contract-verifier__help__build_commands() {
local commands; commands=()
_describe -t commands 'zkstack contract-verifier help build commands' commands "$@"
}
(( $+functions[_zkstack__contract-verifier__help__help_commands] )) ||
_zkstack__contract-verifier__help__help_commands() {
local commands; commands=()
Expand Down Expand Up @@ -4264,11 +4312,17 @@ _zkstack__external-node_commands() {
local commands; commands=(
'configs:Prepare configs for EN' \
'init:Init databases' \
'build:Build external node' \
'run:Run external node' \
'help:Print this message or the help of the given subcommand(s)' \
)
_describe -t commands 'zkstack external-node commands' commands "$@"
}
(( $+functions[_zkstack__external-node__build_commands] )) ||
_zkstack__external-node__build_commands() {
local commands; commands=()
_describe -t commands 'zkstack external-node build commands' commands "$@"
}
(( $+functions[_zkstack__external-node__configs_commands] )) ||
_zkstack__external-node__configs_commands() {
local commands; commands=()
Expand All @@ -4279,11 +4333,17 @@ _zkstack__external-node__help_commands() {
local commands; commands=(
'configs:Prepare configs for EN' \
'init:Init databases' \
'build:Build external node' \
'run:Run external node' \
'help:Print this message or the help of the given subcommand(s)' \
)
_describe -t commands 'zkstack external-node help commands' commands "$@"
}
(( $+functions[_zkstack__external-node__help__build_commands] )) ||
_zkstack__external-node__help__build_commands() {
local commands; commands=()
_describe -t commands 'zkstack external-node help build commands' commands "$@"
}
(( $+functions[_zkstack__external-node__help__configs_commands] )) ||
_zkstack__external-node__help__configs_commands() {
local commands; commands=()
Expand Down Expand Up @@ -4470,11 +4530,17 @@ _zkstack__help__containers_commands() {
(( $+functions[_zkstack__help__contract-verifier_commands] )) ||
_zkstack__help__contract-verifier_commands() {
local commands; commands=(
'build:Build contract verifier binary' \
'run:Run contract verifier' \
'init:Download required binaries for contract verifier' \
)
_describe -t commands 'zkstack help contract-verifier commands' commands "$@"
}
(( $+functions[_zkstack__help__contract-verifier__build_commands] )) ||
_zkstack__help__contract-verifier__build_commands() {
local commands; commands=()
_describe -t commands 'zkstack help contract-verifier build commands' commands "$@"
}
(( $+functions[_zkstack__help__contract-verifier__init_commands] )) ||
_zkstack__help__contract-verifier__init_commands() {
local commands; commands=()
Expand Down Expand Up @@ -4809,10 +4875,16 @@ _zkstack__help__external-node_commands() {
local commands; commands=(
'configs:Prepare configs for EN' \
'init:Init databases' \
'build:Build external node' \
'run:Run external node' \
)
_describe -t commands 'zkstack help external-node commands' commands "$@"
}
(( $+functions[_zkstack__help__external-node__build_commands] )) ||
_zkstack__help__external-node__build_commands() {
local commands; commands=()
_describe -t commands 'zkstack help external-node build commands' commands "$@"
}
(( $+functions[_zkstack__help__external-node__configs_commands] )) ||
_zkstack__help__external-node__configs_commands() {
local commands; commands=()
Expand Down
Loading

0 comments on commit 2403cf3

Please sign in to comment.