diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-08-03 18:43:13 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-08-03 18:43:13 -0300 |
commit | 95623d39d6029ba78ec96ad5ea08e9ac12629b91 (patch) | |
tree | ea0fe36eb5e6f40e0a1f765d44c4b0c0b2bfb089 /completions/pdftotext | |
parent | 019f3cc463db63abc6460f97deb488deec43840b (diff) | |
download | bash-completion-95623d39d6029ba78ec96ad5ea08e9ac12629b91.tar.gz |
New upstream version 2.11upstream/2.11upstream
Diffstat (limited to 'completions/pdftotext')
-rw-r--r-- | completions/pdftotext | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/completions/pdftotext b/completions/pdftotext index 79c837e0..a3501baa 100644 --- a/completions/pdftotext +++ b/completions/pdftotext @@ -6,31 +6,34 @@ _pdftotext() _init_completion || 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") ) + COMPREPLY=($(compgen -W '$("$1" -listenc 2>/dev/null | + command sed -e 1d)' -- "$cur")) return ;; -eol) - COMPREPLY=( $(compgen -W "unix dos mac" -- "$cur") ) + COMPREPLY=($(compgen -W "unix dos mac" -- "$cur")) return ;; esac if [[ $cur == -* && ${prev,,} != *.pdf ]]; then - COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") ) + COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) return fi case ${prev,,} in - -|*.txt) ;; - *.pdf) COMPREPLY=( $(compgen -W '-' -- "$cur") ) ; _filedir txt ;; + - | *.txt) ;; + *.pdf) + COMPREPLY=($(compgen -W '-' -- "$cur")) + _filedir txt + ;; *) _filedir pdf ;; esac } && -complete -F _pdftotext pdftotext + complete -F _pdftotext pdftotext # ex: filetype=sh |