mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-20 04:28:06 +00:00
bash: recognize attributed prompt command arrays
Bash includes additional variable attributes in declare output, so an exported indexed array is reported with an -ax prefix instead of -a. Match the indexed-array prefix without requiring a following space so these values continue through the array-preserving path.
This commit is contained in:
@@ -255,7 +255,7 @@ if (( BASH_VERSINFO[0] > 4 || (BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] >= 4) )
|
||||
else
|
||||
PROMPT_COMMAND="__ghostty_hook 2>/dev/null"
|
||||
fi
|
||||
elif [[ $(builtin declare -p PROMPT_COMMAND 2>/dev/null) == "declare -a "* ]]; then
|
||||
elif [[ $(builtin declare -p PROMPT_COMMAND 2>/dev/null) == "declare -a"* ]]; then
|
||||
PROMPT_COMMAND+=("__ghostty_hook 2>/dev/null")
|
||||
else
|
||||
[[ "${PROMPT_COMMAND}" =~ (\;[[:space:]]*|$'\n')$ ]] || PROMPT_COMMAND+=";"
|
||||
|
||||
Reference in New Issue
Block a user