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/pdftotext | |
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 '')
-rw-r--r-- | completions/pdftotext | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/completions/pdftotext b/completions/pdftotext index a3501ba..a99fd40 100644 --- a/completions/pdftotext +++ b/completions/pdftotext @@ -1,39 +1,40 @@ # bash completion for pdftotext(1) -*- shell-script -*- -_pdftotext() +_comp_cmd_pdftotext() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in - -h | -help | --help | -'?' | -f | -l | -r | -x | -y | -W | -H | -fixed | -opw | -upw) + -h | -help | --help | -'?' | -f | -l | -r | -x | -y | -W | -H | \ + -fixed | -opw | -upw) return ;; -enc) - COMPREPLY=($(compgen -W '$("$1" -listenc 2>/dev/null | - command sed -e 1d)' -- "$cur")) + _comp_compgen_split -- "$("$1" -listenc 2>/dev/null | + command sed -e 1d)" return ;; -eol) - COMPREPLY=($(compgen -W "unix dos mac" -- "$cur")) + _comp_compgen -- -W "unix dos mac" return ;; esac if [[ $cur == -* && ${prev,,} != *.pdf ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help return fi case ${prev,,} in - | *.txt) ;; *.pdf) - COMPREPLY=($(compgen -W '-' -- "$cur")) - _filedir txt + _comp_compgen -- -W '-' + _comp_compgen -a filedir txt ;; - *) _filedir pdf ;; + *) _comp_compgen_filedir pdf ;; esac } && - complete -F _pdftotext pdftotext + complete -F _comp_cmd_pdftotext pdftotext # ex: filetype=sh |