Add Events filter
This commit is contained in:
parent
895f5f9373
commit
915c2ccbbf
5 changed files with 39 additions and 12 deletions
11
src/cli.rs
11
src/cli.rs
|
|
@ -1,4 +1,4 @@
|
|||
use clap::{Args, Parser, Subcommand};
|
||||
use clap::{Args, Parser, Subcommand, ValueEnum};
|
||||
use telnet::Telnet;
|
||||
|
||||
use crate::parameter::ParameterList;
|
||||
|
|
@ -79,9 +79,18 @@ pub struct UpdateArgs {
|
|||
speakers: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Clone, ValueEnum)]
|
||||
pub enum EventArgsFilter {
|
||||
All,
|
||||
Mine,
|
||||
Others,
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
pub struct EventArgs {
|
||||
pub event: Vec<EventType>,
|
||||
#[arg(long, short)]
|
||||
pub filter: Option<EventArgsFilter>,
|
||||
}
|
||||
|
||||
impl FetchArgs {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue