Skip to content

Commit ba07215

Browse files
committed
docs: add completions for bash and zsh
1 parent 24ef77a commit ba07215

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/etc/_cargo

+5
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ _cargo() {
163163
help)
164164
_cargo_cmds
165165
;;
166+
info)
167+
_arguments -s -A "^--" $common $registry \
168+
'--index=[specify registry index]:index' \
169+
'*: :_guard "^-*" "crate"'
170+
;;
166171

167172
init)
168173
_arguments -s -S $common $registry \

src/etc/cargo.bashcomp.sh

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ _cargo()
6363
local opt__fix="$opt_common $opt_pkg_spec $opt_feat $opt_mani $opt_parallel $opt_targets $opt_lock --release --target --message-format --broken-code --edition --edition-idioms --allow-no-vcs --allow-dirty --allow-staged --profile --target-dir --ignore-rust-version"
6464
local opt__generate_lockfile="$opt_common $opt_mani $opt_lock"
6565
local opt__help="$opt_help"
66+
local opt__info="$opt_common $opt_lock --registry --index"
6667
local opt__init="$opt_common $opt_lock --bin --lib --name --vcs --edition --registry"
6768
local opt__install="$opt_common $opt_feat $opt_parallel $opt_lock $opt_force --bin --bins --branch --debug --example --examples --git --list --path --rev --root --tag --version --registry --target --profile --no-track --ignore-rust-version"
6869
local opt__locate_project="$opt_common $opt_mani $opt_lock --message-format --workspace"

0 commit comments

Comments
 (0)