1
0
mirror of https://github.com/sharkdp/bat.git synced 2026-02-08 00:32:08 +00:00

Add missing shell completions for various CLI arguments

This commit is contained in:
Keith Hall
2025-09-27 16:04:09 +03:00
parent e3f92c0975
commit 8e90efb2b4
4 changed files with 59 additions and 2 deletions

View File

@@ -80,6 +80,7 @@ _bat() {
--line-range | \
-L | --list-languages | \
--lessopen | \
--no-paging | \
--diagnostic | \
--acknowledgements | \
-h | --help | \
@@ -100,6 +101,22 @@ _bat() {
COMPREPLY=($(compgen -W "auto never character" -- "$cur"))
return 0
;;
--binary)
COMPREPLY=($(compgen -W "no-printing as-text" -- "$cur"))
return 0
;;
--nonprintable-notation)
COMPREPLY=($(compgen -W "unicode caret" -- "$cur"))
return 0
;;
--strip-ansi)
COMPREPLY=($(compgen -W "auto never always" -- "$cur"))
return 0
;;
--completion)
COMPREPLY=($(compgen -W "bash fish zsh ps1" -- "$cur"))
return 0
;;
--color | --decorations | --paging)
COMPREPLY=($(compgen -W "auto never always" -- "$cur"))
return 0
@@ -157,6 +174,8 @@ _bat() {
# --unbuffered excluded intentionally (no-op)
COMPREPLY=($(compgen -W "
--show-all
--nonprintable-notation
--binary
--plain
--language
--highlight-line
@@ -173,6 +192,7 @@ _bat() {
--decorations
--force-colorization
--paging
--no-paging
--pager
--map-syntax
--ignored-suffix
@@ -182,10 +202,12 @@ _bat() {
--list-themes
--squeeze-blank
--squeeze-limit
--strip-ansi
--style
--line-range
--list-languages
--lessopen
--completion
--diagnostic
--acknowledgements
--set-terminal-title