@@ -56,19 +56,19 @@ impl App {
5656 .short("l")
5757 .long("language")
5858 .overrides_with("language")
59− .help("Set the language for highlighting")
59+ .help("Set the language for syntax highlighting")
6060 .long_help(
61− "Set the language for syntax highlighting. The language can be \
62− specified as a name (like 'C++' or 'LaTeX') or possible file \
63− extension (like 'cpp', 'hpp' or 'md'). Use '--list-languages' \
64− to show all supported language names and file extensions",
61+ "Explicitly set the language for syntax highlighting. The language can be \
62+ specified as a name (like 'C++' or 'LaTeX') or possible file extension \
63+ (like 'cpp', 'hpp' or 'md'). Use '--list-languages' to show all supported \
64+ language names and file extensions."
6565 ).takes_value(true),
6666 ).arg(
6767 Arg::with_name("FILE")
6868 .help("File(s) to print / concatenate. Use '-' for standard input.")
6969 .long_help(
70− "File(s) to print. Use no argument or '-' to read from standard \
71− input",
70+ "File(s) to print / concatenate. Use a dash ('-') or no argument at all \
71+ to read from standard input.",
7272 ).multiple(true)
7373 .empty_values(false),
7474 ).arg(
@@ -96,7 +96,9 @@ impl App {
9696 .value_name("when")
9797 .possible_values(&["auto", "never", "always"])
9898 .default_value("auto")
99− .help("When to use colors"),
99+ .help("When to use colors")
100+ .long_help("Specify when to use colored output. The automatic mode \
101+ only enables colors if an interactive terminal is detected."),
100102 ).arg(
101103 Arg::with_name("paging")
102104 .long("paging")
@@ -106,7 +108,11 @@ impl App {
106108 .possible_values(&["auto", "never", "always"])
107109 .default_value("auto")
108110 .help("When to use the pager")
109− .long_help("Specify when to use the pager (less)"),
111+ .long_help("Specify when to use the pager. To control which pager \
112+ is used, set the PAGER or BAT_PAGER environment \
113+ variables (the latter takes precedence). The default \
114+ pager is 'less'. To disable the pager permanently, set \
115+ BAT_PAGER to an empty string."),
110116 ).arg(
111117 Arg::with_name("wrap")
112118 .long("wrap")
@@ -115,43 +121,45 @@ impl App {
115121 .value_name("mode")
116122 .possible_values(&["character", "never"])
117123 .default_value("character")
118− .help("When to wrap text"),
124+ .help("Specify the text-wrapping mode")
125+ .long_help("Specify the text-wrapping mode."),
119126 ).arg(
120127 Arg::with_name("list-languages")
121128 .long("list-languages")
122− .help("Displays supported languages")
123− .long_help("Display a list of supported languages"),
129+ .conflicts_with("list-themes")
130+ .help("Display all supported languages")
131+ .long_help("Display a list of supported languages for syntax highlighting."),
124132 ).arg(
125133 Arg::with_name("theme")
126134 .long("theme")
127135 .overrides_with("theme")
128136 .takes_value(true)
129− .help("Set the theme for highlighting")
137+ .help("Set the color theme for syntax highlighting")
130138 .long_help(
131139 "Set the theme for syntax highlighting. Use '--list-themes' to \
132− see all available themes. To set a default theme export the \
133− BAT_THEME environment variable e.g. use export \
134− BAT_THEME=\"TwoDark\" in your shells startup file to \
135− permanently use the TwoDark theme.",
140+ see all available themes. To set a default theme, export the \
141+ BAT_THEME environment variable (e.g.: export \
142+ BAT_THEME=\"TwoDark\").",
136143 ),
137144 ).arg(
138145 Arg::with_name("line-range")
139146 .long("line-range")
140147 .overrides_with("line-range")
141148 .takes_value(true)
142− .value_name("n:m")
143− .help("Only print the lines from n to m")
149+ .value_name("N:M")
150+ .help("Only print the lines from N to M")
144151 .long_help(
145− "Print a specified range or ranges of lines from the files. \
146− For example: '--line-range 30:40' will print lines 30 to 40 \n\
147− '--line-range :40' will print lines 1 to 40 \n\
148− '--line-range 40:' will print lines 40 to the end of the file",
152+ "Only print the specified range of lines for each file. \
153+ For example:\n \
154+ '--line-range 30:40' prints lines 30 to 40\n \
155+ '--line-range :40' prints lines 1 to 40\n \
156+ '--line-range 40:' prints lines 40 to the end of the file",
149157 ),
150158 ).arg(
151159 Arg::with_name("list-themes")
152160 .long("list-themes")
153161 .help("Displays supported themes")
154− .help("Display a list of supported themes for syntax highlighting"),
162+ .help("Display a list of supported themes for syntax highlighting."),
155163 ).arg(
156164 Arg::with_name("number")
157165 .long("number")
@@ -160,14 +168,13 @@ impl App {
160168 .conflicts_with("style")
161169 .help("Show line numbers (alias for '--style=numbers')")
162170 .long_help(
163− "Show line numbers (no other decorations). This is an alias for \
171+ "Only show line numbers, no other decorations. This is an alias for \
164172 '--style=numbers'",
165173 ),
166174 ).arg(
167175 Arg::with_name("unbuffered")
168176 .short("u")
169− .help("(ignored)")
170− // TODO: use '.hidden_short_help(true)' when the next clap version is released
177+ .hidden_short_help(true)
171178 .long_help(
172179 "This option exists for POSIX-compliance reasons ('u' is for \
173180 'unbuffered'). The output is always unbuffered - this option \