summaryrefslogtreecommitdiff
path: root/completions/pdftotext
diff options
context:
space:
mode:
Diffstat (limited to 'completions/pdftotext')
-rw-r--r--completions/pdftotext19
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