From 9101762dd4e08c5f47df55c391449b19032c9f5b Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 18 Sep 2024 09:00:19 -0500 Subject: [PATCH 1/2] docs(unstable): Make sure completion users know of +nightly --- src/doc/src/reference/unstable.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/doc/src/reference/unstable.md b/src/doc/src/reference/unstable.md index ce985b41039..af616b77494 100644 --- a/src/doc/src/reference/unstable.md +++ b/src/doc/src/reference/unstable.md @@ -1697,19 +1697,19 @@ nightly channel, without requiring additional `-Z` options. ### 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. - 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 From 9a658f9407ddbed45d2283bb0f0876caeec9330e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 18 Sep 2024 09:08:33 -0500 Subject: [PATCH 2/2] docs(unstable): Add completion feedback information --- src/doc/src/reference/unstable.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/doc/src/reference/unstable.md b/src/doc/src/reference/unstable.md index af616b77494..0dc370cc7c7 100644 --- a/src/doc/src/reference/unstable.md +++ b/src/doc/src/reference/unstable.md @@ -1695,6 +1695,23 @@ 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 +nightly)` to your .bashrc.