summaryrefslogtreecommitdiffstats
path: root/completions/jsonschema
diff options
context:
space:
mode:
Diffstat (limited to 'completions/jsonschema')
-rw-r--r--completions/jsonschema20
1 files changed, 10 insertions, 10 deletions
diff --git a/completions/jsonschema b/completions/jsonschema
index 8a36ed3..19a4439 100644
--- a/completions/jsonschema
+++ b/completions/jsonschema
@@ -1,30 +1,30 @@
# bash completion for jsonschema -*- shell-script -*-
-_jsonschema()
+_comp_cmd_jsonschema()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
case $prev in
--help | --error-format | --validator | -[hFV])
return
;;
--instance | -i)
- _filedir json
+ _comp_compgen_filedir json
return
;;
esac
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
return
fi
- local args
- _count_args "" "-*"
- ((args == 1)) || return
- _filedir '@(json|schema)'
+ local REPLY
+ _comp_count_args -a "-*"
+ ((REPLY == 1)) || return
+ _comp_compgen_filedir '@(json|schema)'
} &&
- complete -F _jsonschema jsonschema
+ complete -F _comp_cmd_jsonschema jsonschema
# ex: filetype=sh