[issue4256] optparse/argparse: provide a simple way to get a programmatically useful list of options

R. David Murray report at bugs.python.org
Mon May 10 17:08:34 CEST 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

zsh's completion system is completely programmable.  I looks like it would be pretty easy to add generic 'python script' support widgets(*) using this hidden option, and probably other neat tricks as well.  Something that would make it even more useful for zsh completion would be to include information on the type of the argument when known.  A zsh completer could then be programmed to do smart completion on the option value as well.

(*) You can write a 'widget' and assign it to a key, and then when you use that key the completion widget (shell function) is called and could run the command with the hidden option to get the option info and generate the completion list.  That's just the *easiest* way to integrate support for this into zsh completion.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4256>
_______________________________________


More information about the Python-bugs-list mailing list