add cli
This commit is contained in:
parent
f77783c66f
commit
5b035fe12c
3 changed files with 55 additions and 32 deletions
37
src/cli.rs
37
src/cli.rs
|
@ -9,15 +9,40 @@ pub struct Cli {
|
|||
|
||||
#[derive(Subcommand, Debug)]
|
||||
pub enum Commands {
|
||||
///Generate bash completions
|
||||
GenerateBashCompletions,
|
||||
///Generate zsh completions
|
||||
GenerateZshCompletions,
|
||||
///Generate fish completions
|
||||
GenerateFishCompletions,
|
||||
///Generate shell completions
|
||||
GenCompletion {
|
||||
#[command(subcommand)]
|
||||
shell: ShellCommands,
|
||||
},
|
||||
///Runs it
|
||||
Run {
|
||||
#[arg(short, long)]
|
||||
config: String,
|
||||
#[arg(short, long)]
|
||||
daemonize: bool,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Subcommand, Debug)]
|
||||
pub enum ShellCommands {
|
||||
Bash {
|
||||
#[arg(short, long, default_value = "gregory")]
|
||||
binary_name: String,
|
||||
},
|
||||
Zsh {
|
||||
#[arg(short, long, default_value = "gregory")]
|
||||
binary_name: String,
|
||||
},
|
||||
Fish {
|
||||
#[arg(short, long, default_value = "gregory")]
|
||||
binary_name: String,
|
||||
},
|
||||
Elvish {
|
||||
#[arg(short, long, default_value = "gregory")]
|
||||
binary_name: String,
|
||||
},
|
||||
PowerShell {
|
||||
#[arg(short, long, default_value = "gregory")]
|
||||
binary_name: String,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue