Closed shippy closed 4 years ago
Ah, I see what you are doing. This is quite a hack though and only works because extrakto does tmux set-buffer -- "$text"
internally first.
I find this too confusing because the clip tool is meant to get text via stdin (which paste-buffer does not).
We could create a wiki page though for this use case.
Ah, I see. So this will break if either of the following happens:
set-buffer -- "$text"
in the future, perhaps in an attempt to preserve current buffer content, tmux paste-buffer
starts acting differently passed stdin.Would be happy to write up that wiki page; not sure how to PR that. Any preferred methods?
I updated the settings - can you edit the wiki now? I created a page for you at https://github.com/laktak/extrakto/wiki/Remote-Usage
Yup, there's an edit button now!
I'm going to close this PR. If you have the time please add your hints to the wiki and I'll link them from the README.
I use tmux almost exclusively on remote servers. The remote servers rarely have a display running, so
xsel
/xclip
error out. Often, I also don't want to share a clipboard with the tmux session.My primary use case for extrakto is re-pasting some text into the current command prompt. My muscle memory for fzf makes me hit Enter as often as not, which results in an error instead of a pasted command. I'd prefer Enter to do something useful.
I just spent half an hour figuring out how to do that - remap the "Enter" action? disable clipboard? pray to the forgotten gods? - until I had the embarrassing realization that I could just set the clipboard action to
tmux paste-buffer
.I recognize that clipboard-less use might go against extrakto's raison d'être, but I think this is a neat option to provide - and since you already provide it, it might as well be documented.