-
-
Notifications
You must be signed in to change notification settings - Fork 554
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
Support generating shell completions #235
Conversation
Quick question, who's expected to run these shell completions and where should they be saved to? Obviously through pacman will set them up automatically I presume but what about installing directly through cargo? |
This is mainly for distro packages, for example, you can install shell completions for Atuin on Arch Linux like this: install -Dm 644 "completions/atuin.bash" "/usr/share/bash-completion/completions/atuin"
install -Dm 644 "completions/atuin.fish" -t "/usr/share/fish/vendor_completions.d"
install -Dm 644 "completions/_atuin" -t "/usr/share/zsh/site-functions" More info: https://wiki.archlinux.org/title/Shell_package_guidelines#Shell_completions Since they have to be placed into an appropriate location based on the current platform, I don't think they can be installed directly through |
I'm happy with this. Considering whether we should move to running in a build script but overall I have no real preference either way. Thanks for your contributions, I'll wait for @ellie to take a look |
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.
Fantastic, thank you! I'm happy with this. I agree with @orhun, it's up to the distro/end user to handle sorting the installation of the completion files, I think it's out of scope for something we should be thinking about
How can I output the completion to stdout? |
You could generate them into a local or a temp dir, then |
closes #232