1use std::collections::HashMap;
2
3use clap::{Parser, Subcommand};
4
5#[derive(Debug, Parser)]
6#[command(author, version, about, long_about = None)]
7pub struct Cli {
8 #[command(subcommand)]
9 commands: Commands,
10}
11
12impl Cli {
13 pub fn commands(&self) -> &Commands {
14 &self.commands
15 }
16}
17
18#[derive(Debug, Subcommand)]
22pub enum Commands {
23 Add { name: String, path: String },
25
26 Remove { name: String },
28
29 List,
31
32 #[command(allow_hyphen_values = true)]
35 Do { name: String, command: Vec<String> },
36}
37
38pub type Entries = HashMap<String, String>;