OXYGENHUB
# cd4eb55e3b3d oxygen / src / main.rs
636 B · Rust · last changed Pack merging above 16 packs; modern CLI presentation (colour, spinners, --plain, NO_COLOR); oxy prompt with manifest-based dirty check and docs/prompt.md 1 month ago source blame history raw
1
//! `oxy`: command-line interface for Oxygen.
2
//!
3
//! Command definitions and dispatch live in `cli`; each command group has
4
//! its own module there.
5
6
mod cli;
7
8
fn main() {
9
    // Behave like other CLI tools when output is piped into `head`: die
10
    // quietly on SIGPIPE instead of panicking on a failed write.
11
    #[cfg(unix)]
12
    unsafe {
13
        libc::signal(libc::SIGPIPE, libc::SIG_DFL);
14
    }
15
    match cli::run() {
16
        Ok(code) => std::process::exit(code),
17
        Err(e) => {
18
            cli::ui::init(false);
19
            eprintln!("{} {e:#}", cli::ui::err("error:"));
20
            std::process::exit(1);
21
        }
22
    }
23
}