Skip to content

Commit

Permalink
fix(completions): Only match whole plugin names in Bash completions
Browse files Browse the repository at this point in the history
  • Loading branch information
benblank committed Jul 28, 2024
1 parent ccdd47d commit 311a40e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions completions/asdf.bash
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ _asdf() {
COMPREPLY=($(compgen -W "$available_plugins" -- "$cur"))
;;
install | list | list-all | help)
if [[ "$plugins" == *"$prev"* ]]; then
if [[ " $plugins " == *" $prev "* ]]; then
local versions
versions=$(asdf list-all "$prev" 2>/dev/null)
# shellcheck disable=SC2207
Expand All @@ -54,7 +54,7 @@ _asdf() {
COMPREPLY=($(compgen -W "--head" -- "$cur"))
;;
uninstall | where | reshim)
if [[ "$plugins" == *"$prev"* ]]; then
if [[ " $plugins " == *" $prev "* ]]; then
local versions
versions=$(asdf list "$prev" 2>/dev/null)
# shellcheck disable=SC2207
Expand All @@ -65,7 +65,7 @@ _asdf() {
fi
;;
local | global | shell)
if [[ "$plugins" == *"$prev"* ]]; then
if [[ " $plugins " == *" $prev "* ]]; then
local versions
versions=$(asdf list "$prev" 2>/dev/null)
versions+=" system"
Expand Down

0 comments on commit 311a40e

Please sign in to comment.