From 2e56a0d2e80416904712514da6dab788567a719b Mon Sep 17 00:00:00 2001 From: jakobst1n Date: Tue, 11 Jun 2024 22:57:42 +0200 Subject: Rename axis argument to silent, and invert it, so axis are enabled by default --- src/parseopts.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/parseopts.rs') diff --git a/src/parseopts.rs b/src/parseopts.rs index 5368a87..1bae188 100644 --- a/src/parseopts.rs +++ b/src/parseopts.rs @@ -9,8 +9,8 @@ pub struct Opts { pub height: usize, /// Which type of graph it should be, ascii, star pub graph_type: GraphType, - /// Enable axis on the resulting graph, makes it a bit prettier - pub axis: bool, + /// This will disable distracting elements, such as axis + pub silent: bool, /// Specify if it is used as a filter, and you only want to look at the last N samples pub last_n: Option, /// Read from the specified file, instead of reading continously from stdin @@ -25,8 +25,8 @@ pub struct OptsBuilder { pub height: Option, /// Which type of graph it should be, ascii, star pub graph_type: GraphType, - /// Enable axis on the resulting graph, makes it a bit prettier - pub axis: bool, + /// This will disable distracting elements, such as axis + pub silent: bool, /// Specify if it is used as a filter, and you only want to look at the last N samples pub last_n: Option, /// Read from the specified file, instead of reading continously from stdin @@ -53,7 +53,7 @@ impl OptsBuilder { } }), graph_type: self.graph_type, - axis: self.axis, + silent: self.silent, last_n: self.last_n, in_file: self.in_file, } @@ -127,8 +127,8 @@ pub fn parseopt(opts: &mut OptsBuilder, arg: &str, value: Option, progna }; opts.last_n = Some(last_n); } - "a" | "axis" => { - opts.axis = true; + "s" | "silent" => { + opts.silent = true; } "w" | "width" => { let Some(width) = value else { @@ -158,7 +158,7 @@ pub fn parseopts() -> Opts { width: None, height: None, graph_type: GraphType::Star, - axis: false, + silent: false, last_n: None, in_file: None, }; -- cgit v1.2.3