added with-flags param to start/restart cmd
parent
a20fcf58f2
commit
5bba6e8b82
|
|
@ -1,3 +1,5 @@
|
|||
use std::string;
|
||||
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
|
|
@ -17,7 +19,7 @@ pub enum Commands {
|
|||
#[command(
|
||||
about = "To start Noxis process",
|
||||
)]
|
||||
Start,
|
||||
Start(StartAction),
|
||||
#[command(
|
||||
about = "To stop Noxis process",
|
||||
)]
|
||||
|
|
@ -25,7 +27,7 @@ pub enum Commands {
|
|||
#[command(
|
||||
about = "To restart Noxis process",
|
||||
)]
|
||||
Restart,
|
||||
Restart(StartAction),
|
||||
#[command(
|
||||
about = "To get list of processes that are being monitoring",
|
||||
)]
|
||||
|
|
@ -42,6 +44,16 @@ pub enum Commands {
|
|||
Config(ConfigCommand),
|
||||
}
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct StartAction {
|
||||
#[arg(
|
||||
long="with-flags",
|
||||
num_args = 1..,
|
||||
value_delimiter = ' '
|
||||
)]
|
||||
flags : Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct ConfigCommand {
|
||||
#[command(subcommand)]
|
||||
|
|
|
|||
Loading…
Reference in New Issue