-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
feat: add shell completions #1054
Conversation
I don't think this command should assume that the user wants to install the completions system-wide, especially as that requires elevated permission (sudo). Most tools with an option to generate completions that I know output to stdout. This way the user can decide where to place the completions and no elevated permissions are required. I think a few of the tools I know by default add their completions by adding to bashrc and sourcing the output without ever writing to a file. Though that has other implications as the who knows what is sourced each time bashrc is run. |
Fair enough. I just thought this the simplest workflow (requires the least action from the user).
I have never had to do this for any tools. Do you have an example of one I could look at? |
One example would be The help text when running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This contributions comes at a surprise but I think it can be made to work.
You could make it so it's very similar if not the same as the same command for atuin
.
In general, please do not attempt to auto-install these completions, being able to generate them is a good first step that already helps those who really want it.
@Skgland Please feel free to review as well, I think we want the same.
I think the latest changes look good 👍 |
23c02a0
to
fdd2df8
Compare
Thanks a lot! |
Closes #877
Adds shell completions, by adding a new
gix
commandgenerate-completions
:I assume the version and CHANGELOG are automatically updated. Also, I am unsure if this should be under
feat
orBREAKING!
- an exhaustive public enum has been changed, but I am not sure how/if it is used as a library.