Skip to content
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

thumbs panics when pipe to external program #66

Open
ghost opened this issue Oct 6, 2020 · 4 comments
Open

thumbs panics when pipe to external program #66

ghost opened this issue Oct 6, 2020 · 4 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@ghost
Copy link

ghost commented Oct 6, 2020

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

@pbartyik
Copy link
Contributor

pbartyik commented Oct 13, 2020

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:

Err value: Os { code: 25, kind: Other, message: "Inappropriate ioctl for device" }'

@fcsonline
Copy link
Owner

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.

@fcsonline fcsonline added the bug Something isn't working label Dec 1, 2020
@fcsonline fcsonline added the wontfix This will not be worked on label Feb 6, 2022
@rafcamlet
Copy link

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. 👍

@dongdongbh
Copy link

encounting same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants