sn0int/cmd/
use_cmd.rs

1use clap::Parser;
2use crate::errors::*;
3use crate::shell::Shell;
4
5#[derive(Debug, Parser)]
6pub struct Args {
7    module: String,
8}
9
10pub fn run(rl: &mut Shell, args: &[String]) -> Result<()> {
11    let args = Args::try_parse_from(args)?;
12
13    let module = rl.library().get(&args.module)?.clone();
14    rl.set_module(module);
15
16    Ok(())
17}