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