We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a72b1ae commit cbfe831Copy full SHA for cbfe831
src/onefetch/cli.rs
@@ -79,7 +79,19 @@ impl Cli {
79
.long("ascii")
80
.value_name("STRING")
81
.takes_value(true)
82
- .help("Takes a STRING as input to replace the ASCII logo")
+ .max_values(1)
83
+ .help("Takes a non-empty STRING as input to replace the ASCII logo.")
84
+ .long_help("Takes a non-empty STRING as input to replace the ASCII logo. \
85
+ It is possible to pass a generated STRING by command substitution. \
86
+ Example: onefetch --ascii \"$(fortune | cowsay -W 25)\"")
87
+ .validator(
88
+ |t| {
89
+ if t.is_empty() {
90
+ return Err(String::from("must not be empty"));
91
+ }
92
+ Ok(())
93
+ },
94
+ ),
95
)
96
.arg(
97
Arg::with_name("ascii-colors")
0 commit comments