Commit d826d70b9bfd511e959f92238b638a8fd6531d5a

Pierre Le Marre 2023-11-07T12:58:36

xkbcli: Fix bash completion `compgen` expect command options list formatted as a newline-separated list. Add a missing newline when concatenating two lists.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tools/xkbcli-bash-completion.sh b/tools/xkbcli-bash-completion.sh
index c900e0f..738faa2 100755
--- a/tools/xkbcli-bash-completion.sh
+++ b/tools/xkbcli-bash-completion.sh
@@ -95,6 +95,8 @@ ___xkbcli_subcommand()
     # • https://github.com/scop/bash-completion/blob/fdf4456186eb4548ef628e65fb1be73d8e4695e9/bash_completion.d/000_bash_completion_compat.bash#L311
     # We need both as the current help messages adopt both GNU and BSD styles.
     opts=$(_parse_usage xkbcli "$1 --help")
+    opts+="
+    "
     opts+=$(_parse_help xkbcli "$1 --help")
     local cur="${COMP_WORDS[COMP_CWORD]}"
     COMPREPLY=($(compgen -W "$opts" -- "$cur"))