diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 3 | ||||
-rw-r--r-- | src/main.rs | 4 |
2 files changed, 6 insertions, 1 deletions
@@ -395,7 +395,8 @@ impl<'a> Entry<'a> { if let Some( ( Width(w), Height(_h) ) ) = size { twidth = w; } else { - eprintln!("Unable to get terminal size"); + // FIXME: doesn't seem to work when piping + // eprintln!("Unable to get terminal size"); } let size_width = 15; let var_width = (twidth - size_width) as usize; diff --git a/src/main.rs b/src/main.rs index 613a9da..c4db10d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,6 +43,10 @@ use dutree::XResult::XExit; use std::process; fn main() { + + // handle SIGPIPE + let _signal = unsafe { signal_hook::register(signal_hook::SIGPIPE, || process::exit(0)) }; + // Parse arguments let cfg = match Config::new() { XOk(cfg) => cfg, |