-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add completion for cargo. #1717
Conversation
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 for your contribution! I've left some comments for things to change.
My last question is if this is your own creation or copied from an upstream source? If you have copied it, could you please include a comment at the top of the file linking to the original source and giving them credit.
Thanks!
ShellCheck reports SC2207 warnings but this seems to lead to cumbersome "while read line" statements to fix them. |
@NariyasuHeseri I am not convinced that copying completion files is the correct solution here.. seems like rust-lang/rustup#1646 caused |
I have finnaly figured out eval "$(rustup completions bash cargo)" can be used to add completion for cargo. |
@NariyasuHeseri Oh good digging! If you feel like re-opening this PR, what you found would be great to codify. Something like... if _command_exists rustup ; then
eval "$(rustup completions bash cargo)"
fi Otherwise I might get around to it when I start playing with rust. Thanks again! |
I have opened a new PR adding these lines in cargo.completion.bash (to make commit histories cleaner). |
No description provided.