Make clipboard support optional, with shell command escape hatch#121
Make clipboard support optional, with shell command escape hatch#121bew wants to merge 2 commits intoPaulJuliusMartinez:mainfrom
Conversation
798ca9f to
343e42f
Compare
343e42f to
47e8277
Compare
|
FYI I rebased this PR on latest |
|
I used to use @gperry's patch from #110 locally. Now that main was updated to 0.9.0 I just did a pull & rebase over that branch. Came here to open a fresh PR and found @bew has already beaten me to it 🥇 @PaulJuliusMartinez Do you have any thoughts on this? Since the codebase already treats Having @bew's implementation is a bonus, since this works in tmux: |
|
Too bad this has gone unnoticed for so long. Seems like jless is not really developed further anymore. Can only suggest others to take a look at fx which is similar but also has non-interactive filtering and clipboard-functionality just works (under Wayland, as well) |
Squashed and cleaned up version of PaulJuliusMartinez#121 from the upstream repo. PaulJuliusMartinez#121
|
Thank you @cjk ; it's funny how sometimes we just bang our head against the wall! I also have had a feeling that Thank for reminding me 🙌 |
Supersedes #110
Closes #84
Closes #119
This PR uses PR #110 to move the clipboard detection to a crate feature so it can be fully disabled, but it doesn't completely remove the copy actions.
Can be built using:
cargo build --no-default-featuresThis PR also adds a command line option
--clipboard-cmd CMDto be able to set an arbitrary shell command to use for copy actions as I requested in #119.I tested this with the following commands:
$ ./target/debug/jless --clipboard-cmd 'cat > /tmp/clipboard' /path/to/a/file.jsonIn this case copy actions will send the copy target as input to
cat > /tmp/clipboard.And:
In this case copy actions will be disabled, with the error message:
Unable to access clipboard: No clipboard support, use --clipboard-cmd to set one