mirror of
https://github.com/sharkdp/bat.git
synced 2025-08-16 19:13:23 +02:00
Expose new theme selection in CLI
This commit is contained in:
@ -109,9 +109,39 @@ Options:
|
||||
'bat --ignored-suffix ".dev" my_file.json.dev' will use JSON syntax, and ignore '.dev'
|
||||
|
||||
--theme <theme>
|
||||
Set the theme for syntax highlighting. Use '--list-themes' to see all available themes. To
|
||||
set a default theme, add the '--theme="..."' option to the configuration file or export
|
||||
the BAT_THEME environment variable (e.g.: export BAT_THEME="...").
|
||||
Set the theme for syntax highlighting. Note that this option overrides '--theme-dark' and
|
||||
'--theme-light'. Use '--list-themes' to see all available themes. To set a default theme,
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
--theme-light <theme>
|
||||
Sets the theme name for syntax highlighting used when the terminal uses a light
|
||||
background. Use '--list-themes' to see all available themes. To set a default theme, add
|
||||
the '--theme-light="..." option to the configuration file or export the BAT_THEME_LIGHT
|
||||
environment variable (e.g. export BAT_THEME_LIGHT="...").
|
||||
|
||||
--theme-dark <theme>
|
||||
Sets the theme name for syntax highlighting used when the terminal uses a dark background.
|
||||
Use '--list-themes' to see all available themes. To set a default theme, add the
|
||||
'--theme-dark="..." option to the configuration file or export the BAT_THEME_DARK
|
||||
environment variable (e.g. export BAT_THEME_DARK="...").
|
||||
|
||||
--list-themes
|
||||
Display a list of supported themes for syntax highlighting.
|
||||
|
@ -41,6 +41,12 @@ 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.
|
||||
--theme-light <theme>
|
||||
Sets the color theme for syntax highlighting used for light backgrounds.
|
||||
--theme-dark <theme>
|
||||
Sets the color theme for syntax highlighting used for dark backgrounds.
|
||||
--list-themes
|
||||
Display all supported highlighting themes.
|
||||
-s, --squeeze-blank
|
||||
|
Reference in New Issue
Block a user