From 6c18848a903eb3ee06dccd915859ce64195c257c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 18:24:27 +0200 Subject: Adding upstream version 1:2.11. Signed-off-by: Daniel Baumann --- completions/appdata-validate | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 completions/appdata-validate (limited to 'completions/appdata-validate') diff --git a/completions/appdata-validate b/completions/appdata-validate new file mode 100644 index 0000000..03d8cc9 --- /dev/null +++ b/completions/appdata-validate @@ -0,0 +1,32 @@ +# appdata-validate(1) completion -*- shell-script -*- + +_appdata_validate() +{ + local cur prev words cword split + _init_completion -s || return + + case $prev in + -h | --help | --version) + return + ;; + --output-format) + COMPREPLY=($(compgen -W "$($1 --help | + command sed -ne 's/--output-format.*\[\(.*\)\]/\1/' -e 's/|/ /gp')" \ + -- "$cur")) + return + ;; + esac + + $split && return + + if [[ $cur == -* ]]; then + COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + [[ ${COMPREPLY-} == *= ]] && compopt -o nospace + return + fi + + _filedir appdata.xml +} && + complete -F _appdata_validate appdata-validate + +# ex: filetype=sh -- cgit v1.2.3