sys-apps/less: lesspipe: split pdf/ps handling #477860
authorMike Frysinger <vapier@gentoo.org>
Wed, 6 Apr 2016 22:16:35 +0000 (18:16 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 6 Apr 2016 22:20:05 +0000 (18:20 -0400)
sys-apps/less/files/lesspipe.sh

index c0f30e3073044fca54e49fb7decb41b8eb612765..291d6d66781755212cad00a5687e89f2f7bc402d 100755 (executable)
@@ -99,7 +99,8 @@ lesspipe() {
                esac
                ;;
        *.dvi)      dvi2tty "$1" ;;
-       *.ps|*.pdf) ps2ascii "$1" || pstotext "$1" || pdftotext "$1" ;;
+       *.ps)       ps2ascii "$1" || pstotext "$1" ;;
+       *.pdf)      pdftotext "$1" - || ps2ascii "$1" || pstotext "$1" ;;
        *.doc)      antiword "$1" || catdoc "$1" ;;
        *.rtf)      unrtf --nopict --text "$1" ;;
        *.conf|*.txt|*.log) ;; # force less to work on these directly #150256