summaryrefslogtreecommitdiffstats
path: root/completions/xdg-settings
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:19 +0000
commit6c09f2a45c5541e9c207d14fc7aa21a4a0066bde (patch)
tree0221189d367bf661f6f9493c4f17a03f0dd4b7d2 /completions/xdg-settings
parentReleasing progress-linux version 1:2.11-8~progress7.99u1. (diff)
downloadbash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.tar.xz
bash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.zip
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/xdg-settings')
-rw-r--r--completions/xdg-settings24
1 files changed, 11 insertions, 13 deletions
diff --git a/completions/xdg-settings b/completions/xdg-settings
index abd9246..df03222 100644
--- a/completions/xdg-settings
+++ b/completions/xdg-settings
@@ -1,9 +1,9 @@
# xdg-settings completion -*- shell-script -*-
-_xdg_settings()
+_comp_cmd_xdg_settings()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
case $prev in
--help | --list | --manual | --version)
@@ -12,20 +12,18 @@ _xdg_settings()
esac
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$("$1" --help |
- tr "{|" "\n" | _parse_help -)' -- "$cur"))
+ _comp_compgen_help - <<<"$("$1" --help | tr '{|' '\n')"
return
fi
- local args
- _count_args
- if ((args == 1)); then
- COMPREPLY=($(compgen -W "get check set" -- "$cur"))
- elif ((args == 2)); then
- COMPREPLY=($(compgen -W \
- '$("$1" --list | awk "!/^Known/ { print \$1 }")' -- "$cur"))
+ local REPLY
+ _comp_count_args
+ if ((REPLY == 1)); then
+ _comp_compgen -- -W "get check set"
+ elif ((REPLY == 2)); then
+ _comp_compgen_split -- "$("$1" --list | _comp_awk '!/^Known/ { print $1 }')"
fi
} &&
- complete -F _xdg_settings xdg-settings
+ complete -F _comp_cmd_xdg_settings xdg-settings
# ex: filetype=sh