test: update generated Bash prompt readiness contract

This commit is contained in:
Neil
2026-09-04 16:27:42 -07:00
parent 1c766876f0
commit 2c87a39ae3
2 changed files with 6 additions and 4 deletions
@@ -127,10 +127,6 @@ __orca_osc133_precmd() {
unset __orca_in_command
fi
printf "\033]133;A\007"
# Why: emit the shell-ready marker here (not a trailing PROMPT_COMMAND entry)
# so a framework that must be last in PROMPT_COMMAND — bash-preexec — is not
# displaced by one of Orca's own hooks.
[[ -n "$__orca_ready_marker" ]] && printf "\033]777;orca-shell-ready\007"
return "$exit_code"
}
__orca_osc133_preexec() {
@@ -188,6 +184,11 @@ __orca_osc133_epilogue() {
unset __orca_in_prompt_command
__orca_adopt_outer_debug_trap
trap '__orca_osc133_preexec' DEBUG
# Readline renders PS1 after entering raw mode; prompt hooks still run in cooked mode.
if [[ -n "$__orca_ready_marker" ]]; then
PS1="${PS1-}"'\[\e]777;orca-shell-ready\a\]'
__orca_ready_marker=""
fi
}
__orca_normalize_prompt_command_part() {
local __orca_value="$1" __orca_output_name="$2" __orca_character __orca_chunk
@@ -73,6 +73,7 @@ const CONTRACT_GLOBALS = new Set([
'OPENCODE_CONFIG_DIR',
'PATH',
'PROMPT_COMMAND',
'PS1', // Bash appends its non-printing Readline readiness marker.
'CURSOR',
'ZDOTDIR',
'precmd_functions',