mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-02 03:12:25 +01:00
Generalize --detect-color-scheme to --color-scheme
This commit is contained in:
2
assets/completions/_bat.ps1.in
vendored
2
assets/completions/_bat.ps1.in
vendored
@@ -32,7 +32,7 @@ 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('--detect-color-scheme', 'detect-color-scheme', [CompletionResultType]::ParameterName, 'When to detect the terminal''s color scheme (*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++'').')
|
||||
|
6
assets/completions/bat.bash.in
vendored
6
assets/completions/bat.bash.in
vendored
@@ -100,10 +100,12 @@ _bat() {
|
||||
COMPREPLY=($(compgen -W "auto never character" -- "$cur"))
|
||||
return 0
|
||||
;;
|
||||
--color | --decorations | --paging | --detect-color-scheme)
|
||||
--color | --decorations | --paging)
|
||||
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
|
||||
@@ -166,7 +168,6 @@ _bat() {
|
||||
--color
|
||||
--italic-text
|
||||
--decorations
|
||||
--detect-color-scheme
|
||||
--force-colorization
|
||||
--paging
|
||||
--pager
|
||||
@@ -175,6 +176,7 @@ _bat() {
|
||||
--theme
|
||||
--theme-dark
|
||||
--theme-light
|
||||
--color-scheme
|
||||
--list-themes
|
||||
--squeeze-blank
|
||||
--squeeze-limit
|
||||
|
10
assets/completions/bat.fish.in
vendored
10
assets/completions/bat.fish.in
vendored
@@ -99,7 +99,13 @@ set -l color_opts '
|
||||
'
|
||||
set -l decorations_opts $color_opts
|
||||
set -l paging_opts $color_opts
|
||||
set -l detect_color_scheme_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 '
|
||||
@@ -144,7 +150,7 @@ 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 detect-color-scheme -x -a "$detect_color_scheme_opts" -d "When to detect the terminal's color scheme" -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
|
||||
|
||||
|
2
assets/completions/bat.zsh.in
vendored
2
assets/completions/bat.zsh.in
vendored
@@ -40,7 +40,7 @@ _{{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)'
|
||||
--detect-color-scheme="[specify when to detect the terminal's color scheme]: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'
|
||||
|
Reference in New Issue
Block a user