Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion functions (was: 6-pws-2)
- X-seq: zsh-workers 7631
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: completion functions (was: 6-pws-2)
- Date: Thu, 2 Sep 1999 13:11:21 +0200 (MET DST)
- Cc: pws@xxxxxx
- In-reply-to: Peter Stephenson's message of Wed, 01 Sep 1999 15:56:11 +0200
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Peter Stephenson wrote:
> Sven Wischnowsky wrote:
> > With a little help from `awk' this was relatively easy to build, so I
> > thought I just try to make us make a decision.
> >
> > This is `User/_pbm' again, but containing mostly the stuff from the
> > `Pbmplus/*' files.
>
> I like it this way --- particularly since it replaces a 100 functions, and
> you can compare the different behaviour for each function just by looking
> through the one file. Does anyone have anything to say for the other way,
> before I delete the Pbmplus subdirectory? Also, would it help to add a
> comment pointing out you can override individual completions by defining an
> appropriate function?
Maybe. Just to rub it in.
Bye
Sven
diff -u Completion.old/User/_pbm Completion/User/_pbm
--- Completion.old/User/_pbm Thu Sep 2 11:37:39 1999
+++ Completion/User/_pbm Thu Sep 2 13:10:15 1999
@@ -1,5 +1,11 @@
#compdef -P (p[bgpn]m*|*top[bgpn]m)
+# Completion for all (or most, you'll never know) pbmplus commands.
+# For some of them there are special cases in the biggish `case' below.
+# Note that since this function is a post-pattern function, these
+# defaults can be overridden by simple defining completion functions
+# for those commands whose arguments you want to complete differently.
+
local pat expl ret=1
if [[ "$words[1]" = pnm* ]]; then
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author