use mxsh::ShellBuilder;
use mxsh::policy::{ShellIdentity, VariableAttributes};
use mxsh::runtime::unix::UnixRuntime;
fn main() {
let argv: Vec<String> = std::env::args().collect();
let mut shell = ShellBuilder::new()
.identity(ShellIdentity::named("toysh").with_default_history_file(".toysh_history"))
.env("PS1", "toysh> ", VariableAttributes::empty())
.build(UnixRuntime::new())
.expect("shell should build");
let outcome = shell.run_cli(&argv);
std::process::exit(outcome.exit_code.unwrap_or(outcome.status));
}