Skip to content

Conversation

@Guimove
Copy link
Contributor

@Guimove Guimove commented Nov 20, 2025

What's the issue?

Copy-pasting text in qovery shell was broken on macOS Terminal.app. Sometimes it worked fine, sometimes you'd get random ~ or 201~ characters mixed in, or even duplicated words. Super annoying.

Turns out Terminal.app fragments the bracketed paste escape sequences (ESC[200~ / ESC[201~) across multiple buffer reads. So we'd send half a sequence to the remote shell, and that would show up as garbage text.

The fix

Added a small buffer that holds onto incomplete escape sequences until we get the rest. Nothing fancy, just check if the data ends with something that looks like the start of a bracketed paste sequence, and if so, wait for the next
read to complete it.

Tested on

  • macOS Terminal.app: works now, no more corruption
  • iTerm2: still works fine (wasn't broken to begin with)

@Guimove Guimove merged commit 0976584 into main Nov 20, 2025
6 checks passed
@Guimove Guimove deleted the fix/terminal-bracketed-paste-fragmentation-clean branch December 3, 2025 16:43
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.

3 participants