summaryrefslogtreecommitdiffstats
path: root/completions/xdg-settings
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
commitf2621414ee5f2f601424c22f00e207903e3b6104 (patch)
tree56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/xdg-settings
parentAdding debian version 1:2.11-8. (diff)
downloadbash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.tar.xz
bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.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