Skip to content

Commit c356439

Browse files
author
grtcdr
committed
Set hide_possible_values for show flag
1 parent 2e54b88 commit c356439

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎Cargo.lock‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ readme = "README.md"
1111
build = "build.rs"
1212

1313
[dependencies]
14-
libmacchina = { version = "6.3.2", features = ["version"] }
14+
libmacchina = { version = "6.3.5", features = ["version"] }
1515
bytesize = "1.1.0"
1616
shellexpand = "3.0.0"
1717
clap = { version = "4.0.32", features = ["derive"] } # TODO: Update me!

‎src/cli.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ pub struct Opt {
2222
#[clap(
2323
short = 'o',
2424
long = "show",
25-
help = "Displays only the specified readouts"
25+
help = "Displays only the specified readouts",
26+
hide_possible_values = true
2627
)]
2728
pub show: Option<Vec<data::ReadoutKey>>,
2829

‎src/data/mod.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::cli::Opt;
22
use crate::theme::Theme;
3-
use clap::ValueEnum;
3+
use clap::{Parser, ValueEnum};
44
use libmacchina::traits::ShellFormat;
55
use libmacchina::traits::{ReadoutError, ShellKind};
66
use libmacchina::{BatteryReadout, GeneralReadout, KernelReadout, MemoryReadout, PackageReadout};
@@ -12,7 +12,7 @@ use tui::text::{Span, Spans, Text};
1212

1313
/// This enum contains all the possible keys, e.g. _Host_, _Machine_, _Kernel_, etc.
1414
#[allow(clippy::upper_case_acronyms)]
15-
#[derive(ValueEnum, Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
15+
#[derive(Parser, ValueEnum, Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1616
pub enum ReadoutKey {
1717
Host,
1818
Machine,

0 commit comments

Comments
 (0)