New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
argcomplete or other method for argument completion #25
Comments
FWIW I’ve tried this a few times, and it always leads to headache. This seems like one of those pretty things that would just make maintainership hard. But maybe there is an old school way to just generate a shell script to do the completion, and then install alongside? We did this back in the day for Singularity. I’m averse you adding buggy things that don’t add a ton, so my initial response is “probably not.” |
100% agree and I had exactly the same thought! is there a tool already to produce from argparse complete sourceable completion scripts? (I think I did search at some point, forgot details now) |
Yeah good point! I'll leave the issue open for future thinking / discussion. |
eh, it is that day... right after this I saw a tweet about poetry, README of which says "poetry supports generating completion scripts for Bash, Fish, and Zsh", so now I am down that rabbit hole |
ohhhh.... oh no, lol. |
But that would require using it. |
they use https://github.com/sdispater/cleo for cmdline interfacing. Never heard about it, but it is the one supporting generating them "natively" |
I wish only if it also provided Pythonic interface for defined "Commands" (that is what we do in DataLad) -- I would have even closed by eyes on dislike of defining interface in docstrings (and not the other way around), and tried to use it where I ATM use click. ... although again -- seems more magic dust is needed:
|
I am still fighting to make it work for me in datalad but it used to work and works for others: https://github.com/kislyuk/argcomplete/ . Use could be as rudimentary as just following argparse spec or add fancier "dynamic" completions
The text was updated successfully, but these errors were encountered: