use clap::{Args, Parser, Subcommand};
#[derive(Debug, Parser)]
#[clap(author, version, about, long_about = None)]
pub struct TomeArgs {
#[clap(subcommand)]
pub commands: TomeCommands,
}
#[derive(Debug, Subcommand)]
pub enum TomeCommands {
CommandHelp(HelpArgs),
CommandComplete(CompleteArgs),
CommandExecute(ExecuteArgs),
Init(InitArgs),
Run(RunArgs),
}
#[derive(Debug, Args)]
pub struct CompleteArgs {
pub command_directory_path: String,
#[clap(short, long)]
pub shell: String,
#[clap(last = true)]
pub args: Vec<String>,
}
#[derive(Debug, Args)]
pub struct ExecuteArgs {
pub command_directory_path: String,
#[clap(short, long)]
pub shell: String,
#[clap(last = true)]
pub args: Vec<String>,
}
#[derive(Debug, Args)]
pub struct HelpArgs {
pub command_directory_path: String,
#[clap(last = true)]
pub args: Vec<String>,
}
#[derive(Debug, Args)]
pub struct InitArgs {
pub command_name: String,
pub command_directory_path: String,
pub shell_type_or_path: String,
}
#[derive(Debug, Args)]
pub struct RunArgs {
pub command_directory_path: String,
#[clap(last = true)]
pub args: Vec<String>,
}