Skip to content

Commit

Permalink
Merge pull request #137 from guillaumeboehm/main
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl authored Jun 14, 2023
2 parents d3721cf + 2c4389d commit a81c261
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shtab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def recurse(parser, prefix, paths=None):
def command_case(prefix, options):
name = options["cmd"]
commands = options["commands"]
case_fmt_on_no_sub = """{name}) _arguments -C ${prefix}_{name_wordify}_options ;;"""
case_fmt_on_no_sub = """{name}) _arguments -C -s ${prefix}_{name_wordify}_options ;;"""
case_fmt_on_sub = """{name}) {prefix}_{name_wordify} ;;"""

cases = []
Expand All @@ -581,7 +581,7 @@ def command_case(prefix, options):
if ((${{{prefix}_options[(I)${{(q)one_or_more}}*]}} + ${{{prefix}_options[(I)${{(q)remainder}}*]}} == 0)); then # noqa: E501
{prefix}_options+=(': :{prefix}_commands' '*::: :->{name}')
fi
_arguments -C ${prefix}_options
_arguments -C -s ${prefix}_options
case $state in
{name})
Expand Down

0 comments on commit a81c261

Please sign in to comment.