mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
chore: Add --all
completion to asdf latest
(#1319)
chore: Add --all completion to `asdf latest`
This commit is contained in:
parent
5334d1db3d
commit
3208e2e75a
@ -170,7 +170,9 @@ case "$subcmd" in
|
||||
;;
|
||||
(latest)
|
||||
if (( CURRENT == 3 + IntermediateCount )); then
|
||||
_asdf__installed_plugins
|
||||
_alternative \
|
||||
'all:all:(--all)' \
|
||||
'asdf-available-plugins:Installed ASDF Plugins:_asdf__installed_plugins'
|
||||
elif (( CURRENT == 4 + IntermediateCount )); then
|
||||
local pkg="${words[3+IntermediateCount]}"
|
||||
local query=${words[4+IntermediateCount]}
|
||||
|
@ -67,6 +67,10 @@ _asdf() {
|
||||
COMPREPLY=($(compgen -W "$plugins" -- "$cur"))
|
||||
fi
|
||||
;;
|
||||
latest)
|
||||
# shellcheck disable=SC2207
|
||||
COMPREPLY=($(compgen -W "--all" -- "$cur"))
|
||||
;;
|
||||
*)
|
||||
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
|
||||
|
@ -101,6 +101,7 @@ complete -f -c asdf -n '__fish_asdf_using_command which; and __fish_asdf_arg_num
|
||||
# latest completion
|
||||
complete -f -c asdf -n '__fish_asdf_needs_command' -a latest -d "Show latest stable version of a package"
|
||||
complete -f -c asdf -n '__fish_asdf_using_command latest; and __fish_asdf_arg_number 2' -a '(__fish_asdf_plugin_list)'
|
||||
complete -f -c asdf -n '__fish_asdf_using_command latest; and __fish_asdf_arg_number 2' -a --all
|
||||
|
||||
# list completion
|
||||
complete -f -c asdf -n '__fish_asdf_needs_command' -a list -d "List installed versions of a package"
|
||||
|
Loading…
Reference in New Issue
Block a user