From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2108 invoked from network); 5 Apr 2002 09:58:37 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 5 Apr 2002 09:58:37 -0000 Received: (qmail 13978 invoked by alias); 5 Apr 2002 09:58:22 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4813 Received: (qmail 13950 invoked from network); 5 Apr 2002 09:58:22 -0000 To: zsh-users@sunsite.dk (Zsh users list) Subject: Re: Rough Draft of Article on Writing Completion Functions In-reply-to: "John Beppu"'s message of "Thu, 04 Apr 2002 15:49:32 -0800." <20020404234932.GA27875@Ax9.org> Date: Fri, 05 Apr 2002 10:57:53 +0100 Message-ID: <7906.1018000673@csr.com> From: Peter Stephenson John Beppu wrote: > The one source of information that had a chance to get it right was > the I. It provides many examples followed by > explanations, but what it lacks is an example that takes a command > and then writes a completion function for it, from start to finish. > It also starts talking about some very advanced material without > preparing the reader for this onslaught. However, it is a living > document, so let's hope that it matures and grows sensitive to what > people really want from such a document so that it can effectively > satisfy those needs. It's probably worth pointing out it's not going to change at all without more specific suggestions. So far I have had no suggestions about structural changes whatsoever. I deliberately didn't write a whole real-world completion function because there are already so many to look at, I just explained the possibilities. But if you can think of a good example you think is missing I'll add it. > The great tragedy of Zsh is that they actually made it very easy to > write completion functions, but you'd never know it by just > reading the documentation. Hmm... how much simpler than _foo() { compadd Yan Tan Tethera; } compdef _foo foo do I need to get? This is the sort of hint I need from the puzzled. > [ BEGIN SIDEBAR 2 - A Public Service Announcement ] > > For those of you just joining us, Zsh has quite the completion > system. Your tab key will have answers to practically everything if > you put the following in your I<.zshrc> and start up I. > > C< > autoload -U compinit > compinit > > > > Try running C, too. It will let you interactively > configure the behaviour of the completion system. I suggest you mention that you need zsh 4.0.x as a matter of priority, regardless of space limitations, or some people are going to get confused --- there must be a great many 3.0.x versions still around from older distributions. (Maybe you said that in a previous article, but even so people picking up just this one really need to know.) I know there are a few Mandrake distributions with 3.1.x versions which are probably good enough, but it's been changing so fast I would recommend someone starting from scratch to make sure they have a 4.0 release. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 392070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************