-
Notifications
You must be signed in to change notification settings - Fork 39
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
OSC 52 support #140
Comments
Can you give an example of specific use cases using urlscan and what the user interface (and/or cli arguments) would look like? Thanks! |
I'd use it to copy links from Neomutt running on a remote host to my local clipboard. I could also script it if you enabled the -r and -f scripts to pass through stdout. |
From urlscan.1 : |
I use notify-send instead of let's say echo since I can't get any output through urlscan from the process. Even with urlscan ./a --single --run 'echo hi {}' So no, it doesn't work for me. |
The following code does print import subprocess
subprocess.run("echo Foo bar baz", check=False, shell=True) So move this block Lines 786 to 787 in a78bd06
to before this: Line 762 in a78bd06
and remove the with redirect_output():
|
I can see the value in adding support for this but after looking at it for awhile tonight, I'm going to defer working on this to anyone who is interested in creating a PR. Thanks for the input and your interest in the project! |
If you have this wrapper script:
and use it with:
it will work as intended! This issue can be closed. P.S.: If inside tmux, make sure to have "set-option -g set-clipboard on" on your config. |
@axelkar, does @rbmarliere's solution work for your use case? |
It doesn't work. Urlscan doesn't redirect the output from the --run script to stdout/stderr.
|
https://jdhao.github.io/2021/01/05/nvim_copy_from_remote_via_osc52/
microsoft/terminal#2946
https://www.reddit.com/r/commandline/comments/mqyjby/where_can_i_learn_more_about_osc52/
The OSC 52 escape sequence allows programs to paste text to the clipboard over (plain terminal), SSH, telnet, or anything that provides a full ASCII byte stream to a compatible terminal such as Kitty, iTerm2, tmux, screen, Windows Terminal, etc.
The text was updated successfully, but these errors were encountered: