zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: _ps, _pdf and _pspdf.
Date: Wed, 11 Aug 1999 12:54:02 +0200 (MET DST)	[thread overview]
Message-ID: <199908111054.MAA06001@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Tanaka Akira's message of 11 Aug 1999 18:33:57 +0900


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


             reply	other threads:[~1999-08-11 10:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-11 10:54 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-08-13  8:40 Sven Wischnowsky
1999-08-11 13:45 Sven Wischnowsky
1999-08-13  0:35 ` Tanaka Akira
1999-08-11  9:33 Tanaka Akira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199908111054.MAA06001@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).