completion: Stop using old backtick quoting for subcommands

Fixes a shellcheck warning.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2024-04-16 13:54:33 +01:00
parent f95e8b4e7c
commit aaf715a046
No known key found for this signature in database
GPG Key ID: DCDF5885B1F3ED73
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ __app() {
2) 2)
case "${COMP_WORDS[1]}" in case "${COMP_WORDS[1]}" in
launch|action|list-actions) launch|action|list-actions)
COMPREPLY=($(compgen -W "`gapplication list-apps`" -- "${COMP_WORDS[2]}")) COMPREPLY=($(compgen -W "$(gapplication list-apps)" -- "${COMP_WORDS[2]}"))
return 0 return 0
;; ;;
@ -33,7 +33,7 @@ __app() {
action) action)
# Word 3 is the action name. This is the only one we can help with. # Word 3 is the action name. This is the only one we can help with.
if [ "${COMP_CWORD}" == 3 ]; then if [ "${COMP_CWORD}" == 3 ]; then
COMPREPLY=($(compgen -W "`gapplication list-actions "${COMP_WORDS[2]}"`" -- "${COMP_WORDS[3]}")) COMPREPLY=($(compgen -W "$(gapplication list-actions "${COMP_WORDS[2]}")" -- "${COMP_WORDS[3]}"))
return 0 return 0
else else
COMPREPLY=() COMPREPLY=()

View File

@ -9,7 +9,7 @@
__gdbus() { __gdbus() {
local IFS=$'\n' local IFS=$'\n'
local cur=`_get_cword :` local cur="$(_get_cword :)"
local suggestions=$(gdbus complete "${COMP_LINE}" ${COMP_POINT}) local suggestions=$(gdbus complete "${COMP_LINE}" ${COMP_POINT})
COMPREPLY=($(compgen -W "$suggestions" -- "$cur")) COMPREPLY=($(compgen -W "$suggestions" -- "$cur"))