summaryrefslogtreecommitdiff
path: root/completions/xdg-settings
diff options
context:
space:
mode:
Diffstat (limited to 'completions/xdg-settings')
-rw-r--r--completions/xdg-settings18
1 files changed, 9 insertions, 9 deletions
diff --git a/completions/xdg-settings b/completions/xdg-settings
index c14d37ba..abd92464 100644
--- a/completions/xdg-settings
+++ b/completions/xdg-settings
@@ -6,26 +6,26 @@ _xdg_settings()
_init_completion || return
case $prev in
- --help|--list|--manual|--version)
+ --help | --list | --manual | --version)
return
;;
esac
if [[ $cur == -* ]]; then
- COMPREPLY=( $(compgen -W '$("$1" --help |
- tr "{|" "\n" | _parse_help -)' -- "$cur") )
+ COMPREPLY=($(compgen -W '$("$1" --help |
+ tr "{|" "\n" | _parse_help -)' -- "$cur"))
return
fi
local args
_count_args
- if [[ $args -eq 1 ]]; then
- COMPREPLY=( $(compgen -W "get check set" -- "$cur") )
- elif [[ $args -eq 2 ]]; then
- COMPREPLY=( $(compgen -W \
- '$("$1" --list | awk "!/^Known/ { print \$1 }")' -- "$cur") )
+ 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"))
fi
} &&
-complete -F _xdg_settings xdg-settings
+ complete -F _xdg_settings xdg-settings
# ex: filetype=sh