xkbcli: Fix bash completion

`compgen` expect command options list formatted as a newline-separated
list. Add a missing newline when concatenating two lists.
master
Pierre Le Marre 2023-11-07 12:58:36 +01:00 committed by Wismill
parent bc330c00e6
commit d826d70b9b
1 changed files with 2 additions and 0 deletions

View File

@ -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"))