--- a/bash-completion.sh Tue May 11 18:30:50 2021 +0200
+++ b/bash-completion.sh Tue May 11 20:42:22 2021 +0200
@@ -22,15 +22,31 @@
w2=${COMP_WORDS[COMP_CWORD-2]}
w3=${COMP_WORDS[COMP_CWORD-3]}
+ BOOLEAN_VALUES=(
+ "true"
+ "false"
+ )
+
+ ENTITY_VALUES=(
+ "relation"
+ "attribute"
+ "value"
+ )
if [[ "$w1" == "--relation" && "x$w0" == "x" ]]; then COMPREPLY=("'.*'")
elif [[ "$w1" == "--attribute" && "x$w0" == "x" ]]; then COMPREPLY=("'.*'")
elif [[ "$w1" == "--pattern" && "x$w0" == "x" ]]; then COMPREPLY=("''")
+ elif [[ "$w1" == "--case-sensitive" ]]; then COMPREPLY=($(compgen -W "${ENTITY_VALUES[*]}" -- "$w0"))
+ elif [[ "$w2" == "--case-sensitive" ]]; then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
+ elif [[ "$w1" == "--invert-match" ]]; then COMPREPLY=($(compgen -W "${ENTITY_VALUES[*]}" -- "$w0"))
+ elif [[ "$w2" == "--invert-match" ]]; then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
else
OPTIONS=(
"--relation"
"--attribute"
"--pattern"
+ "--case-sensitive"
+ "--invert-match"
)
COMPREPLY=($(compgen -W "${OPTIONS[*]}" -- "$w0"))
fi