Skip to content

Commit 9766342

Browse files
committed
Fix zsh completions for add and locate-project
The zsh tab-completion script had missing line continuations which would cause `command not found:` errors when trying to complete the `cargo add` or `cargo locate-project` subcommands.
1 parent 542ba27 commit 9766342

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/etc/_cargo

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,16 @@ _cargo() {
6868
case ${words[1]} in
6969
add)
7070
_arguments -s -A "^--" $common $manifest $registry \
71-
{-F+,--features=}'[specify features to activate]:feature'
72-
"--default-features[enable the default features]"
73-
"--no-default-features[don't enable the default features]"
74-
"--optional[mark the dependency as optional]"
75-
"--no-optional[mark the dependency as required]"
76-
"--dev[add as a dev dependency]"
77-
"--build[add as a build dependency]"
78-
"--target=[add as a dependency to the given target platform]"
79-
"--rename=[rename the dependency]"
80-
"--dry-run[don't actually write the manifest]"
71+
{-F+,--features=}'[specify features to activate]:feature' \
72+
"--default-features[enable the default features]" \
73+
"--no-default-features[don't enable the default features]" \
74+
"--optional[mark the dependency as optional]" \
75+
"--no-optional[mark the dependency as required]" \
76+
"--dev[add as a dev dependency]" \
77+
"--build[add as a build dependency]" \
78+
"--target=[add as a dependency to the given target platform]" \
79+
"--rename=[rename the dependency]" \
80+
"--dry-run[don't actually write the manifest]" \
8181
'--branch=[branch to use when adding from git]:branch' \
8282
'--git=[specify URL from which to add the crate]:url:_urls' \
8383
'--path=[local filesystem path to crate to add]: :_directories' \
@@ -182,7 +182,7 @@ _cargo() {
182182

183183
locate-project)
184184
_arguments -s -S $common $manifest \
185-
'--message-format=[specify output representation]:output representation [json]:(json plain)'
185+
'--message-format=[specify output representation]:output representation [json]:(json plain)' \
186186
'--workspace[locate Cargo.toml of the workspace root]'
187187
;;
188188

0 commit comments

Comments
 (0)