Skip to content

Commit

Permalink
Add zsh autocompletion to subcommand metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Knight authored and Knight committed Jun 5, 2016
1 parent c3ba834 commit c7e2986
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/etc/_cargo
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ _arguments \

case $state in
args)
#TODO: add path completion to manifest-path options
case $words[1] in
bench)
_arguments \
Expand Down Expand Up @@ -160,6 +159,19 @@ case $state in
'--color=:colorization option:(auto always never)' \
;;

metadata)
_arguments \
'(-h, --help)'{-h,--help}'[show help message]' \
'(-q, --quiet)'{-q,--quiet}'[no output printed to stdout]' \
'(-v, --verbose)'{-v,--verbose}'[use verbose output]' \
"--no-deps[output information only about the root package and don't fetch dependencies]" \
'--no-default-features[do not include the default feature]' \
'--manifest-path=[path to manifest]: :_files -/' \
'--features=[space separated feature list]' \
'--format-version=[format version(default: 1)]' \
'--color=:colorization option:(auto always never)' \
;;

new)
_arguments \
'--bin[use binary template]' \
Expand Down Expand Up @@ -373,6 +385,7 @@ local -a commands;commands=(
'install:install a Rust binary'
'locate-project:print "Cargo.toml" location'
'login:login to remote server'
'metadata:the metadata for a project in json'
'new:create a new project'
'owner:manage the owners of a crate on the registry'
'package:assemble local package into a distributable tarball'
Expand Down

0 comments on commit c7e2986

Please sign in to comment.