Open Freed-Wu opened 2 years ago
First line of zsh completion script must be compdef program_name. zsh support compdef -P a_glob_expr, such as compdef pip-cache -P pip[0-9.]# will let this completion script support pip-cache, pip, pip3, pip3.9, etc.
compdef program_name
compdef -P a_glob_expr
compdef pip-cache -P pip[0-9.]#
pip-cache
pip
pip3
pip3.9
shtab.add_argument_to(parser, compdef="XXXX")
Result:
#compdef XXX
First line of zsh completion script must be
compdef program_name
. zsh supportcompdef -P a_glob_expr
, such ascompdef pip-cache -P pip[0-9.]#
will let this completion script supportpip-cache
,pip
,pip3
,pip3.9
, etc.A new feature
Result: