mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-02 03:12:25 +01:00
Merge color scheme options into theme / BAT_THEME
This commit is contained in:
1
assets/completions/_bat.ps1.in
vendored
1
assets/completions/_bat.ps1.in
vendored
@@ -32,7 +32,6 @@ Register-ArgumentCompleter -Native -CommandName '{{PROJECT_EXECUTABLE}}' -Script
|
||||
[CompletionResult]::new('--color', 'color', [CompletionResultType]::ParameterName, 'When to use colors (*auto*, never, always).')
|
||||
[CompletionResult]::new('--italic-text', 'italic-text', [CompletionResultType]::ParameterName, 'Use italics in output (always, *never*)')
|
||||
[CompletionResult]::new('--decorations', 'decorations', [CompletionResultType]::ParameterName, 'When to show the decorations (*auto*, never, always).')
|
||||
[CompletionResult]::new('--color-scheme', 'color-scheme', [CompletionResultType]::ParameterName, 'Whether to choose a dark or light syntax highlighting theme (*auto*, auto:always, dark, light, system).')
|
||||
[CompletionResult]::new('--paging', 'paging', [CompletionResultType]::ParameterName, 'Specify when to use the pager, or use `-P` to disable (*auto*, never, always).')
|
||||
[CompletionResult]::new('--pager', 'pager', [CompletionResultType]::ParameterName, 'Determine which pager to use.')
|
||||
[CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'Use the specified syntax for files matching the glob pattern (''*.cpp:C++'').')
|
||||
|
3
assets/completions/bat.bash.in
vendored
3
assets/completions/bat.bash.in
vendored
@@ -104,8 +104,6 @@ _bat() {
|
||||
COMPREPLY=($(compgen -W "auto never always" -- "$cur"))
|
||||
return 0
|
||||
;;
|
||||
--color-scheme)
|
||||
COMPREPLY=($(compgen -W "auto auto:always dark light system" -- "$cur"))
|
||||
--italic-text)
|
||||
COMPREPLY=($(compgen -W "always never" -- "$cur"))
|
||||
return 0
|
||||
@@ -176,7 +174,6 @@ _bat() {
|
||||
--theme
|
||||
--theme-dark
|
||||
--theme-light
|
||||
--color-scheme
|
||||
--list-themes
|
||||
--squeeze-blank
|
||||
--squeeze-limit
|
||||
|
9
assets/completions/bat.fish.in
vendored
9
assets/completions/bat.fish.in
vendored
@@ -99,13 +99,6 @@ set -l color_opts '
|
||||
'
|
||||
set -l decorations_opts $color_opts
|
||||
set -l paging_opts $color_opts
|
||||
set -l color_scheme_opts "
|
||||
auto\t'Use the terminal\'s color scheme if the output is not redirected (default)'
|
||||
auto:always\t'Always use the terminal\'s color scheme'
|
||||
dark\t'Use a dark syntax highlighting theme'
|
||||
light\t'Use a light syntax highlighting theme'
|
||||
system\t'Query the OS for its color scheme (macOS only)'
|
||||
"
|
||||
|
||||
# Include some examples so we can indicate the default.
|
||||
set -l pager_opts '
|
||||
@@ -150,8 +143,6 @@ complete -c $bat -l config-file -f -d "Display location of configuration file" -
|
||||
|
||||
complete -c $bat -l decorations -x -a "$decorations_opts" -d "When to use --style decorations" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l color-scheme -x -a "$color_scheme_opts" -d "Whether to choose a dark or light syntax highlighting theme" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l diagnostic -d "Print diagnostic info for bug reports" -n __fish_is_first_arg
|
||||
|
||||
complete -c $bat -s d -l diff -d "Only show lines with Git changes" -n __bat_no_excl_args
|
||||
|
1
assets/completions/bat.zsh.in
vendored
1
assets/completions/bat.zsh.in
vendored
@@ -40,7 +40,6 @@ _{{PROJECT_EXECUTABLE}}_main() {
|
||||
--color='[specify when to use colors]:when:(auto never always)'
|
||||
--italic-text='[use italics in output]:when:(always never)'
|
||||
--decorations='[specify when to show the decorations]:when:(auto never always)'
|
||||
--color-scheme="[whether to choose a dark or light syntax highlighting theme]:scheme:(auto auto:always dark light system)"
|
||||
--paging='[specify when to use the pager]:when:(auto never always)'
|
||||
'(-m --map-syntax)'{-m+,--map-syntax=}'[map a glob pattern to an existing syntax name]: :->syntax-maps'
|
||||
'(--theme)'--theme='[set the color theme for syntax highlighting]:theme:->themes'
|
||||
|
26
assets/manual/bat.1.in
vendored
26
assets/manual/bat.1.in
vendored
@@ -117,24 +117,6 @@ Specify when to use the decorations that have been specified via '\-\-style'. Th
|
||||
automatic mode only enables decorations if an interactive terminal is detected. Possible
|
||||
values: *auto*, never, always.
|
||||
.HP
|
||||
\fB\-\-detect\-color\-scheme\fR <when>
|
||||
.IP
|
||||
Specify when to query the terminal for its colors in order to pick an appropriate syntax
|
||||
highlighting theme. Use \fB\-\-theme-light\fP and \fB\-\-theme-dark\fP (or the environment variables
|
||||
\fBBAT_THEME_LIGHT\fP and \fBBAT_THEME_DARK\fP) to configure which themes are picked. You can also use
|
||||
\fP\-\-theme\fP to set a theme that is used regardless of the terminal's colors.
|
||||
.IP
|
||||
\fI<when>\fP can be one of:
|
||||
.RS
|
||||
.IP "\fBauto\fP"
|
||||
Only query the terminals colors if the output is not redirected. This is to prevent
|
||||
race conditions with pagers such as less.
|
||||
.IP "never"
|
||||
Never query the terminal for its colors and assume that the terminal has a dark background.
|
||||
.IP "always"
|
||||
Always query the terminal for its colors, regardless of whether or not the output is redirected.
|
||||
.RE
|
||||
.HP
|
||||
\fB\-f\fR, \fB\-\-force\-colorization\fR
|
||||
.IP
|
||||
Alias for '--decorations=always --color=always'. This is useful \
|
||||
@@ -177,14 +159,14 @@ export the \fBBAT_THEME\fP environment variable (e.g.: \fBexport BAT_THEME="..."
|
||||
\fB\-\-theme\-dark\fR <theme>
|
||||
.IP
|
||||
Sets the theme name for syntax highlighting used when the terminal uses a dark background.
|
||||
To set a default theme, add the \fB\-\-theme-dark="..."\fP option to the configuration file or
|
||||
To set a default theme, add the \fB\-\-theme-dark="..."\fP option to the configuration file or
|
||||
export the \fBBAT_THEME_DARK\fP environment variable (e.g. \fBexport BAT_THEME_DARK="..."\fP).
|
||||
This option is ignored if \fB\-\-theme\fP option is set.
|
||||
.HP
|
||||
\fB\-\-theme\-light\fR <theme>
|
||||
.IP
|
||||
Sets the theme name for syntax highlighting used when the terminal uses a dark background.
|
||||
To set a default theme, add the \fB\-\-theme-dark="..."\fP option to the configuration file or
|
||||
To set a default theme, add the \fB\-\-theme-dark="..."\fP option to the configuration file or
|
||||
export the \fBBAT_THEME_LIGHT\fP environment variable (e.g. \fBexport BAT_THEME_LIGHT="..."\fP).
|
||||
This option is ignored if \fB\-\-theme\fP option is set.
|
||||
.HP
|
||||
@@ -339,7 +321,7 @@ To use the preprocessor, call:
|
||||
|
||||
\fB{{PROJECT_EXECUTABLE}} --lessopen\fR
|
||||
|
||||
Alternatively, the preprocessor may be enabled by default by adding the '\-\-lessopen' option to the configuration file.
|
||||
Alternatively, the preprocessor may be enabled by default by adding the '\-\-lessopen' option to the configuration file.
|
||||
|
||||
To temporarily disable the preprocessor if it is enabled by default, call:
|
||||
|
||||
@@ -355,7 +337,7 @@ Enable the $LESSOPEN preprocessor.
|
||||
.IP
|
||||
Disable the $LESSOPEN preprocessor if enabled (overrides --lessopen)
|
||||
.PP
|
||||
For more information, see the "INPUT PREPROCESSOR" section of less(1).
|
||||
For more information, see the "INPUT PREPROCESSOR" section of less(1).
|
||||
|
||||
.SH "MORE INFORMATION"
|
||||
|
||||
|
Reference in New Issue
Block a user