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

Implement argcomplete shell completion #1082

Open
rpatterson opened this issue Sep 27, 2024 · 3 comments
Open

Implement argcomplete shell completion #1082

rpatterson opened this issue Sep 27, 2024 · 3 comments

Comments

@rpatterson
Copy link

rpatterson commented Sep 27, 2024

While the previously implemented shtab completion is faster and more secure, it also requires installing a /etc/bash_completion.d/* for each tool or application. Alternatively, the completion provided by argcomplete requires installing only one /etc/bash_completion.d/* file, many distributions and OSes have packages that do the equivalent, and argcomplete itself provides a convenience script to install the file. From then on any python tool or application that implements argcomplete gets completion.

Confirm that shtab and argcomplete can co-exist and implement argcomplete also.

@rpatterson
Copy link
Author

I would not consider this high priority. I only opened this issue because I ran my mouth in a comment on the shtab issue and a maintainer asked me to open one. These days, most of my use of reuse is integrated into build systems and CI and I can't even recall the last time I used it from an interactive shell. So, yeah, feel free to close this as not planned. I'm almost certainly not going to be submitting a PR for this. :-/

Can they be used in parallel?

I haven't implemented shtab so I can't say for sure, but from what I understand about how they work, there's no reason they should conflict.

@evelikov
Copy link
Contributor

Small correction - distributions usually don't install to /etc/bash_completion.d but to pkg-config --variable=completionsdir bash-completion aka /usr/share/bash-completion/completions.

That said, if you have a PR I would be quite happy to test the argcomplete approach.

@rpatterson
Copy link
Author

rpatterson commented Sep 29, 2024

distributions usually don't install to /etc/bash_completion.d

Simplified for brevity. Without a package, the admin is dealing with that directory. With a package they don't need to care about how it's done. But sure, I'll update the wording.

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