Skip to content

Commit

Permalink
zsh: fix positional multi-arg error
Browse files Browse the repository at this point in the history
- fixes #29
  • Loading branch information
casperdcl committed May 3, 2021
1 parent a519f26 commit 4c5434e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shtab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def format_optional(opt):

def format_positional(opt):
return '"{nargs}:{help}:{pattern}"'.format(
nargs={"+": "*", "*": "*"}.get(opt.nargs, ""),
nargs={"+": "(*)", "*": "(*):"}.get(opt.nargs, ""),
help=escape_zsh((opt.help or opt.dest).strip().split("\n")[0]),
pattern=complete2pattern(opt.complete, "zsh", choice_type2fn)
if hasattr(opt, "complete")
Expand Down

0 comments on commit 4c5434e

Please sign in to comment.