Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable OSC52 automatically if connected via SSH #11050

Open
jonas-w opened this issue Jun 28, 2024 · 3 comments
Open

Enable OSC52 automatically if connected via SSH #11050

jonas-w opened this issue Jun 28, 2024 · 3 comments
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@jonas-w
Copy link

jonas-w commented Jun 28, 2024

When connecting via ssh to a macOS host, helix still uses pbcopy+pbpaste as a clipboard provider instead of OSC52.
I think this is not a problem when the remote is a Linux host, as helix checks for WAYLAND_DISPLAY/DISPLAY environment variables, which are normally not set in an SSH session. (at least I never had problems with Linux remotes)

My enhancement would be to check for the $SSH_CONNECTION environment variable, and if this is set, it would use the FallbackProvider instead of pbcopy+pbpaste.
As I mentioned before, this seems to be only a problem if the remote is macOS, so it would probably be suffice to add this check to the macOS target of the get_clipboard_provider method.

@jonas-w jonas-w added the C-enhancement Category: Improvements label Jun 28, 2024
@kirawi kirawi added the A-helix-term Area: Helix term improvements label Jun 29, 2024
@jonas-w
Copy link
Author

jonas-w commented Jul 1, 2024

I'd also be willing to open a PR for this.

@jpeeler
Copy link

jpeeler commented Jul 27, 2024

I'd be willing to test and confirm said PR.

@hholst80
Copy link

Yes this seems to work just fine in Linux. No Wayland specific environment variables are passed via SSH and "+y will copy text to the system clipboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

4 participants