on master help sign in
Hide alias in help, update man and completions

A long alias doesn't make sense, since `--paging=never` already exists

commitc264f747714a42318f1b33309778560ff9d6a8b0 authorDash Peters <dpeters@calacademy.org> dateThu 2 Jul 2020, 00:07 (6 years ago) parentf53ea60
4 files changed+20−20
CHANGELOG.md+1 assets/completions/bat.fish.in+2 assets/manual/bat.1.in+5−6 src/bin/bat/clap_app.rs+12−14
CHANGELOG.md+1
@@ -3,6 +3,7 @@
33## Features
44
55- Added support for the `NO_COLOR` environment variable, see #1021 and #1031 (@eth-p)
6+- Added `-P` short flag to disable paging, revised man page description, see #1075 and #1082 (@LordFlashmeow)
67
78## Bugfixes
89
assets/completions/bat.fish.in+2
@@ -52,6 +52,8 @@ complete -c {{PROJECT_EXECUTABLE}} -l paging -xka "auto never always" -d "Specif
5252
5353complete -c {{PROJECT_EXECUTABLE}} -s p -l plain -d "Only show plain style, no decorations. Alias for '--style=plain'" -n "not __fish_seen_subcommand_from cache"
5454
55+complete -c {{PROJECT_EXECUTABLE}} -s P -d "Disable paging. Alias for '--paging=never'" -n "not __fish_seen_subcommand_from cache"
56+
5557complete -c {{PROJECT_EXECUTABLE}} -s A -l show-all -d "Show non-printable characters like space/tab/newline" -n "not __fish_seen_subcommand_from cache"
5658
5759complete -c {{PROJECT_EXECUTABLE}} -l style -xka "auto full plain changes header grid numbers" -d "Comma-separated list of style elements or presets to display with file contents" -n "not __fish_seen_subcommand_from cache"
assets/manual/bat.1.in+5−6
@@ -89,15 +89,14 @@ values: *auto*, never, always.
8989.HP
9090\fB\-\-paging\fR <when>
9191.IP
92−Specify when to use the pager. To control which pager is used, set the PAGER or
93−BAT_PAGER environment variables (the latter takes precedence) or use the '\-\-pager'
94−option. To disable the pager permanently, set BAT_PAGER to an empty string or set
95−\&'\-\-paging=never' in the configuration file. Possible values: *auto*, never, always.
92+Specify when to use the pager. To disable the pager, use \&'\-\-paging=never' or its alias,
93+\fB-P\fR. To disable the pager permanently, set BAT_PAGER to an empty string. To control
94+which pager is used, see the '\-\-pager' option. Possible values: *auto*, never, always.
9695.HP
9796\fB\-\-pager\fR <command>
9897.IP
99−Determine which pager is used. This option will overwrite the PAGER and BAT_PAGER
100−environment variables. The default pager is 'less'. To disable the pager completely, use
98+Determine which pager is used. This option will override the PAGER and BAT_PAGER
99+environment variables. The default pager is 'less'. To control when the pager is used, see
101100the '\-\-paging' option. Example: '\-\-pager "less \fB\-RF\fR"'.
102101.HP
103102\fB\-m\fR, \fB\-\-map\-syntax\fR <glob-pattern:syntax-name>...
src/bin/bat/clap_app.rs+12−14
@@ -265,23 +265,22 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
265265 .possible_values(&["auto", "never", "always"])
266266 .default_value("auto")
267267 .hide_default_value(true)
268− .help("Specify when to use the pager (*auto*, never, always).")
268+ .help("Specify when to use the pager, or use `-P` to disable (*auto*, never, always).")
269269 .long_help(
270− "Specify when to use the pager. To control which pager \
271− is used, set the PAGER or BAT_PAGER environment \
272− variables (the latter takes precedence) or use the '--pager' option. \
273− To disable the pager permanently, set BAT_PAGER to an empty string \
274− or set '--paging=never' in the configuration file. \
275− Possible values: *auto*, never, always.",
270+ "Specify when to use the pager. To disable the pager, use \
271+ --paging=never' or its alias,'-P'. To disable the pager permanently, \
272+ set BAT_PAGER to an empty string. To control which pager is used, see the \
273+ '--pager' option. Possible values: *auto*, never, always."
276274 ),
277275 )
278276 .arg(
279277 Arg::with_name("no-paging")
280278 .short("P")
281− .long("no-paging")
282279 .alias("no-pager")
283280 .overrides_with("no-paging")
284− .help("Alias for --paging=never")
281+ .hidden(true)
282+ .hidden_short_help(true)
283+ .help("Alias for '--paging=never'")
285284 )
286285 .arg(
287286 Arg::with_name("pager")
@@ -292,11 +291,10 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
292291 .hidden_short_help(true)
293292 .help("Determine which pager to use.")
294293 .long_help(
295− "Determine which pager is used. This option will overwrite \
296− the PAGER and BAT_PAGER environment variables. The default \
297− pager is 'less'. To disable the pager completely, use the \
298− '--paging' option. \
299− Example: '--pager \"less -RF\"'.",
294+ "Determine which pager is used. This option will override the \
295+ PAGER and BAT_PAGER environment variables. The default pager is 'less'. \
296+ To control when the pager is used, see the '--paging' option. \
297+ Example: '--pager \"less -RF\"'."
300298 ),
301299 )
302300 .arg(