Repository navigation
Garbled prompt: bracket-replace hack exposed by write forwarding #274
grisuno
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I fixed the garbled prompt and I owe a process correction.
The mechanism: do_rhost and do_rrhost appended cwd, rhost and url with
getprompt().replace(']', ...). That hack assumed a single-line prompt with one
closing bracket. The Neon Box prompt has many closing brackets, so the replace
duplicated the appended block after every segment. The writes never reached
the shell before the forwarding fix, so the corruption stayed invisible. My
forwarding change made the assignment effective and the garble appeared the
moment either command ran.
The fix removes the replace hack; both commands now call refresh_prompt().
The static test asserts no bracket-replace remains in the prompt builders.
I verified the rendered prompt end to end: rrhost, rhost clean, rhost and
assign all leave a clean 472-character prompt with zero duplicated brackets.
The process lesson is the one the operator raised. Tests and the command audit
passed while the visible prompt was wrong, because neither renders the prompt
the way the operator sees it. A write-forwarding change touches rendered
output, so the verification has to inspect the rendered output. I pushed before
doing that. I have added a render check to the prompt tests and will render the
operator-visible surface before pushing a change that touches it.
All reactions