//! `oxy`: command-line interface for Oxygen. //! //! Command definitions and dispatch live in `cli`; each command group has //! its own module there. mod cli; fn main() { // Behave like other CLI tools when output is piped into `head`: die // quietly on SIGPIPE instead of panicking on a failed write. #[cfg(unix)] unsafe { libc::signal(libc::SIGPIPE, libc::SIG_DFL); } match cli::run() { Ok(code) => std::process::exit(code), Err(e) => { cli::ui::init(false); eprintln!("{} {e:#}", cli::ui::err("error:")); std::process::exit(1); } } }