zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@thoth.u-net.com>
To: zsh-workers@sunsite.auc.dk
Subject: Re: Completion/User functions again
Date: Wed, 14 Jul 1999 15:29:15 +0100	[thread overview]
Message-ID: <378C9EBB.D3A3DBC0@thoth.u-net.com> (raw)
In-Reply-To: <199907141246.OAA11798@beta.informatik.hu-berlin.de>

Sven Wischnowsky wrote:

> I've been thinking about this for a long time, too. The problems are
> that we would have to fill those directories (so that they don't look

I don't think it would matter too much if they were on the empty side
while we are still on version 3.1.x.

> silly) and with such directories users would expect to need only to
> copy the contents of one such directory (or link User to it), so they
> would have to be (almost) complete. That's a lot of work and who'll do
> that, I wonder.

Linking User to the directory probably wouldn't be the best approach
because there are many commands for which the completion won't be system
specific. I would go for an approach similar to that for installing
modules so users can add directories to install to a file listing the
completion directories. The configure script could possibly be enhanced
to intelligently add any appropriate directories. I would also subdivide
the User directory a little. For example if all the X programs were in
their own directory then they could be excluded on a system which lacks
X. We might later add directories for obscure software which would only
be relevant to a small number of users. This is a large reason why I
prefer the directories to be preserved with the installation (via
--enable-function-subdirs) and think it should be the default.

> While we are at it: we still don't have completion functions for some
> commands for which we have compctl examples, e.g. cvs and rpm. I don't
> use either of these often enough to be able to write good functions
> for them -- any volunteers for that?

I don't use rpm or cvs either so I won't volunteer for those but there
are many other programs for which I plan to write completions - I had an
enormous number of tcsh completes which I have yet to convert to zsh.
I've got a few IRIX/AIX specific ones which I'll contribute if and when
we have directories set up to accomodate them.

> Maybe we should add some kind of programming style guide some day,
> containing things like `make functions that can be used as helper
> functions do something useful with their arguments if possible' and
> `do not use compgen if you're only after the -k or -s options'
> (compadd is faster and -- I think -- cleaner for this).

A programming style guide would certainly be a good idea and its
usefulness would not be limited to writing zsh completions. It might be
a good idea to start one off as a simple text file, listing key points
particularly any which aren't immediately obvious like the compadd
point. We can always convert it to LaTeX/yodl/texinfo/whatever and
expand it into a readable document later.

Oliver Kiddle


  parent reply	other threads:[~1999-07-14 14:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-14 12:46 PATCH: " Sven Wischnowsky
1999-07-14 13:12 ` Tanaka Akira
1999-07-20 18:05   ` CVS completer (Re: PATCH: Re: Completion/User functions again) Bart Schaefer
1999-07-26  0:52     ` Tanaka Akira
1999-07-14 14:29 ` Oliver Kiddle [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-07-14 10:37 Completion/User functions again Andrej Borsenkow

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=378C9EBB.D3A3DBC0@thoth.u-net.com \
    --to=opk@thoth.u-net.com \
    --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).