iterative / shtab

↔️ Automagic shell tab completion for Python CLI applications
https://docs.iterative.ai/shtab
Other
375 stars 34 forks source link

[feature] support customization of zsh's compdef? #87

Open Freed-Wu opened 2 years ago

Freed-Wu commented 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.

A new feature

    shtab.add_argument_to(parser, compdef="XXXX")

Result:

#compdef XXX