Skip to content

Fix pty prompt breaking when closing editor#3

Open
Legorel wants to merge 1 commit into
Bekaboo:masterfrom
Legorel:master
Open

Fix pty prompt breaking when closing editor#3
Legorel wants to merge 1 commit into
Bekaboo:masterfrom
Legorel:master

Conversation

@Legorel

@Legorel Legorel commented May 9, 2025

Copy link
Copy Markdown

When running the hook in a gui session, closing the editor breaks the terminal prompt and prints uninterpreted ANSI escape sequences, see the image below:
pacman_ich_tty

It seems to happen only when there are escape sequences in the prompt.
I assume that running $VEDITOR with the /dev/tty redirections does not correctly reset the terminal state when in a pty.

Running the editor with the script command seems to fix it. There's probably a better way to do this but it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant