mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
feat(completions): bash improvements (#1329)
* fix(completions): bash `list` and `list-all` version completions * feat(completions): add bash `help` one * feat(completions): add bash `which` one * feat(completions): add bash `plugin-list/-all`, `info` non-completions
This commit is contained in:
parent
cd31d57a94
commit
7c802c3fc9
@ -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"))
|
||||
;;
|
||||
@ -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)
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user