From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16132 invoked from network); 13 Feb 2000 03:53:58 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Feb 2000 03:53:58 -0000 Received: (qmail 13662 invoked by alias); 13 Feb 2000 03:53:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9697 Received: (qmail 13654 invoked from network); 13 Feb 2000 03:53:03 -0000 To: zsh-workers@sunsite.auc.dk Subject: PATCH: _psutils MIME-Version: 1.0 (generated by AKEMI 1.13.2 - =?ISO-2022-JP?B?Ig==?= =?ISO-2022-JP?B?GyRCQTA0Y0s8GyhCIg==?=) Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 13 Feb 2000 12:53:01 +0900 Message-ID: User-Agent: Chao-gnus/6.12.5 AKEMI/1.13.2 (=?ISO-2022-JP?B?GyRCQTAbKEI=?= =?ISO-2022-JP?B?GyRCNGNLPBsoQg==?=) FLAM-DOODLE/1.12.6 (=?ISO-2022-JP?B?GyRCM3cbKEI=?= 10R4.0/5.0) Emacs/20.4 (sparc-sun-solaris2.6) MULE/4.0 (HANANOEN) This is a completion function for psutils-p17. Note that although psnup accepts arbitrary number as `psnup -number' but I couldn't find a way to complete it acculately by _arguments. So only -2, -4, -8 is completed. Index: Completion/User/.distfiles =================================================================== RCS file: /projects/zsh/zsh/Completion/User/.distfiles,v retrieving revision 1.1.1.21 diff -u -r1.1.1.21 .distfiles --- Completion/User/.distfiles 2000/02/11 13:27:16 1.1.1.21 +++ Completion/User/.distfiles 2000/02/13 03:39:34 @@ -7,7 +7,7 @@ _mailboxes _make _man _mh _mount _mutt _my_accounts _netscape _nslookup _other_accounts _pack _patch _pbm _pdf _perl_basepods _perl_builtin_funcs _perl_modules _perldoc - _ports _prcs _prompt _ps _pspdf _rcs _rlogin _sh _socket + _ports _prcs _prompt _ps _pspdf _psutils _rcs _rlogin _sh _socket _ssh _strip _stty _su _sudo _tar _tar_archive _telnet _tex _texi _tiff _uncompress _unpack _urls _use_lo _user_at_host _users _users_on _webbrowser _wget _whereis _whois _xargs _yodl _yp Index: Completion/User/_ps =================================================================== RCS file: /projects/zsh/zsh/Completion/User/_ps,v retrieving revision 1.1.1.7 diff -u -r1.1.1.7 _ps --- Completion/User/_ps 2000/01/05 14:14:46 1.1.1.7 +++ Completion/User/_ps 2000/02/13 03:39:34 @@ -1,13 +1,9 @@ -#compdef ps2epsi ps2pdf epsffit extractres fixdlsrps fixfmps fixmacps fixpsditps fixpspps fixscribeps fixtpps fixwfwps fixwpps fixwwps includeres psbook psmerge psnup psresize psselect pstops psmulti pswrap +#compdef ps2epsi ps2pdf psmulti pswrap local expl # ghostscript: # ps2epsi ps2pdf -# psutils: -# epsffit extractres fixdlsrps fixfmps fixmacps fixpsditps fixpspps -# fixscribeps fixtpps fixwfwps fixwpps fixwwps includeres psbook psmerge -# psnup psresize psselect pstops _description files expl 'postscript file' _files "$expl[@]" -g '*.(#i)(ps|eps)' --- /dev/null Sun Feb 13 12:42:24 2000 +++ Completion/User/_psutils Sun Feb 13 12:35:39 2000 @@ -0,0 +1,119 @@ +#compdef epsffit extractres fixdlsrps fixfmps fixmacps fixpsditps fixpspps fixscribeps fixtpps fixwfwps fixwpps fixwwps includeres psbook psmerge psnup psresize psselect pstops getafm showchar + +case "$words[1]" in +epsffit) + _arguments \ + '-v[print version]' \ + '-c[centres the image in the bounding box given]' \ + '-r[rotates the image by 90 degrees anti-clockwise]' \ + '-a[alters the aspect ratio to fit the bounding box]' \ + '-s[adds a showpage at the end of the image]' \ + '-m[rotates the image to maximise the size]' \ + ':lower left x:' \ + ':lower left y:' \ + ':upper right x:' \ + ':upper right y:' \ + ':input file:_ps' \ + ':output file:_ps' + ;; +psbook) + _arguments \ + '-q[quiet mode]' \ + '-v[print version]' \ + '-s-[signature size]:signature size:' \ + ':input file:_ps' \ + ':output file:_ps' + ;; +psnup) + _arguments \ + '-q[quiet mode]' \ + '-v[print version]' \ + '(-p)-w-[page width]:paper width:' \ + '(-p)-h-[page height]:paper height:' \ + '(-w -h)-p-[page size]:paper size:(a3 a4 a5 b5 letter legal 10x14)' \ + '(-P)-W-[input page width]:input paper width:' \ + '(-P)-H-[input page height]:input paper height:' \ + '(-W -H)-P-[input page paper]:input paper paper:(a3 a4 a5 b5 letter legal 10x14)' \ + '( -r -f)-l[landscape (rotated left)]' \ + '(-l -f)-r[seascape (rotated right)]' \ + '(-l -r )-f[flipped]' \ + '-c[column major layout]' \ + '-m-[margins around whole page]:margins around whole page:' \ + '-b-[border around individual pages]:border around individual pages:' \ + '-d-[draw borders]:line width for borders:' \ + '-s-[override scale]:scale:' \ + '( -4 -8 -n)-2[2 logical pages on a sheet]' \ + '(-2 -8 -n)-4[4 logical pages on a sheet]' \ + '(-2 -4 -n)-8[8 logical pages on a sheet]' \ + '(-2 -4 -8 )-n[n-up]:pages on a sheet:' \ + '-t-[layout tolerance]:layout tolerance:' \ + ':input file:_ps' \ + ':output file:_ps' + ;; +psresize) + _arguments \ + '-q[quiet mode]' \ + '-v[print version]' \ + '(-p)-w-[page width]:paper width:' \ + '(-p)-h-[page height]:paper height:' \ + '(-w -h)-p-[page size]:paper size:(a3 a4 a5 b5 letter legal 10x14)' \ + '(-P)-W-[input page width]:input paper width:' \ + '(-P)-H-[input page height]:input paper height:' \ + '(-W -H)-P-[input page paper]:input paper paper:(a3 a4 a5 b5 letter legal 10x14)' \ + ':input file:_ps' \ + ':output file:_ps' + ;; +psselect) + _arguments \ + '-q[quiet mode]' \ + '-v[print version]' \ + '-e[select even pages]' \ + '-o[select odd pages]' \ + '-r[reverse order]' \ + '-p-[pages]:pages:' \ + ':input file:_ps' \ + ':output file:_ps' + ;; +pstops) + _arguments \ + '-q[quiet mode]' \ + '-v[print version]' \ + '-d-[draw borders]:line width for borders:' \ + '-b[no bind operator]' \ + '(-p)-w-[page width]:paper width:' \ + '(-p)-h-[page height]:paper height:' \ + '(-w -h)-p-[page size]:paper size:(a3 a4 a5 b5 letter legal 10x14)' \ + ':[modulo\:][-]pageno[L][R][U][@scale][(xoff,yoff)][+|,]...:' \ + ':input file:_ps' \ + ':output file:_ps' + ;; +extractres) + _arguments \ + '-m[merge]' \ + ':input file:_ps' + ;; +fixmacps) + _arguments \ + '-d[directory]:directory:_files -/' \ + '-n[name]:name:' \ + ':input file:_ps' + ;; +psmerge) + _arguments \ + '-o-[output file]:output file:_ps' \ + '-t[thorough]' \ + '*:input file:_ps' + ;; +fixdlsrps|fixfmps|fixpsditps|fixpspps|fixscribeps|fixtpps|fixwfwps|fixwpps|fixwwps|includeres) + _ps + ;; +getafm) + _arguments \ + ':font name:' + ;; +showchar) + _arguments \ + ':font name:' \ + ':character name:' + ;; +esac -- Tanaka Akira