Skip to content

Commit f4f977f

Browse files
authored
fix: Update bash and zsh Autocompletion Documents to add -m (rust-lang#16888)
### What does this PR try to resolve? - Act on [this request](rust-lang#16858 (comment)) in rust-lang#16858 - `-m` is short for `--manifest-path`, and must be added in places where `--manifest-path` could be accepted. ### How to test and review this PR? - Use `zsh`, `bash`, or any other shell where Cargo provides autocomplete support, and ensure `-m` has identical behaviour to `--manifest-path` ### Notes - I've never worked on these autocomplete documents before, so I'm assuming the modifications I've made are correct based on existing instances of shorthand (e.g., `-F`) - ~~Creating as a draft until rust-lang#16858 is merged (which should be very soon).~~ - No AI tooling of any kind was used during the creation of this PR.
2 parents 0bcac2e + 10dc107 commit f4f977f

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/etc/_cargo

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,13 @@ _cargo() {
6161
"--no-default-features[don't build the default features]"
6262
)
6363

64+
manifest=(
65+
'(-m --manifest-path)'{-m+,--manifest-path=}'[specify path to manifest]:path:_directories'
66+
)
67+
6468
msgfmt='--message-format=[specify error format]:error format [human]:(human json short)'
6569
triple='--target=[specify target triple]:target triple:_cargo_target_triple'
6670
target='--target-dir=[specify directory for all generated artifacts]:directory:_directories'
67-
manifest='--manifest-path=[specify path to manifest]:path:_directories'
6871
registry='--registry=[specify registry to use]:registry'
6972

7073
case $state in

src/etc/cargo.bashcomp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ _cargo()
4848
local opt_pkg_spec='-p --package --all --exclude --workspace'
4949
local opt_pkg='-p --package'
5050
local opt_feat='-F --features --all-features --no-default-features'
51-
local opt_mani='--manifest-path'
51+
local opt_mani='-m --manifest-path'
5252
local opt_jobs='-j --jobs'
5353
local opt_parallel="$opt_jobs --keep-going"
5454
local opt_force='-f --force'

0 commit comments

Comments
 (0)