|
|
@ -27,7 +27,12 @@ _bat() {
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
esac
|
|
|
|
COMPREPLY=($(compgen -W "
|
|
|
|
COMPREPLY=($(compgen -W "
|
|
|
|
--build --clear --source --target --blank --help
|
|
|
|
--build
|
|
|
|
|
|
|
|
--clear
|
|
|
|
|
|
|
|
--source
|
|
|
|
|
|
|
|
--target
|
|
|
|
|
|
|
|
--blank
|
|
|
|
|
|
|
|
--help
|
|
|
|
" -- "$cur"))
|
|
|
|
" -- "$cur"))
|
|
|
|
return 0
|
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
fi
|
|
|
@ -43,10 +48,20 @@ _bat() {
|
|
|
|
compopt -o filenames # for escaping
|
|
|
|
compopt -o filenames # for escaping
|
|
|
|
return 0
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
-H | --highlight-line | --diff-context | --tabs | --terminal-width | \
|
|
|
|
-H | --highlight-line | \
|
|
|
|
-m | --map-syntax | --style | --line-range | -h | --help | -V | \
|
|
|
|
--diff-context | \
|
|
|
|
--version | --diagnostic | --config-file | --config-dir | \
|
|
|
|
--tabs | \
|
|
|
|
--cache-dir | --generate-config-file)
|
|
|
|
--terminal-width | \
|
|
|
|
|
|
|
|
-m | --map-syntax | \
|
|
|
|
|
|
|
|
--style | \
|
|
|
|
|
|
|
|
--line-range | \
|
|
|
|
|
|
|
|
--diagnostic | \
|
|
|
|
|
|
|
|
-h | --help | \
|
|
|
|
|
|
|
|
-V | --version | \
|
|
|
|
|
|
|
|
--cache-dir | \
|
|
|
|
|
|
|
|
--config-dir | \
|
|
|
|
|
|
|
|
--config-file | \
|
|
|
|
|
|
|
|
--generate-config-file)
|
|
|
|
# argument required but no completion available, or option
|
|
|
|
# argument required but no completion available, or option
|
|
|
|
# causes an exit
|
|
|
|
# causes an exit
|
|
|
|
return 0
|
|
|
|
return 0
|
|
|
@ -83,13 +98,36 @@ _bat() {
|
|
|
|
|
|
|
|
|
|
|
|
if [[ $cur == -* ]]; then
|
|
|
|
if [[ $cur == -* ]]; then
|
|
|
|
COMPREPLY=($(compgen -W "
|
|
|
|
COMPREPLY=($(compgen -W "
|
|
|
|
--show-all --plain --language --highlight-line
|
|
|
|
--show-all
|
|
|
|
--file-name --diff --diff-context --tabs --wrap
|
|
|
|
--plain
|
|
|
|
--terminal-width --number --color --italic-text
|
|
|
|
--language
|
|
|
|
--decorations --paging --pager --map-syntax --theme
|
|
|
|
--highlight-line
|
|
|
|
--list-themes --style --line-range --list-languages
|
|
|
|
--file-name
|
|
|
|
--help --version --force-colorization --unbuffered
|
|
|
|
--diff
|
|
|
|
--diagnostic --config-file --config-dir --cache-dir
|
|
|
|
--diff-context
|
|
|
|
|
|
|
|
--tabs
|
|
|
|
|
|
|
|
--wrap
|
|
|
|
|
|
|
|
--terminal-width
|
|
|
|
|
|
|
|
--number
|
|
|
|
|
|
|
|
--color
|
|
|
|
|
|
|
|
--italic-text
|
|
|
|
|
|
|
|
--decorations
|
|
|
|
|
|
|
|
--force-colorization
|
|
|
|
|
|
|
|
--paging
|
|
|
|
|
|
|
|
--pager
|
|
|
|
|
|
|
|
--map-syntax
|
|
|
|
|
|
|
|
--theme
|
|
|
|
|
|
|
|
--list-themes
|
|
|
|
|
|
|
|
--style
|
|
|
|
|
|
|
|
--line-range
|
|
|
|
|
|
|
|
--list-languages
|
|
|
|
|
|
|
|
--unbuffered
|
|
|
|
|
|
|
|
--diagnostic
|
|
|
|
|
|
|
|
--help
|
|
|
|
|
|
|
|
--version
|
|
|
|
|
|
|
|
--cache-dir
|
|
|
|
|
|
|
|
--config-dir
|
|
|
|
|
|
|
|
--config-file
|
|
|
|
--generate-config-file
|
|
|
|
--generate-config-file
|
|
|
|
" -- "$cur"))
|
|
|
|
" -- "$cur"))
|
|
|
|
return 0
|
|
|
|
return 0
|
|
|
|