-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
docs(unstable): Expand on completion documentation #14563
Conversation
r? @weihanglo rustbot has assigned @weihanglo. Use |
### How to use native-completions feature: | ||
- bash: | ||
Add `source <(CARGO_COMPLETE=bash cargo)` to your .bashrc. | ||
Add `source <(CARGO_COMPLETE=bash cargo +nightly)` to your .bashrc. |
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.
Do we need to specify the minimal nightly version here? Because if users are using the old nightly version, it doesn't work.
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.
We don't generally specify that in the unstable documentation.
@@ -1695,21 +1695,38 @@ This feature moves the handwritten completion scripts to Rust native, making it | |||
easier for us to add, extend and test new completions. This feature is enabled with the | |||
nightly channel, without requiring additional `-Z` options. | |||
|
|||
Areas of particular interest for feedback |
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.
We don't really document the feedback process for other unstable features. Why do we decide to do it here?
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.
- Most of this feature lives outside of the cargo's repo so usual processes will likely add more friction
- There are enough corner cases with this that I want to be very cautious in saying this is good enough to replace the existing completions so I need to depend more on broad feedback than we typically do
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.
Fair enough. We might also want a copy of this process in the tracking issue.
@bors r+ Thanks! |
☀️ Test successful - checks-actions |
Update cargo 16 commits in a9a418d1a22f29e7dfd034e3b93f15657e608a29..eaee77dc1584be45949b75e4c4c9a841605e3a4b 2024-09-15 19:13:12 +0000 to 2024-09-19 21:10:23 +0000 - fix(complete): Harden `--target` completions (rust-lang/cargo#14564) - Cleanup duplicated check-cfg lint logic (rust-lang/cargo#14567) - Revert "remove reference to incomplete crates.io feature from docs" (rust-lang/cargo#14562) - feat: Add custom completer for `cargo help <TAB>` (rust-lang/cargo#14557) - docs(unstable): Expand on completion documentation (rust-lang/cargo#14563) - feat: Add custom completer for `cargo build --example=<TAB>` (rust-lang/cargo#14531) - remove reference to incomplete crates.io feature from docs (rust-lang/cargo#14561) - fix(complete): Fix problems on my machine (rust-lang/cargo#14558) - feat: Add custom completer for completing benchmark names (rust-lang/cargo#14532) - refactor(info): Use the `shell.note` to print the note (rust-lang/cargo#14554) - feat: Add custom completer for completing test names (rust-lang/cargo#14548) - Suggest `cargo info` command in the `cargo search` result (rust-lang/cargo#14537) - feat: Add custom completer for completing target triple (rust-lang/cargo#14535) - feat: Add custom completer for `cargo -Z <TAB>` (rust-lang/cargo#14536) - feat: Add custom completer for completing installed binaries (rust-lang/cargo#14534) - feat: Add custom completer for completing bin names (rust-lang/cargo#14533) r? ghost
Update cargo 16 commits in a9a418d1a22f29e7dfd034e3b93f15657e608a29..eaee77dc1584be45949b75e4c4c9a841605e3a4b 2024-09-15 19:13:12 +0000 to 2024-09-19 21:10:23 +0000 - fix(complete): Harden `--target` completions (rust-lang/cargo#14564) - Cleanup duplicated check-cfg lint logic (rust-lang/cargo#14567) - Revert "remove reference to incomplete crates.io feature from docs" (rust-lang/cargo#14562) - feat: Add custom completer for `cargo help <TAB>` (rust-lang/cargo#14557) - docs(unstable): Expand on completion documentation (rust-lang/cargo#14563) - feat: Add custom completer for `cargo build --example=<TAB>` (rust-lang/cargo#14531) - remove reference to incomplete crates.io feature from docs (rust-lang/cargo#14561) - fix(complete): Fix problems on my machine (rust-lang/cargo#14558) - feat: Add custom completer for completing benchmark names (rust-lang/cargo#14532) - refactor(info): Use the `shell.note` to print the note (rust-lang/cargo#14554) - feat: Add custom completer for completing test names (rust-lang/cargo#14548) - Suggest `cargo info` command in the `cargo search` result (rust-lang/cargo#14537) - feat: Add custom completer for completing target triple (rust-lang/cargo#14535) - feat: Add custom completer for `cargo -Z <TAB>` (rust-lang/cargo#14536) - feat: Add custom completer for completing installed binaries (rust-lang/cargo#14534) - feat: Add custom completer for completing bin names (rust-lang/cargo#14533) r? ghost
What does this PR try to resolve?
Wanting to improve the workflow for people testing completions
How should we test and review this PR?
Additional information