-
Notifications
You must be signed in to change notification settings - Fork 674
Description
Feature description
Problem: When connected to a remote machine using Wave Terminal's direct SSH connection, copying text from the remote terminal to the local system clipboard often fails, especially when terminal multiplexers like tmux or tools that use them internally (like zsh4humans) are running on the remote host. Standard mouse selection copy doesn't interact with the remote application's understanding of the clipboard in these cases.
Reason: Many modern terminal applications and tools (like tmux with set-clipboard on, neovim, etc.) utilize the OSC 52 escape sequence standard (\e]52;...) to programmatically interact with the terminal emulator's clipboard. This allows copying text even when mouse support is disabled or when copying across remote sessions. Wave Terminal does not currently appear to interpret or act on these OSC 52 sequences when received over a direct SSH connection.
Implementation Suggestion
No response
Anything else?
Context: This issue was identified when using zsh4humans over a direct SSH connection in Wave. zsh4humans optionally uses an integrated tmux session which enables set-clipboard on by default, relying on OSC 52 for clipboard operations. Disabling the integrated tmux (zstyle ':z4h:' start-tmux no in ~/.zshrc) is a workaround but disables other zsh4humans features.
Tmux Reference: The set-clipboard option in tmux documentation explains its reliance on terminal clipboard support: https://man.openbsd.org/tmux.1#set-clipboard
OSC 52 Explanation: A good overview of how OSC 52 works can be found in various terminal emulator documentation or blog posts, such as this one: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands (Search for "OSC 52") or https://cirw.in/blog/bracketed-paste (mentions OSC 52 in context).
Other Terminals: Support for OSC 52 over SSH is present in terminals like iTerm2, Kitty, WezTerm, and others, making it a fairly standard feature for modern terminal emulators.