From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19618 invoked from network); 11 Aug 1999 10:54:11 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Aug 1999 10:54:11 -0000 Received: (qmail 1481 invoked by alias); 11 Aug 1999 10:54:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7418 Received: (qmail 1473 invoked from network); 11 Aug 1999 10:54:04 -0000 Date: Wed, 11 Aug 1999 12:54:02 +0200 (MET DST) Message-Id: <199908111054.MAA06001@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 11 Aug 1999 18:33:57 +0900 Subject: Re: PATCH: _ps, _pdf and _pspdf. Tanaka Akira wrote: > This is _ps, _pdf update and new _pspdf. > > * _ps didn't require a dot before suffix. > * I think pstruct is not related to postscript. At least, pstruct in perl is so. Right, I was had a self-written tool named pstruct, sorry that that slipped in. > * More commands. (gs, psutils, xpdf, etc.) > * Some commands based on gs accept files both ps and pdf. > > ... > > +#compdef acroread pdf2dsc pdf2ps pdfimages pdfinfo pdftopbm pdftops pdftotext xpdf Ah, the pbm stuff... This is a first simple solution. Now I'm thinking aabout chaging the uses of _compskip so that one can say `do not try any other completion function' (like we have it now), but can also say `use a completion function defined for the command itself, but don't use -default-'. Then we can give some of these commands their own functions, too. Bye Sven diff -u oc/User/_pbm Completion/User/_pbm --- oc/User/_pbm Wed Aug 11 12:48:14 1999 +++ Completion/User/_pbm Wed Aug 11 12:46:12 1999 @@ -0,0 +1,13 @@ +#compdef -p p[bgpn]m* + +local pat + +_compskip=1 + +if [[ "$words[1]" = pnm* ]]; then + pat='*.(#i)p[bgp]m' +else + pat="*.(#i)${words[1][1,3]}" +fi + +_path_files -g "$pat" || _files -g '*.(#i)p[bgp]m' -- Sven Wischnowsky wischnow@informatik.hu-berlin.de