mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 09:38:16 -07:00
Merge pull request #278 from kennyp/patch-1 Update Bash Completions
This commit is contained in:
commit
7d9e54643f
@ -25,6 +25,12 @@ _asdf () {
|
||||
# shellcheck disable=SC2207
|
||||
COMPREPLY=($(compgen -W "$plugins" -- "$cur"))
|
||||
;;
|
||||
plugin-add)
|
||||
local available_plugins
|
||||
available_plugins=$( (asdf plugin-list && asdf plugin-list-all) | sort | uniq -u)
|
||||
# shellcheck disable=SC2207
|
||||
COMPREPLY=($(compgen -W "$available_plugins" -- "$cur"))
|
||||
;;
|
||||
install)
|
||||
if [[ "$plugins" == *"$prev"* ]] ; then
|
||||
local versions
|
||||
@ -36,6 +42,10 @@ _asdf () {
|
||||
COMPREPLY=($(compgen -W "$plugins" -- "$cur"))
|
||||
fi
|
||||
;;
|
||||
update)
|
||||
# shellcheck disable=SC2207
|
||||
COMPREPLY=($(compgen -W "--head" -- "$cur"))
|
||||
;;
|
||||
uninstall|where|reshim|local|global)
|
||||
if [[ "$plugins" == *"$prev"* ]] ; then
|
||||
local versions
|
||||
@ -48,7 +58,7 @@ _asdf () {
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
local cmds='plugin-add plugin-list plugin-remove plugin-update install uninstall update current where which list list-all local global reshim'
|
||||
local cmds='current global help install list list-all local plugin-add plugin-list plugin-list-all plugin-remove plugin-update reshim uninstall update where which '
|
||||
# shellcheck disable=SC2207
|
||||
COMPREPLY=($(compgen -W "$cmds" -- "$cur"))
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user