Add printing, commands work
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use clap::ArgGroup;
|
||||
use serde::de;
|
||||
|
||||
#[derive(Debug, Clone, clap::Parser, Default)]
|
||||
pub struct CliArgs {
|
||||
@@ -34,6 +35,9 @@ pub enum CliCommand {
|
||||
/// Command to run
|
||||
#[arg(long, short = 'c')]
|
||||
command: String,
|
||||
/// Output format
|
||||
#[arg(long, short = 'f')]
|
||||
format: OutputFormat,
|
||||
},
|
||||
/// Run command continuosly
|
||||
#[command(
|
||||
@@ -53,8 +57,11 @@ pub enum CliCommand {
|
||||
/// Command to run
|
||||
#[arg(long, short = 'c')]
|
||||
command: String,
|
||||
#[arg(long, short = 'i')]
|
||||
/// Output format
|
||||
#[arg(long, short = 'f')]
|
||||
format: OutputFormat,
|
||||
/// Interval to run the commands at
|
||||
#[arg(long, short = 'i')]
|
||||
interval: f32,
|
||||
},
|
||||
/// Manage devices
|
||||
@@ -77,3 +84,11 @@ pub enum CliDeviceCommand {
|
||||
#[clap(skip)]
|
||||
None,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, clap::ValueEnum)]
|
||||
pub enum OutputFormat {
|
||||
#[default]
|
||||
Csv,
|
||||
Table,
|
||||
Json,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user