tmux-thumbs
tmux-thumbs copied to clipboard
thumbs panics when pipe to external program
Os: Arch terminal: alacritty
git log | thumbs -u -r | xclip -selection clipboard -i
Output:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 25, kind: Other, message: "Inappropriate ioctl for device" }', /home/demxk/.cargo/registry/src/github.com-1ecc6299db9ec823/thumbs-0.4.4/src/view.rs:259:69
With RUST_BACKTRACE=1
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
1: backtrace::backtrace::trace_unsynchronized
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:78
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:59
4: core::fmt::write
at src/libcore/fmt/mod.rs:1076
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1537
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:62
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:49
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:198
9: std::panicking::default_hook
at src/libstd/panicking.rs:217
10: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:526
11: rust_begin_unwind
at src/libstd/panicking.rs:437
12: core::panicking::panic_fmt
at src/libcore/panicking.rs:85
13: core::option::expect_none_failed
at src/libcore/option.rs:1269
14: thumbs::view::View::present
15: thumbs::main
16: std::rt::lang_start::{{closure}}
17: std::rt::lang_start_internal::{{closure}}
at src/libstd/rt.rs:52
18: std::panicking::try::do_call
at src/libstd/panicking.rs:348
19: std::panicking::try
at src/libstd/panicking.rs:325
20: std::panic::catch_unwind
at src/libstd/panic.rs:394
21: std::rt::lang_start_internal
at src/libstd/rt.rs:51
22: main
23: __libc_start_main
24: _start
I can reproduce it. When you don't pipe it to xclip it works, right?
Edit:
This fails at view.rs#259 which calls this:
https://github.com/redox-os/termion/blob/master/src/raw.rs#L100
That's about the extent I can troubleshoot this, don't know enough on terminals to figure out why it returns the error:
Errvalue: Os { code: 25, kind: Other, message: "Inappropriate ioctl for device" }'
There is a thread un rust lang forums about this:
https://users.rust-lang.org/t/termion-intorawmode-read-from-stdin-error/27574
Not sure how to solve it.
Hi! I really like the idea of thumbs as a standalone command, but no mater to what I try pipe it, I'm getting this error. Is there a workaround for this? Because honestly, I don't know how to use it. Or it's like the only intended use, that doesn't work in some configurations?
So for now I'm using tmux-thumbs aliases with custom --command, but it would be nice to be able to use it outside the tmux and not only with captured-pane.
Nice plugin btw. 👍
encounting same problem