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 | f4acb49ea148cdd899f7f29f1591c7bc853c2135 (patch) | |
tree | b62d60873864065d6428a84a119dd8a3c90f1397 /completions/json_xs | |
parent | Adding upstream version 1:2.11. (diff) | |
download | bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.tar.xz bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.zip |
Adding upstream version 1:2.12.0.upstream/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 |