diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
commit | f2621414ee5f2f601424c22f00e207903e3b6104 (patch) | |
tree | 56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/json_xs | |
parent | Adding debian version 1:2.11-8. (diff) | |
download | bash-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/json_xs')
-rw-r--r-- | completions/json_xs | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/completions/json_xs b/completions/json_xs index c93ba86..d894526 100644 --- a/completions/json_xs +++ b/completions/json_xs @@ -1,21 +1,20 @@ # json_xs completion -*- shell-script -*- -_json_xs() +_comp_cmd_json_xs() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -*f) - COMPREPLY=($(compgen -W 'json cbor storable storable-file bencode - clzf eval yaml string none' -- "$cur")) + _comp_compgen -- -W 'json cbor storable storable-file bencode clzf + eval yaml string none' return ;; -*t) - COMPREPLY=($(compgen -W 'json json-utf-8 json-pretty - json-utf-16le json-utf-16be json-utf-32le json-utf-32be - cbor storable storable-file bencode clzf yaml dump dumper - string none' -- "$cur")) + _comp_compgen -- -W 'json json-utf-8 json-pretty json-utf-16le + json-utf-16be json-utf-32le json-utf-32be cbor storable + storable-file bencode clzf yaml dump dumper string none' return ;; -*e) @@ -23,9 +22,11 @@ _json_xs() ;; esac - [[ $cur == -* ]] && - COMPREPLY=($(compgen -W '$(_parse_usage "$1") -f' -- "$cur")) + if [[ $cur == -* ]]; then + _comp_compgen_usage + _comp_compgen -a -- -W '-f' + fi } && - complete -F _json_xs json_xs + complete -F _comp_cmd_json_xs json_xs # ex: filetype=sh |