-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Bash completion #372
Bash completion #372
Conversation
/cc @mcasper I think we should give a command to generate at runtime since users won't have access to the files in build.rs |
i'm pretty new to rust. is there no way for e.g. |
AFAIK cargo install only installs the binary. There is rust-lang/cargo#2729 open requesting to install other files. While I would like to have this, I'd probably just (a) want to use a system package manager (brew, apt; long term thing) or (b) install diesel-cli myself from the repository (short term and while developing diesel itself of course). |
as a user of diesel (and by definition a rust developer), thoughts on such an api? might it be possible for the |
Bash completion | ||
--------------- | ||
|
||
Diesel can generate a bash completion script for the itself: |
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.
probably: s/for the itself/for the CLI
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.
yup. thanks
827507b
to
9fe8ccd
Compare
don't love |
looks like rustup failed on one of the travis jobs. think you need more access than i have to re-trigger the build |
9fe8ccd
to
cccbd91
Compare
clap can now generate completions to a string; no need for codegen |
just to follow up on this. if this feature isn't suitable for this project, please let me know and i'll close the pr. if this is interesting, but there are issues with the implementation, i'll happily work with you to fix/improve |
Sorry for the long absence, I think I agree that this is the best approach we can support within Diesel right now. Maybe shorten the command name to just Also, looks like there are some conflicts to deal with now :/ |
cccbd91
to
4c5e8ba
Compare
no worries. command shortened and commits rebased+squashed |
Thanks. I manually merged this in 17326dd. There were some style issues that needed to be addressed which I did by amending your commit to avoid git churn. As such Github won't automatically pick up on me merging it, but it has been accepted. Thank you for working on this. |
thanks! |
clap can now generate bash completion. not sure what the best way to ship this is, but at least we can generate them