Skip to content

Conversation

Jisu-Woniu
Copy link
Contributor

@Jisu-Woniu Jisu-Woniu commented Jul 4, 2025

Description

See: #69 (comment)

In short, this makes "copy to clipboard" easier for SSH users, and makes Termux build easier, since arboard only handles local clipboard and does not support Termux.

Alternatives

Most non-OSC 52 implementations don't support copy over SSH to client, including:

@n0bot n0bot bot added this to iroh Jul 4, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Jul 4, 2025
@mzji
Copy link

mzji commented Jul 7, 2025

Does this work with Windows cmd.exe (with legacy conhost.exe) ?

@Jisu-Woniu
Copy link
Contributor Author

Jisu-Woniu commented Jul 7, 2025

It may work on Windows 10 1511 and later versions, but I do not have a Windows machine to test that. (EDIT: Seems not supported now, even for Windows Terminal)

Maybe we can add a platform-specific dependency for that?

However, copying over SSH is not supported for any other methods, so I would recommend to use a terminal which supports OSC 52 on Windows.

@Jisu-Woniu
Copy link
Contributor Author

Note that on Linux servers without GUI sessions (where most clipboard actions take place for me), there is not such a "clipboard". Any clipboard operations through arboard will fail.

Since sendme is a CLI application, I think a clipboard operation is not that necessary for users. A method that just works for common senarios with minimal code footprint is better than tens or even hundreds dependencies. Let alone all those deps make compilation difficult for certain platforms. Users can always copy the command by hand on a Windows system if OSC 52 doesn't work for them.

(I find these words a little offensive, hope you don't mind that.)

@mzji
Copy link

mzji commented Jul 7, 2025

Note that on Linux servers without GUI sessions (where most clipboard actions take place for me), there is not such a "clipboard". Any clipboard operations through arboard will fail.

Since sendme is a CLI application, I think a clipboard operation is not that necessary for users. A method that just works for common senarios with minimal code footprint is better than tens or even hundreds dependencies. Let alone all those deps make compilation difficult for certain platforms. Users can always copy the command by hand on a Windows system if OSC 52 doesn't work for them.

(I find these words a little offensive, hope you don't mind that.)

If it already works, why make it doesn't work anymore? That doesn't make sense!

@Jisu-Woniu
Copy link
Contributor Author

It doesn't work for me! I cannot even compile it on Termux since arboard won't support it.

@mzji
Copy link

mzji commented Jul 7, 2025

It doesn't work for me! I cannot even compile it on Termux since arboard won't support it.

Then try to make it working for you and don't break other platform functions at the same time. You could use cfg or any other means to do that. It's not that hard, actually...

@Jisu-Woniu
Copy link
Contributor Author

Jisu-Woniu commented Jul 7, 2025

For the platforms support OSC 52, using arboard means it won't work for copy over SSH. For those don't, a manual copy with mouse always work. Remove arboard makes dep tree much simpler.

If you can solve all these problems easily, file your PR. If your PR solves my problem, I will close mine. I take no warranty for the open-source code I provide (as MIT & Apache license said), and the maintainers can choose whether or not to merge this PR.

@mzji
Copy link

mzji commented Jul 7, 2025

For the platforms support OSC 52, using arboard means it won't work for copy over SSH. For those don't, a manual copy with mouse always work. Remove arboard makes dep tree much simpler.

If you can solve all these problems easily, file your PR. If your PR solves my problem, I will close mine. I take no warranty for the open-source code I provide (as MIT & Apache license said), and the maintainers can choose whether or not to merge this PR.

That's fine. Let maintainers decide.

@draguve
Copy link
Contributor

draguve commented Jul 7, 2025

Windows Terminal appears to support it, but I don't have a device to confirm that. microsoft/terminal#5823, microsoft/terminal#2946

Copy link

@flub flub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is lovely! So many dependencies removed. A few terminals don't seem to support this yet, but I agree that this is probably a reasonable trade-off.

@flub flub merged commit a9a2032 into n0-computer:main Jul 7, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh Jul 7, 2025
@flub flub mentioned this pull request Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants