summaryrefslogtreecommitdiffstats
path: root/src/main.rs
blob: 0d1bb69ee85165b7c6ae16d75345e66985351178 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#![warn(clippy::pedantic)]
#![warn(clippy::nursery)]
#![allow(clippy::missing_const_for_fn)]
#![allow(clippy::unused_self)]

mod history;
mod nbsh;
mod repl;

async fn async_main() -> anyhow::Result<()> {
    let nbsh = nbsh::Nbsh::new();
    nbsh.run().await
}

fn main() {
    match async_std::task::block_on(async_main()) {
        Ok(_) => (),
        Err(e) => {
            eprintln!("nbsh: {}", e);
            std::process::exit(1);
        }
    };
}