-
Notifications
You must be signed in to change notification settings - Fork 96
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
Make clipboard support optional, with shell command escape hatch #121
base: main
Are you sure you want to change the base?
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-features
This PR also adds a command line option
--clipboard-cmd CMD
to 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.json
In 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