Skip to main content

parse_args

Function parse_args 

Source
pub fn parse_args() -> CliArgs
Expand description

Parse CLI arguments from the command line

§Examples

use oxi_cli::CliArgs;

fn main() {
    let args = CliArgs::parse();
    match args.command {
        Some(Commands::Sessions) => { /* list sessions */ }
        Some(Commands::Tree { session_id }) => { /* show tree */ }
        _ => { /* interactive mode */ }
    }
}