-
Notifications
You must be signed in to change notification settings - Fork 2.6k
doc: Update instructions on using native-completions #15480
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
Conversation
`~/.local/share/bash-completion/completions/cargo` is more sensible, and [recommended by rustup](https://github.com/rust-lang/rustup/blob/e4f3ad6f893e56ca10f0a329c401a5eafab69607/src/cli/help.rs#L275).
I'm not too familiar with how the different completion locations are loaded. So you are saying the following source <(CARGO_COMPLETE=bash cargo +nightly) Have you tested this? Its important to note that we are not telling people to $ CARGO_COMPLETE=bash cargo +nightly > ~/.local/share/bash-completion/completions/cargo And speaking of rustup, why does it have you append to the file? That seems bad if the person forgets and does it again |
Hmm, looking into that documentation in rustup, it is to conform to https://github.com/scop/bash-completion/blob/main/README.md My question would then be how often is that installed and used? |
I've tested it on Ubuntu 24.04.2 LTS, with |
Regarding that they used |
That is not very extensive when we expect this to be used on many different types of systems. In particular, I'm wondering about how often |
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 is good!
Sorry, there was a miscommunication between us on where we were at on this PR and I've posted #15512 to revert it. |
This reverts commit 15a7672. ### What does this PR try to resolve? There was a miscommunication about some outstanding concerns with #15480 and it got merged before we were ready. Specifically - How important is this for unstable docs? - How universal is the use of `bash-completions` and what should we do for people who don't have it? - How likely is someone to catch that they don't have `XDG_DATA_HOME` set and get tripped up over this documentation - Should we be aligned with upstream clap? ### How should we test and review this PR? ### Additional information
Update cargo 25 commits in 7918c7eb59614c39f1c4e27e99d557720976bdd7..056f5f4f3c100cb36b5e9aed2d20b9ea70aae295 2025-04-27 09:44:23 +0000 to 2025-05-09 14:54:18 +0000 - Revert "doc: Mention `XDG_DATA_HOME`" (rust-lang/cargo#15512) - docs: update version notice for deprecation removal (rust-lang/cargo#15511) - doc: Update instructions on using native-completions (rust-lang/cargo#15480) - feat(network): use Retry-After header for HTTP 429 responses (rust-lang/cargo#15463) - CI: Require schema job to pass (rust-lang/cargo#15504) - chore(config): migrate renovate config (rust-lang/cargo#15501) - Make cargo script ignore workspaces (rust-lang/cargo#15496) - fix(rustc): Don't panic on unknown bins (rust-lang/cargo#15497) - test: Remove unused nightly requirements (rust-lang/cargo#15498) - Add support for `-Zembed-metadata` (rust-lang/cargo#15378) - Fix tracking issue template link (rust-lang/cargo#15494) - Refactor artifact deps in FeatureResolver::deps (rust-lang/cargo#15492) - Improved error message for versions prefixed with `v` (rust-lang/cargo#15484) - chore: fix some typos in comment (rust-lang/cargo#15485) - fix: default to all targets when using `--edition` and ` --edition-idioms` in cargo fix (rust-lang/cargo#15192) - Update fingerprint footnote (rust-lang/cargo#15478) - feat(add): suggest similarly named features (rust-lang/cargo#15438) - In package-workspace, keep dev-dependencies if they have a version (rust-lang/cargo#15470) - docs: fix a typo in DependencyUI (rust-lang/cargo#15472) - fix grammar, and remove confusing example (rust-lang/cargo#15457) - Added tracing spans for rustc invocations (rust-lang/cargo#15464) - Trivial tweaks to 'target_short_hash' (rust-lang/cargo#15461) - chore(deps): update msrv (3 versions) to v1.84 (rust-lang/cargo#15456) - feat(add/install): check if given crate argument would be valid with inserted @ symbol (rust-lang/cargo#15441) - chang 1 tries to 1 try (rust-lang/cargo#15328) r? ghost
~/.local/share/bash-completion/completions/cargo
is more sensible, and recommended by rustup.