use clap::{Parser, Subcommand};

#[derive(Parser)]
#[command(name = "tmucks")]
#[command(about = "tmux config manager, for those who are reckless.", long_about = None)]
pub struct Cli {
    #[command(subcommand)]
    pub command: Option<Commands>,
}

#[derive(Subcommand)]
pub enum Commands {
    List,
    Apply { name: String },
    Save { name: String },
    Update { name: String },
    Delete { name: String },
}

pub fn ensure_conf_extension(name: String) -> String {
    if name.ends_with(".conf") {
        name
    } else {
        format!("{}.conf", name)
    }
}
