summaryrefslogtreecommitdiffstats
path: root/assets/completions
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2022-09-10 10:08:54 +0300
committerDavid Peter <sharkdp@users.noreply.github.com>2022-09-11 21:54:22 +0200
commite96cdc3b9505229fb00833cef9096b19fd148d6f (patch)
tree648d262bdcfc93b378584268724135571b58b4ea /assets/completions
parent8bd5a88f07f1e919edba1b93c4e8c2feb80eac85 (diff)
Split bash completion option lists over multiple lines, sync sort with --help
For maintainability/diffability.
Diffstat (limited to 'assets/completions')
-rw-r--r--assets/completions/bat.bash.in62
1 files changed, 50 insertions, 12 deletions
diff --git a/assets/completions/bat.bash.in b/assets/completions/bat.bash.in
index 97e32a0a..9f54c966 100644
--- a/assets/completions/bat.bash.in
+++ b/assets/completions/bat.bash.in
@@ -27,7 +27,12 @@ _bat() {
;;
esac
COMPREPLY=($(compgen -W "
- --build --clear --source --target --blank --help
+ --build
+ --clear
+ --source
+ --target
+ --blank
+ --help
" -- "$cur"))
return 0
fi
@@ -43,10 +48,20 @@ _bat() {
compopt -o filenames # for escaping
return 0
;;
- -H | --highlight-line | --diff-context | --tabs | --terminal-width | \
- -m | --map-syntax | --style | --line-range | -h | --help | -V | \
- --version | --diagnostic | --config-file | --config-dir | \
- --cache-dir | --generate-config-file)
+ -H | --highlight-line | \
+ --diff-context | \
+ --tabs | \
+ --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
# causes an exit
return 0
@@ -83,13 +98,36 @@ _bat() {
if [[ $cur == -* ]]; then
COMPREPLY=($(compgen -W "
- --show-all --plain --language --highlight-line
- --file-name --diff --diff-context --tabs --wrap
- --terminal-width --number --color --italic-text
- --decorations --paging --pager --map-syntax --theme
- --list-themes --style --line-range --list-languages
- --help --version --force-colorization --unbuffered
- --diagnostic --config-file --config-dir --cache-dir
+ --show-all
+ --plain
+ --language
+ --highlight-line
+ --file-name
+ --diff
+ --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
" -- "$cur"))
return 0