--- a/bash-completion.sh Sun May 08 21:42:25 2022 +0200
+++ b/bash-completion.sh Sun Jun 05 00:08:52 2022 +0200
@@ -22,22 +22,22 @@
w2=${COMP_WORDS[COMP_CWORD-2]}
w3=${COMP_WORDS[COMP_CWORD-3]}
- DATA_TYPE=(
- "string"
- "integer"
- "boolean"
- )
-
- BOOLEAN_VALUES=(
- "true"
- "false"
+ CONNECTION_OPTIONS=(
+ "username"
+ "password"
)
if [[ "$w1" == "--relation" && "x$w0" == "x" ]]; then COMPREPLY=("''")
+ elif [[ "$w1" == "--connection-string" && "x$w0" == "x" ]]; then COMPREPLY=("'mqtt://localhost:1883'")
+ elif [[ "$w1" == "--connection-option" ]]; then COMPREPLY=($(compgen -W "${CONNECTION_OPTIONS[*]}" -- "$w0"))
+ elif [[ "$w2" == "--connection-option" && "x$w0" == "x" ]]; then COMPREPLY=("''")
elif [[ "$w1" == "--stream" && "x$w0" == "x" ]]; then COMPREPLY=("''")
else
OPTIONS=(
"--relation"
+ #"--connection-name"
+ "--connection-string"
+ "--connection-option"
"--stream"
)
COMPREPLY=($(compgen -W "${OPTIONS[*]}" -- "$w0"))