Skip to content

Commit b6bd286

Browse files
committed
zsh: fix subcommands containing hyphens -
- fixes #4
1 parent 11a2f91 commit b6bd286

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

shtab/shtab.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,10 @@ def format_positional(opt):
470470
if opt.help != SUPPRESS
471471
),
472472
commands_case="\n ".join(
473-
"{cmd}) _arguments ${root_prefix}_{cmd} ;;".format(
474-
cmd=cmd.replace("-", "_"), root_prefix=root_prefix,
473+
"{cmd_orig}) _arguments ${root_prefix}_{cmd} ;;".format(
474+
cmd_orig=cmd,
475+
cmd=cmd.replace("-", "_"),
476+
root_prefix=root_prefix,
475477
)
476478
for cmd in sorted(subcommands)
477479
),

0 commit comments

Comments
 (0)