Skip to content

Commit

Permalink
Fix tree completions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jun 7, 2020
1 parent fb0e392 commit 45523c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions src/etc/_cargo
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,13 @@ _cargo() {
tree)
_arguments -s -S $common $features $triple $manifest \
'(-p --package)'{-p+,--package=}'[package to use as the root]:package:_cargo_package_names' \
'--no-filter-targets[return dependencies for all targets]' \
'--no-dev-dependencies[skip dev dependencies]' \
'(-i --invert)'{-i,--invert}'[invert the tree]' \
'--no-indent[display as a list]' \
'--prefix-depth[display as a list with numeric depth]' \
'(-i --invert)'{-i+,--invert=}'[invert the tree for the given package]:package:_cargo_package_names' \
'--prefix=[line prefix]:prefix:(depth indent none)' \
'--no-dedupe[repeat shared dependencies]' \
'(-d --duplicates)'{-d,--duplicates}'[packages with multiple versions]' \
'--charset=[utf8 or ascii]' \
'(-f --format)'{-f,--format=}'[format string]' \
'--graph-features[show features]' \
'--charset=[utf8 or ascii]:charset:(utf8 ascii)' \
'(-f --format)'{-f,--format=}'[format string]:format' \
'(-e --edges)'{-e,--edges=}'[edge kinds]:kind:(features normal build dev all no-dev no-build no-normal)' \
;;

uninstall)
Expand Down
2 changes: 1 addition & 1 deletion src/etc/cargo.bashcomp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ _cargo()
local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_targets --message-format --target --release --open --target-dir --profile"
local opt__search="$opt_common $opt_lock --limit --index --registry"
local opt__test="$opt_common $opt_pkg_spec $opt_feat $opt_mani $opt_lock $opt_jobs $opt_targets --message-format --doc --target --no-run --release --no-fail-fast --target-dir --profile"
local opt__tree="$opt_common $opt_pkg_spec $opt_feat $opt_mani $opt_lock --target --no-filter-targets --no-dev-dependencies -i --invert --no-indent --prefix-depth --no-dedupe --duplicates -d --charset -f --format --graph-features"
local opt__tree="$opt_common $opt_pkg_spec $opt_feat $opt_mani $opt_lock --target -i --invert --prefix --no-dedupe --duplicates -d --charset -f --format -e --edges"
local opt__uninstall="$opt_common $opt_lock $opt_pkg --bin --root"
local opt__update="$opt_common $opt_mani $opt_lock $opt_pkg --aggressive --precise --dry-run"
local opt__vendor="$opt_common $opt_mani $opt_lock $opt_sync --no-delete --respect-source-config --versioned-dirs"
Expand Down

0 comments on commit 45523c2

Please sign in to comment.