mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-10-30 22:54:07 +00:00 
			
		
		
		
	Update help, man page and completions
This commit is contained in:
		
							
								
								
									
										7
									
								
								assets/completions/bat.bash.in
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								assets/completions/bat.bash.in
									
									
									
									
										vendored
									
									
								
							| @@ -112,7 +112,12 @@ _bat() { | ||||
| 		COMPREPLY=($(compgen -c -- "$cur")) | ||||
| 		return 0 | ||||
| 		;; | ||||
| 	--theme | \ | ||||
| 	--theme) | ||||
|     	local IFS=$'\n' | ||||
|     	COMPREPLY=($(compgen -W "auto${IFS}auto:always${IFS}auto:system${IFS}dark${IFS}light${IFS}$("$1" --list-themes)" -- "$cur")) | ||||
|                     __bat_escape_completions | ||||
|     	return 0 | ||||
|     	;; | ||||
| 	--theme-dark | \ | ||||
| 	--theme-light) | ||||
| 		local IFS=$'\n' | ||||
|   | ||||
							
								
								
									
										10
									
								
								assets/completions/bat.fish.in
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								assets/completions/bat.fish.in
									
									
									
									
										vendored
									
									
								
							| @@ -129,6 +129,14 @@ set -l tabs_opts ' | ||||
|     8\t | ||||
| ' | ||||
|  | ||||
| set -l special_themes ' | ||||
|     auto\tdefault,\ Choose\ a\ theme\ based\ on\ dark\ or\ light\ mode | ||||
|     auto:always\tChoose\ a\ theme\ based\ on\ dark\ or\ light\ mode | ||||
|     auto:system\tChoose\ a\ theme\ based\ on\ dark\ or\ light\ mode | ||||
|     dark\tUse\ the\ theme\ specified\ by\ --theme-dark | ||||
|     light\tUse\ the\ theme\ specified\ by\ --theme-light | ||||
| ' | ||||
|  | ||||
| # Completions: | ||||
|  | ||||
| complete -c $bat -l acknowledgements -d "Print acknowledgements" -n __fish_is_first_arg | ||||
| @@ -203,7 +211,7 @@ complete -c $bat -l tabs -x -a "$tabs_opts" -d "Set tab width" -n __bat_no_excl_ | ||||
|  | ||||
| complete -c $bat -l terminal-width -x -d "Set terminal <width>, +<offset>, or -<offset>" -n __bat_no_excl_args | ||||
|  | ||||
| complete -c $bat -l theme -x -a "(command $bat --list-themes | command cat)" -d "Set the syntax highlighting theme" -n __bat_no_excl_args | ||||
| complete -c $bat -l theme -x -a "$special_themes(command $bat --list-themes | command cat)" -d "Set the syntax highlighting theme" -n __bat_no_excl_args | ||||
|  | ||||
| complete -c $bat -l theme-dark -x -a "(command $bat --list-themes | command cat)" -d "Set the syntax highlighting theme for dark backgrounds" -n __bat_no_excl_args | ||||
|  | ||||
|   | ||||
							
								
								
									
										10
									
								
								assets/completions/bat.zsh.in
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								assets/completions/bat.zsh.in
									
									
									
									
										vendored
									
									
								
							| @@ -42,7 +42,7 @@ _{{PROJECT_EXECUTABLE}}_main() { | ||||
|         --decorations='[specify when to show the decorations]:when:(auto never always)' | ||||
|         --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' | ||||
|         '(--theme)'--theme='[set the color theme for syntax highlighting]:theme:->theme_preferences' | ||||
|         '(--theme-dark)'--theme-dark='[set the color theme for syntax highlighting for dark backgrounds]:theme:->themes' | ||||
|         '(--theme-light)'--theme-light='[set the color theme for syntax highlighting for light backgrounds]:theme:->themes' | ||||
|         '(: --list-themes --list-languages -L)'--list-themes'[show all supported highlighting themes]' | ||||
| @@ -84,7 +84,13 @@ _{{PROJECT_EXECUTABLE}}_main() { | ||||
|  | ||||
|         themes) | ||||
|             local -a themes expl | ||||
|             themes=( ${(f)"$(_call_program themes {{PROJECT_EXECUTABLE}} --list-themes)"} ) | ||||
|             themes=(${(f)"$(_call_program themes {{PROJECT_EXECUTABLE}} --list-themes)"} ) | ||||
|  | ||||
|             _wanted themes expl 'theme' compadd -a themes && ret=0 | ||||
|         ;; | ||||
|         theme_preferences) | ||||
|             local -a themes expl | ||||
|             themes=(auto dark light auto:always auto:system ${(f)"$(_call_program themes {{PROJECT_EXECUTABLE}} --list-themes)"} ) | ||||
|  | ||||
|             _wanted themes expl 'theme' compadd -a themes && ret=0 | ||||
|         ;; | ||||
|   | ||||
							
								
								
									
										19
									
								
								assets/manual/bat.1.in
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								assets/manual/bat.1.in
									
									
									
									
										vendored
									
									
								
							| @@ -155,20 +155,35 @@ will use JSON syntax, and ignore '.dev' | ||||
| Set the theme for syntax highlighting. Use \fB\-\-list\-themes\fP to see all available themes. | ||||
| To set a default theme, add the \fB\-\-theme="..."\fP option to the configuration file or | ||||
| export the \fBBAT_THEME\fP environment variable (e.g.: \fBexport BAT_THEME="..."\fP). | ||||
|  | ||||
| Special values: | ||||
| .RS | ||||
| .IP "auto (\fIdefault\fR)" | ||||
| Picks a dark or light theme depending on the terminal's colors. | ||||
| Use \fB-\-theme\-light\fR and \fB-\-theme\-dark\fR to customize the selected theme. | ||||
| .IP "auto:always" | ||||
| Variation of \fBauto\fR where where the terminal's colors are detected even when the output is redirected. | ||||
| .IP "auto:system (macOS only)" | ||||
| Variation of \fBauto\fR where the color scheme is detected from the system-wide preference instead. | ||||
| .IP "dark" | ||||
| Use the dark theme specified by \fB-\-theme-dark\fR. | ||||
| .IP "light" | ||||
| Use the light theme specified by \fB-\-theme-light\fR. | ||||
| .RE | ||||
| .HP | ||||
| \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 | ||||
| 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. | ||||
| This option only has an effect when \fB\-\-theme\fP option is set to \fBauto\fR or \fBdark\fR. | ||||
| .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 | ||||
| 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. | ||||
| This option only has an effect when \fB\-\-theme\fP option is set to \fBauto\fR or \fBlight\fR. | ||||
| .HP | ||||
| \fB\-\-list\-themes\fR | ||||
| .IP | ||||
|   | ||||
		Reference in New Issue
	
	Block a user