Skip to content

Commit 0b97ed6

Browse files
committed
Change bold option to a flag
1 parent f3f90d6 commit 0b97ed6

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

Diff for: src/main.rs

+5-12
Original file line numberDiff line numberDiff line change
@@ -153,19 +153,12 @@ Possible values: [{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}]",
153153
"15".bright_white(),
154154
)))
155155
.arg(
156-
Arg::with_name("bold")
156+
Arg::with_name("no-bold")
157157
.short("b")
158-
.long("bold")
159-
.takes_value(true)
160-
.default_value("on")
161-
.hide_default_value(true)
162-
.possible_values(&["on", "off"])
163-
.hide_possible_values(true)
158+
.long("no-bold")
164159
.help(&format!(
165-
"{}{}{}",
166-
"Specifies whether the logo and all info labels should be bold.",
167-
"\nPossible values: [\"on\", \"off\"]",
168-
"\nDefault value: [\"on\"]"
160+
"{}",
161+
"Turns off bold formatting for the logo and all labels"
169162
)))
170163
.arg(
171164
Arg::with_name("languages")
@@ -224,7 +217,7 @@ Possible values: [{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}]",
224217
Vec::new()
225218
};
226219

227-
let bold_flag = if let Some("off") = matches.value_of("bold") {
220+
let bold_flag = if matches.is_present("no-bold") {
228221
false
229222
} else {
230223
true

0 commit comments

Comments
 (0)