From a342718e7d8349decc434e10caa174b6f931bf4c Mon Sep 17 00:00:00 2001 From: carschandler <92899389+carschandler@users.noreply.github.com> Date: Wed, 4 Feb 2026 20:54:37 -0600 Subject: [PATCH] fix(completions): undefined variable leading to bash completion errors Fixes https://github.com/oven-sh/bun/issues/24847 Not sure what the original intent of this undefined script was but I'd rather have a working version than try to fix it --- completions/bun.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/completions/bun.bash b/completions/bun.bash index eabdc343fb4a..c31f72eebe67 100644 --- a/completions/bun.bash +++ b/completions/bun.bash @@ -56,8 +56,7 @@ _read_scripts_in_package_json() { # when a script is passed as an option, do not show other scripts as part of the completion anymore local re_prev_script="(^| )${prev}($| )"; [[ - ( "${COMPREPLY[*]}" =~ ${re_prev_script} && -n "${COMP_WORDS[2]}" ) || \ - ( "${COMPREPLY[*]}" =~ ${re_comp_word_script} ) + ( "${COMPREPLY[*]}" =~ ${re_prev_script} && -n "${COMP_WORDS[2]}" ) ]] && { local re_script=$(echo ${package_json_compreply[@]} | sed 's/[^ ]*/(&)/g'); local new_reply=$(echo "${COMPREPLY[@]}" | sed -E "s/$re_script//");