use ::clap::Parser;
use crate::common::CommandArgs;
#[derive(Parser, Debug)]
#[command(
name = "mon",
about = "Log the command, the outcome, timings and play a sound."
)]
pub struct MonArgs {
#[arg(short = 'c', long = "no-print-cmd")]
pub no_print_cmd: bool,
#[arg(short = 'b', long = "no-output-on-success")]
pub no_output_on_success: bool,
#[arg(short = 't', long)]
pub no_timing: bool,
#[arg(short = 's', long = "ok-sound")]
pub sound_success: bool,
#[arg(short = 'S', long = "fail-sound")]
pub sound_failure: bool,
#[arg(short = 'p', long)]
pub prefix: Option<String>,
#[arg(short = 'x', long)]
pub use_stdout: bool,
#[arg(short = 'f', long)]
pub full_command: bool,
#[command(subcommand)]
pub cmd: CommandArgs,
}
#[test]
fn test_cli_args() {
MonArgs::try_parse_from(&["cmd", "ls"]).unwrap();
MonArgs::try_parse_from(&["cmd", "-cbtxf", "-sS", "-p=pre", "ls"]).unwrap();
}