summaryrefslogtreecommitdiffstats
path: root/completions/a2x
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
commitf2621414ee5f2f601424c22f00e207903e3b6104 (patch)
tree56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/a2x
parentAdding debian version 1:2.11-8. (diff)
downloadbash-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 '')
-rw-r--r--completions/a2x28
1 files changed, 15 insertions, 13 deletions
diff --git a/completions/a2x b/completions/a2x
index b59c786..ed1a206 100644
--- a/completions/a2x
+++ b/completions/a2x
@@ -1,39 +1,41 @@
# a2x(1) completion -*- shell-script -*-
-_a2x()
+_comp_cmd_a2x()
{
- local cur prev words cword split
- _init_completion -s || return
+ local cur prev words cword was_split comp_args
+ _comp_initialize -s -- "$@" || return
+ local noargopts='!(-*|*[aDd]*)'
+ # shellcheck disable=SC2254
case $prev in
--attribute | --asciidoc-opts | --dblatex-opts | --fop-opts | --help | \
- --version | --xsltproc-opts | -!(-*)[ah])
+ --version | --xsltproc-opts | -${noargopts}[ah])
return
;;
- --destination-dir | --icons-dir | -!(-*)D)
- _filedir -d
+ --destination-dir | --icons-dir | -${noargopts}D)
+ _comp_compgen_filedir -d
return
;;
- --doctype | -!(-*)d)
- _xfunc asciidoc _asciidoc_doctype
+ --doctype | -${noargopts}d)
+ _comp_compgen -x asciidoc doctype
return
;;
--stylesheet)
- _filedir css
+ _comp_compgen_filedir css
return
;;
esac
- $split && return
+ [[ $was_split ]] && return
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1" --help)' -- "$cur"))
+ _comp_compgen_help
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
return
fi
- _filedir
+ _comp_compgen_filedir
} &&
- complete -F _a2x a2x
+ complete -F _comp_cmd_a2x a2x
# ex: filetype=sh