Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(completions): bash improvements #1329

Merged
merged 4 commits into from
Oct 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions completions/asdf.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ _asdf() {
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "$plugins --all" -- "$cur"))
;;
plugin-remove | current | list | list-all)
plugin-remove | current)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "$plugins" -- "$cur"))
;;
Expand All @@ -29,7 +29,7 @@ _asdf() {
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "$available_plugins" -- "$cur"))
;;
install)
install | list | list-all | help)
if [[ "$plugins" == *"$prev"* ]]; then
local versions
versions=$(asdf list-all "$prev" 2>/dev/null)
Expand Down Expand Up @@ -71,6 +71,11 @@ _asdf() {
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "--all" -- "$cur"))
;;
which)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -c -- "$cur"))
;;
plugin-list | plugin-list-all | info) ;;
*)
local cmds='current global help install list list-all local plugin-add plugin-list plugin-list-all plugin-remove plugin-update reshim shell uninstall update where which info'
# shellcheck disable=SC2207
Expand Down