Skip to content

Commit

Permalink
Fix: bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
yassun7010 committed Aug 2, 2023
1 parent d0488d2 commit 1aa7814
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmdcomp/v2/templates/zsh.sh.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
{%- set scope = scope + "_" + cmd_name %}
{{ ([cmd_name] + command.aliases)|join("|") }})
{%- if command.has_subcommands %}
local -a _{{ scope }}_subcmds
_{{ scope }}_subcmds=(
local -a _{{ scope|replace("-", "_") }}_subcmds
_{{ scope|replace("-", "_") }}_subcmds=(
{%- for subcmd_name, subcommand in command.subcommands.items() %}
{{ candidate(subcmd_name, subcommand) }}'{{ description(subcommand) }}'
{%- endfor %}
Expand All @@ -61,7 +61,7 @@
{%- if command.has_positional_wildcard_argument %}
'*{{ contents("*", command.positional_wildcard_argument) }}' \
{%- elif command.has_subcommands %}
'1: :_values "subcommand" ${_{{ scope }}_subcmds[@]}' \
'1: :_values "subcommand" ${_{{ scope|replace("-", "_") }}_subcmds[@]}' \
'*:: :->args' \
{%- endif %}
&& ret=0
Expand Down

0 comments on commit 1aa7814

Please sign in to comment.