Open Freed-Wu opened 2 years ago
zsh/fish support choices with description, like:
❯ pip download --<TAB> implementation cp cpython ip ironpython jy jython pp pypy py implementation-agnostic
parser.add_argument("--implementation", choices=["py", "cp", "pp", "ip", "jy"]).complete = {"cpython", "ironpython", "jython", "pypy", "implementation-agnostic"} # len(complete) must = len(choices), or complete must be a dict which keys is choices
Result:
"--implementation: :((pp\:pypy jy\:jython cp\:cpython ip\:ironpython py\:implementation-agnostic))"
zsh/fish support choices with description, like:
A new feature
Result: