rust_tree 1.3.0

tree is a cross-platform tree application and library that produces an indented directory listing of files.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use rust_tree::rust_tree::cli::run_cli;
use rust_tree::rust_tree::utils::is_broken_pipe_error;

fn main() {
    match run_cli() {
        Ok(()) => {}
        Err(err) => {
            if is_broken_pipe_error(&err) {
                // silently terminate for broken pipe to gracefully handle SIGPIPE
                std::process::exit(0);
            } else {
                eprintln!("Error: {err}");
                std::process::exit(1);
            }
        }
    }
}