Skip to content

Commit 5eb53f7

Browse files
committed
Auto merge of #8342 - ehuss:fix-tree-completions, r=alexcrichton
Fix tree completions. During #8062, the flags were changed, but the completions weren't updated. Fixes #8330
2 parents 22a112b + 45523c2 commit 5eb53f7

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/etc/_cargo

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,16 +274,13 @@ _cargo() {
274274
tree)
275275
_arguments -s -S $common $features $triple $manifest \
276276
'(-p --package)'{-p+,--package=}'[package to use as the root]:package:_cargo_package_names' \
277-
'--no-filter-targets[return dependencies for all targets]' \
278-
'--no-dev-dependencies[skip dev dependencies]' \
279-
'(-i --invert)'{-i,--invert}'[invert the tree]' \
280-
'--no-indent[display as a list]' \
281-
'--prefix-depth[display as a list with numeric depth]' \
277+
'(-i --invert)'{-i+,--invert=}'[invert the tree for the given package]:package:_cargo_package_names' \
278+
'--prefix=[line prefix]:prefix:(depth indent none)' \
282279
'--no-dedupe[repeat shared dependencies]' \
283280
'(-d --duplicates)'{-d,--duplicates}'[packages with multiple versions]' \
284-
'--charset=[utf8 or ascii]' \
285-
'(-f --format)'{-f,--format=}'[format string]' \
286-
'--graph-features[show features]' \
281+
'--charset=[utf8 or ascii]:charset:(utf8 ascii)' \
282+
'(-f --format)'{-f,--format=}'[format string]:format' \
283+
'(-e --edges)'{-e,--edges=}'[edge kinds]:kind:(features normal build dev all no-dev no-build no-normal)' \
287284
;;
288285

289286
uninstall)

src/etc/cargo.bashcomp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ _cargo()
7373
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"
7474
local opt__search="$opt_common $opt_lock --limit --index --registry"
7575
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"
76-
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"
76+
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"
7777
local opt__uninstall="$opt_common $opt_lock $opt_pkg --bin --root"
7878
local opt__update="$opt_common $opt_mani $opt_lock $opt_pkg --aggressive --precise --dry-run"
7979
local opt__vendor="$opt_common $opt_mani $opt_lock $opt_sync --no-delete --respect-source-config --versioned-dirs"

0 commit comments

Comments
 (0)