1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-01 10:52:24 +01:00

Generalize --detect-color-scheme to --color-scheme

This commit is contained in:
Tau Gärtli
2024-07-18 17:36:57 +02:00
parent abf9dada04
commit b9b981f657
11 changed files with 140 additions and 69 deletions

View File

@@ -114,22 +114,22 @@ Options:
add the '--theme="..."' option to the configuration file or export the BAT_THEME
environment variable (e.g.: export BAT_THEME="...").
--detect-color-scheme <when>
Specify when to query the terminal for its colors in order to pick an appropriate syntax
highlighting theme. Use '--theme-light' and '--theme-dark' (or the environment variables
BAT_THEME_LIGHT and BAT_THEME_DARK) to configure which themes are picked. You may also use
'--theme' to set a theme that is used regardless of the terminal's colors.
--color-scheme <scheme>
Specify whether to choose a dark or light syntax highlighting theme. Use '--theme-light'
and '--theme-dark' (or the environment variables BAT_THEME_LIGHT and BAT_THEME_DARK) to
configure which themes are picked. You may also use '--theme' to set a theme that is used
regardless of this choice.
Possible values:
* auto (default):
Only query the terminals colors if the output is not redirected. This is to prevent
race conditions with pagers such as less.
* never
Never query the terminal for its colors and assume that the terminal has a dark
background.
* always
Always query the terminal for its colors, regardless of whether or not the output is
redirected.
Query the terminals for its color scheme if the output is not redirected. This is to
prevent race conditions with pagers such as less.
* 'auto:always':
Always query the terminal for its color scheme, regardless of whether or not the
output is redirected.
* dark: Use a dark syntax highlighting theme.
* light: Use a light syntax highlighting theme.
* system: Query the OS for its color scheme. Only works on macOS.
--theme-light <theme>
Sets the theme name for syntax highlighting used when the terminal uses a light

View File

@@ -41,8 +41,8 @@ Options:
Use the specified syntax for files matching the glob pattern ('*.cpp:C++').
--theme <theme>
Set the color theme for syntax highlighting.
--detect-color-scheme <when>
Specify when to query the terminal for its colors.
--color-scheme <scheme>
Specify whether to choose a dark or light theme.
--theme-light <theme>
Sets the color theme for syntax highlighting used for light backgrounds.
--theme-dark <theme>