Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: _a2ps completion



>>>>> "Sven" == Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:

Sven> My a2ps (4.10.1) at least produces only pages containing the
Sven> PostScript code for PostScript files.

I am very much surprised.  Delegations are in a2ps since 4.9.7 (but
you should upgrade, you know :).  What must happen is that you didn't
have the psutils installed so your a2ps can't handle PS files.

But anyway, it seemed to me that zsh is supporting more recent a2pses
than older, which seems better to me anyway.  There are still a few
people running 4.10.{3,4}, I just discovered people using 4.10.1 ;),
but most people are running a recent version.  

If you still *need* a switch, you can depend upon:

/tmp/a2ps-4.12h % LANG=C a2ps --list=delegations                 nostromo 12:45
Applications configured for delegation
Delegation `Acrobat', from pdf to ps
        #{del.acroread} < '$f' | #{del.psselnup}
Delegation `Groff', from roff to ps
        eval `grog -Tps '$f'` | fixps #?V!!-q! | #{del.psselnup}
Delegation `ImageMagick', from gif to ps
        #{del.imagick} 'gif:$f' ps:- | #{del.psselnup}
Delegation `ImageMagick', from xpm to ps
        #{del.imagick} 'xpm:$f' ps:- | #{del.psselnup}
Delegation `ImageMagick', from xbm to ps
        #{del.imagick} 'xbm:$f' ps:- | #{del.psselnup}
Delegation `ImageMagick', from jpeg to ps
        #{del.imagick} 'jpeg:$f' ps:- | #{del.psselnup}
Delegation `ImageMagick', from png to ps
        #{del.imagick} 'png:$f' ps:- | #{del.psselnup}
Delegation `Netscape', from html to ps
        rm -f #f0;   if echo '$f' | grep '^/' >/dev/null 2>&1; then     ${NETSCAPE:-netscape} -noraise -remote 'openfile($f)';   else     ${NETSCAPE:-netscape} -noraise -remote 'openfile(%d/$f)';   fi &&   ${NETSCAPE:-netscape} -noraise -remote 'saveas(#f0,postscript)' &&   #{del.psselect} #f0 | #{del.psnup}
Delegation `PsNup', from ps to ps
        fixps #?V||-q| '$f' | #{del.psselnup}
Delegation `bzip2-a2ps', from bzip2 to ps
        bzip2 -cd '$f' | #{del.a2ps}
Delegation `dvips', from dvi to ps
        if strings '$f' | sed 10q | fgrep landscape > /dev/null 2>&1; then      #{del.dvips} -T#hpt,#wpt '$f' -o #f0 && #?o|cat|#{del.psnup} -r| #f0;    else      #{del.dvips} '$f' -o #f0 && #{del.psnup} #f0;    fi
Delegation `gzip-a2ps', from compress to ps
        gzip -cd '$f' | #{del.a2ps}
Delegation `gzip-a2ps', from gzip to ps
        gzip -cd '$f' | #{del.a2ps}
Delegation `texi2dvi', from texinfo to ps
        #{del.texi2dvi} -e -l texinfo '$f' && mv $N.dvi #f0 && #{del.dvips} -f #f0 | #{del.psnup}
Delegation `texi2dvi', from tex to ps
        #{del.texi2dvi} -l latex '$f' && mv $N.dvi #f0 && #{del.dvips} -f #f0 | #{del.psnup}

But seriously, you don't need this.

Akim



Messages sorted by: Reverse Date, Date, Thread, Author