From ce80f207b609f251515ba0889844cd694ed6f820 Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Fri, 13 Dec 2024 06:32:05 -0600 Subject: [PATCH] fix: bash completion escape Fixes https://github.com/jdx/mise/issues/3512 --- cli/assets/completions/usage.bash | 2 +- lib/src/complete/bash.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/assets/completions/usage.bash b/cli/assets/completions/usage.bash index ea9e54b..75c84e9 100644 --- a/cli/assets/completions/usage.bash +++ b/cli/assets/completions/usage.bash @@ -3489,7 +3489,7 @@ _usage() { local cur prev words cword was_split comp_args _comp_initialize -n : -- "$@" || return # shellcheck disable=SC2207 - _comp_compgen -- -W "$(usage complete-word --shell bash -s "${spec_variable}" --cword="$cword" -- "${words[@]}")" + _comp_compgen -- -W "$(usage complete-word --shell bash -s "${_usage_spec_usage}" --cword="$cword" -- "${words[@]}")" _comp_ltrim_colon_completions "$cur" # shellcheck disable=SC2181 if [[ $? -ne 0 ]]; then diff --git a/lib/src/complete/bash.rs b/lib/src/complete/bash.rs index 1e887fd..4e4523e 100644 --- a/lib/src/complete/bash.rs +++ b/lib/src/complete/bash.rs @@ -46,7 +46,7 @@ __USAGE_EOF__"#, local cur prev words cword was_split comp_args _comp_initialize -n : -- "$@" || return # shellcheck disable=SC2207 - _comp_compgen -- -W "$(usage complete-word --shell bash -s "${{spec_variable}}" --cword="$cword" -- "${{words[@]}}")" + _comp_compgen -- -W "$(usage complete-word --shell bash -s "${{{spec_variable}}}" --cword="$cword" -- "${{words[@]}}")" _comp_ltrim_colon_completions "$cur" # shellcheck disable=SC2181 if [[ $? -ne 0 ]]; then