From 9766342120c68a0152a92068b97b8be789df4143 Mon Sep 17 00:00:00 2001 From: Diomendius <42310725+Diomendius@users.noreply.github.com> Date: Fri, 1 Jul 2022 05:02:00 +0000 Subject: [PATCH] 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. --- src/etc/_cargo | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/etc/_cargo b/src/etc/_cargo index c3f98ce3865..dec4a5965ea 100644 --- a/src/etc/_cargo +++ b/src/etc/_cargo @@ -68,16 +68,16 @@ _cargo() { case ${words[1]} in add) _arguments -s -A "^--" $common $manifest $registry \ - {-F+,--features=}'[specify features to activate]:feature' - "--default-features[enable the default features]" - "--no-default-features[don't enable the default features]" - "--optional[mark the dependency as optional]" - "--no-optional[mark the dependency as required]" - "--dev[add as a dev dependency]" - "--build[add as a build dependency]" - "--target=[add as a dependency to the given target platform]" - "--rename=[rename the dependency]" - "--dry-run[don't actually write the manifest]" + {-F+,--features=}'[specify features to activate]:feature' \ + "--default-features[enable the default features]" \ + "--no-default-features[don't enable the default features]" \ + "--optional[mark the dependency as optional]" \ + "--no-optional[mark the dependency as required]" \ + "--dev[add as a dev dependency]" \ + "--build[add as a build dependency]" \ + "--target=[add as a dependency to the given target platform]" \ + "--rename=[rename the dependency]" \ + "--dry-run[don't actually write the manifest]" \ '--branch=[branch to use when adding from git]:branch' \ '--git=[specify URL from which to add the crate]:url:_urls' \ '--path=[local filesystem path to crate to add]: :_directories' \ @@ -182,7 +182,7 @@ _cargo() { locate-project) _arguments -s -S $common $manifest \ - '--message-format=[specify output representation]:output representation [json]:(json plain)' + '--message-format=[specify output representation]:output representation [json]:(json plain)' \ '--workspace[locate Cargo.toml of the workspace root]' ;;