From 45523c23dadf4721aa7b69ba2e25f36e499a8a87 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sun, 7 Jun 2020 15:09:47 -0700 Subject: [PATCH] Fix tree completions. --- src/etc/_cargo | 13 +++++-------- src/etc/cargo.bashcomp.sh | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/etc/_cargo b/src/etc/_cargo index ce257ab0bdb..f906d149168 100644 --- a/src/etc/_cargo +++ b/src/etc/_cargo @@ -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) diff --git a/src/etc/cargo.bashcomp.sh b/src/etc/cargo.bashcomp.sh index e7f0af04093..aa6626f1114 100644 --- a/src/etc/cargo.bashcomp.sh +++ b/src/etc/cargo.bashcomp.sh @@ -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"