@@ -17,12 +17,12 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
17 .global_setting(clap_color_setting)
17 .global_setting(clap_color_setting)
18 .global_setting(AppSettings::DeriveDisplayOrder)
18 .global_setting(AppSettings::DeriveDisplayOrder)
19 .global_setting(AppSettings::UnifiedHelpMessage)
19 .global_setting(AppSettings::UnifiedHelpMessage)
20− .global_setting(AppSettings::NextLineHelp)
20+ .global_setting(AppSettings::HidePossibleValuesInHelp)
21 .setting(AppSettings::InferSubcommands)
21 .setting(AppSettings::InferSubcommands)
22 .setting(AppSettings::ArgsNegateSubcommands)
22 .setting(AppSettings::ArgsNegateSubcommands)
23 .setting(AppSettings::DisableHelpSubcommand)
23 .setting(AppSettings::DisableHelpSubcommand)
24 .setting(AppSettings::VersionlessSubcommands)
24 .setting(AppSettings::VersionlessSubcommands)
25− .max_term_width(90)
25+ .max_term_width(100)
27 "A cat(1) clone with wings.\n\n\
27 "A cat(1) clone with wings.\n\n\
28 Use '--help' instead of '-h' to see a more detailed version of the help text.",
28 Use '--help' instead of '-h' to see a more detailed version of the help text.",
@@ -87,14 +87,18 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
87 .possible_values(&[
87 .possible_values(&[
88 "auto", "full", "plain", "changes", "header", "grid", "numbers",
88 "auto", "full", "plain", "changes", "header", "grid", "numbers",
90− .help("Comma-separated list of style elements to display.")
91+ "Comma-separated list of style elements to display \
92+ (*auto*, full, plain, changes, header, grid, numbers).",
91 .long_help(
94 .long_help(
92 "Configure which elements (line numbers, file headers, grid \
95 "Configure which elements (line numbers, file headers, grid \
93 borders, Git modifications, ..) to display in addition to the \
96 borders, Git modifications, ..) to display in addition to the \
94 file contents. The argument is a comma-separated list of \
97 file contents. The argument is a comma-separated list of \
95 components to display (e.g. 'numbers,changes,grid') or a \
98 components to display (e.g. 'numbers,changes,grid') or a \
96 pre-defined style ('full'). To set a default theme, export the \
99 pre-defined style ('full'). To set a default theme, export the \
97− BAT_STYLE environment variable (e.g.: export BAT_STYLE=\"numbers\").",
100+ BAT_STYLE environment variable (e.g.: export BAT_STYLE=\"numbers\"). \
101+ Possible values: *auto*, full, plain, changes, header, grid, numbers.",
@@ -144,11 +148,13 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
144 .takes_value(true)
148 .takes_value(true)
145 .value_name("when")
149 .value_name("when")
146 .possible_values(&["auto", "never", "always"])
150 .possible_values(&["auto", "never", "always"])
151+ .hide_default_value(true)
147 .default_value("auto")
152 .default_value("auto")
148− .help("When to use colors.")
153+ .help("When to use colors (*auto*, never, always).")
149 .long_help(
154 .long_help(
150 "Specify when to use colored output. The automatic mode \
155 "Specify when to use colored output. The automatic mode \
151− only enables colors if an interactive terminal is detected.",
156+ only enables colors if an interactive terminal is detected. \
157+ Possible values: *auto*, never, always.",
@@ -159,11 +165,12 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
159 .value_name("when")
165 .value_name("when")
160 .possible_values(&["auto", "never", "always"])
166 .possible_values(&["auto", "never", "always"])
161 .default_value("auto")
167 .default_value("auto")
168+ .hide_default_value(true)
162− .help("When to show the decorations specified by '--style'.")
169+ .help("When to show the decorations (*auto*, never, always).")
163 .long_help(
170 .long_help(
164 "Specify when to use the decorations that have been specified \
171 "Specify when to use the decorations that have been specified \
165 via '--style'. The automatic mode only enables decorations if \
172 via '--style'. The automatic mode only enables decorations if \
166− an interactive terminal is detected.",
173+ an interactive terminal is detected. Possible values: *auto*, never, always.",
@@ -174,13 +181,15 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
174 .value_name("when")
181 .value_name("when")
175 .possible_values(&["auto", "never", "always"])
182 .possible_values(&["auto", "never", "always"])
176 .default_value("auto")
183 .default_value("auto")
184+ .hide_default_value(true)
177− .help("Specify when to use the pager.")
185+ .help("Specify when to use the pager (*auto*, never, always).")
178 .long_help(
186 .long_help(
179 "Specify when to use the pager. To control which pager \
187 "Specify when to use the pager. To control which pager \
180 is used, set the PAGER or BAT_PAGER environment \
188 is used, set the PAGER or BAT_PAGER environment \
181 variables (the latter takes precedence). The default \
189 variables (the latter takes precedence). The default \
182 pager is 'less'. To disable the pager permanently, set \
190 pager is 'less'. To disable the pager permanently, set \
183− BAT_PAGER to an empty string.",
191+ BAT_PAGER to an empty string. \
192+ Possible values: *auto*, never, always.",
@@ -191,24 +200,15 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
191 .value_name("mode")
200 .value_name("mode")
192 .possible_values(&["auto", "never", "character"])
201 .possible_values(&["auto", "never", "character"])
193 .default_value("auto")
202 .default_value("auto")
194− .help("Specify the text-wrapping mode.")
203+ .hide_default_value(true)
195− .long_help("Specify the text-wrapping mode."),
204+ .help("Specify the text-wrapping mode (*auto*, never, character).")
196− )
205+ .long_help("Specify the text-wrapping mode (*auto*, never, character)."),
198− Arg::with_name("unbuffered")
200− .hidden_short_help(true)
202− "This option exists for POSIX-compliance reasons ('u' is for \
203− 'unbuffered'). The output is always unbuffered - this option \
204− is simply ignored.",
208 Arg::with_name("tabs")
208 Arg::with_name("tabs")
209 .long("tabs")
209 .long("tabs")
210 .takes_value(true)
210 .takes_value(true)
211− .value_name("tabs")
211+ .value_name("T")
212 .validator(
212 .validator(
214 t.parse::<u32>()
214 t.parse::<u32>()
@@ -217,12 +217,23 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
217 .map_err(|e| e.to_string())
217 .map_err(|e| e.to_string())
218 }, // Convert to Result<(), String>
218 }, // Convert to Result<(), String>
220− .help("Sets the tab width.")
220+ .help("Set the tab width to T spaces.")
221 .long_help(
221 .long_help(
222− "Sets the tab width. Use a width of 0 to pass tabs through \
222+ "Set the tab width to T spaces. Use a width of 0 to pass tabs through \
223 directly",
223 directly",
227+ Arg::with_name("unbuffered")
230+ .hidden_short_help(true)
232+ "This option exists for POSIX-compliance reasons ('u' is for \
233+ 'unbuffered'). The output is always unbuffered - this option \
234+ is simply ignored.",
227 Arg::with_name("terminal-width")
238 Arg::with_name("terminal-width")
228 .long("terminal-width")
239 .long("terminal-width")