-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
- Arguments that need escaping or quoting that aren't handled correctly | ||
- Inaccuracies in the information | ||
- Bugs in parsing of the command-line | ||
- Arguments that don't report their completions | ||
- If a known issue is being problematic | ||
|
||
Feedback can be broken down into | ||
- What completion candidates are reported | ||
- Known issues: [#14520](https://github.com/rust-lang/cargo/issues/14520), [`A-completions`](https://github.com/rust-lang/cargo/labels/A-completions) | ||
- [Report an issue](https://github.com/rust-lang/cargo/issues/new) or [discuss the behavior](https://github.com/rust-lang/cargo/issues/14520) | ||
- Shell integration, command-line parsing, and completion filtering | ||
- Known issues: [clap#3166](https://github.com/clap-rs/clap/issues/3166), [clap's `A-completions`](https://github.com/clap-rs/clap/labels/A-completion) | ||
- [Report an issue](https://github.com/clap-rs/clap/issues/new/choose) or [discuss the behavior](https://github.com/clap-rs/clap/discussions/new/choose) | ||
|
||
When in doubt, you can discuss this in [#14520](https://github.com/rust-lang/cargo/issues/14520) or on [zulip](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo) | ||
|
||
### 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. We don't generally specify that in the unstable documentation. |
||
|
||
- zsh: | ||
Add `source <(CARGO_COMPLETE=zsh cargo)` to your .zshrc. | ||
Add `source <(CARGO_COMPLETE=zsh cargo +nightly)` to your .zshrc. | ||
|
||
- fish: | ||
Add `source (CARGO_COMPLETE=fish cargo | psub)` to `$XDG_CONFIG_HOME/fish/completions/cargo.fish` | ||
Add `source (CARGO_COMPLETE=fish cargo +nightly | psub)` to `$XDG_CONFIG_HOME/fish/completions/cargo.fish` | ||
|
||
- elvish: | ||
Add `eval (E:CARGO_COMPLETE=elvish cargo | slurp)` to `$XDG_CONFIG_HOME/elvish/rc.elv` | ||
Add `eval (E:CARGO_COMPLETE=elvish cargo +nightly | slurp)` to `$XDG_CONFIG_HOME/elvish/rc.elv` | ||
|
||
- powershell: | ||
Add `CARGO_COMPLETE=powershell cargo | Invoke-Expression` to `$PROFILE`. | ||
Add `CARGO_COMPLETE=powershell cargo +nightly | Invoke-Expression` to `$PROFILE`. | ||
|
||
# Stabilized and removed features | ||
|
||
|
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.
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.