fix(completions): Remove asterisk from versions in Bash completions

This commit is contained in:
Ben Blank 2024-07-28 11:05:44 -07:00
parent 311a40e6b8
commit 613862538c
No known key found for this signature in database
GPG Key ID: 4FDD76C901E801B2

View File

@ -56,7 +56,8 @@ _asdf() {
uninstall | where | reshim)
if [[ " $plugins " == *" $prev "* ]]; then
local versions
versions=$(asdf list "$prev" 2>/dev/null)
# The first two columns are either blank or contain the "current" marker.
versions=$(asdf list "$prev" 2>/dev/null | colrm 1 2)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "$versions" -- "$cur"))
else
@ -67,7 +68,8 @@ _asdf() {
local | global | shell)
if [[ " $plugins " == *" $prev "* ]]; then
local versions
versions=$(asdf list "$prev" 2>/dev/null)
# The first two columns are either blank or contain the "current" marker.
versions=$(asdf list "$prev" 2>/dev/null | colrm 1 2)
versions+=" system"
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "$versions" -- "$cur"))