--- a/bash-completion.sh Sat Nov 21 20:09:18 2020 +0100
+++ b/bash-completion.sh Sun Nov 22 00:44:00 2020 +0100
@@ -22,10 +22,25 @@
w2=${COMP_WORDS[COMP_CWORD-2]}
w3=${COMP_WORDS[COMP_CWORD-3]}
+ BOOLEAN_VALUES=(
+ "true"
+ "false"
+ )
+
if [[ "$w1" == "--relation" && "x$w0" == "x" ]]; then COMPREPLY=("''")
+ elif [[ "$w1" == "--enable-sections" ]]; then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
+ elif [[ "$w1" == "--enable-subkeys" ]]; then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
+ elif [[ "$w1" == "--enable-comments" ]]; then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
+ elif [[ "$w1" == "--enable-line-numbers" ]]; then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
+ elif [[ "$w1" == "--enable-event-numbers" ]]; then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
else
OPTIONS=(
"--relation"
+ "--enable-sections"
+ "--enable-subkeys"
+ "--enable-comments"
+ "--enable-line-numbers"
+ "--enable-event-numbers"
)
COMPREPLY=($(compgen -W "${OPTIONS[*]}" -- "$w0"))
fi