1 use clap::Parser; 2 use log::LevelFilter; 3 4 #[derive(Parser)] 5 #[command(name = "held")] 6 #[command(author = "heyicong@dragonos.org")] 7 #[command(version = "1.0")] 8 #[command(about = "a termial editor", long_about = None)] 9 pub struct CmdConfig { 10 /// open file 11 pub file: Option<String>, 12 13 /// log level 14 #[arg(value_enum, short, long, default_value = "warn")] 15 pub level: LevelFilter, 16 } 17