Skip to content

Commit

Permalink
docs: add completions for bash and zsh
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustin170506 committed Aug 10, 2024
1 parent ef83de6 commit a4c7dfc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/etc/_cargo
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ _cargo() {
help)
_cargo_cmds
;;
info)
_arguments -s -A "^--" $common $registry \
'--index=[specify registry index]:index' \
'*: :_guard "^-*" "crate"'
;;

init)
_arguments -s -S $common $registry \
Expand Down
1 change: 1 addition & 0 deletions src/etc/cargo.bashcomp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ _cargo()
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"
local opt__generate_lockfile="$opt_common $opt_mani $opt_lock"
local opt__help="$opt_help"
local opt__info="$opt_common $opt_lock --registry --index"
local opt__init="$opt_common $opt_lock --bin --lib --name --vcs --edition --registry"
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"
local opt__locate_project="$opt_common $opt_mani $opt_lock --message-format --workspace"
Expand Down

0 comments on commit a4c7dfc

Please sign in to comment.