pub mod config_cmd;
pub mod init;
use clap::{Parser, Subcommand};
#[derive(Debug, Parser)]
#[command(name = "alf")]
#[command(version, about, long_about = None, disable_help_subcommand = true)]
pub struct Cli {
#[command(subcommand)]
pub command: Option<Commands>,
}
#[derive(Debug, Subcommand)]
pub enum Commands {
Activate {
shell: String,
},
Config {
#[command(subcommand)]
action: ConfigAction,
},
Init {
#[arg(long, value_name = "SHELL")]
print_shell_hook: Option<String>,
},
Search {
query: String,
},
}
#[derive(Debug, Subcommand)]
pub enum ConfigAction {
Add {
#[arg(required = true, num_args = 1.., value_name = "PATH")]
paths: Vec<String>,
},
Show,
Edit,
Reset,
}
#[cfg(test)]
mod cli_tests;