Skip to content
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

Is there a way to generate a tab completions bash script? #149

Open
AndriiNeverov opened this issue Jul 29, 2020 · 4 comments
Open

Is there a way to generate a tab completions bash script? #149

AndriiNeverov opened this issue Jul 29, 2020 · 4 comments

Comments

@AndriiNeverov
Copy link

What would be a recommended way to achieve something similar to https://stackoverflow.com/questions/32258362/setup-command-line-completion-with-yargs?

@AndriiNeverov AndriiNeverov changed the title Is there a way to generate a completions bash script? Is there a way to generate a tab completions bash script? Jul 29, 2020
@puzrin
Copy link
Member

puzrin commented Jul 30, 2020

For any questions it's better to search python argparse helps. Something like argparse tab completion.

https://stackoverflow.com/questions/8387924/python-argparse-and-bash-completion

As far as i see, they have https://github.com/kislyuk/argcomplete, but it was not ported to JS.

@AndriiNeverov
Copy link
Author

Yep, I used Python's argcomplete in the past and it's super powerful. Nails it with a single line of code!

Thank you for confirming. I guess this is a feature request then :)

@puzrin
Copy link
Member

puzrin commented Jul 31, 2020

This is useful suggestion, but i have no ideas about deadlines. All i can say, In 1-2 weeks port of 3.9.4 argparse will be ready (as v2.+ o this package, see progress in branches). Then no plans to continue - too much of other deals.

@AndriiNeverov
Copy link
Author

I see. Well, maybe some more people vote on this to bump it up the list.

In the meantime, since the API is very similar, maybe there is a workaround of making the code run in Python, letting register-python-argcomplete generate the Shell stuff from there and then re-using that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants