zsh-users
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Eric Mangold <teratorn@world-net.net>
Cc: "zsh-users@sunsite.dk" <zsh-users@sunsite.dk>
Subject: Re: Adding new completions to zsh
Date: Thu, 26 Feb 2004 12:12:55 +0100	[thread overview]
Message-ID: <4023.1077793975@trentino.logica.co.uk> (raw)
In-Reply-To: <opr3ykfw19i4eeqj@mail.oaktech.net>

Eric Mangold wrote:

> My idea for allowing greater flexibility is to bundle the actual zsh 
> completion functionality as part of the Twisted distribution and give zsh 
> a "stub" that will use the completion functions that are bundled with 
> Twisted.
> 
> Has anyone ever done this before? What do you all think?

It's never been done before but it makes some sense.

Thinking about how this could work, the function distributed with zsh
could start with something like this:

  local dir FPATH="$FPATH"

  dir=${commands[twistd]:h:h}/share/twistd
  if [[ -r $dir/_twistd ]]; then
    fpath=( $dir $fpath )
    autoload -XU
  fi

The dir assignment is a crude way of trying to find the directory
containing the function in the twisted distribution. Hopefully you have
some hook which will do a better job. It then checks if it has found
the function. If so, it adds the directory to beginning of the function
search path and uses autoload to load the replacement function.

After this section, we could fallback on a potentially out-of-date
completion for twistd. It'd be good if the zsh CVS view of that could
be kept reasonably up-to-date though.

Oliver


  parent reply	other threads:[~2004-02-26 11:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-26  3:39 Eric Mangold
2004-02-26 10:29 ` Peter Stephenson
2004-02-26 21:42   ` Eric Mangold
2004-02-26 11:12 ` Oliver Kiddle [this message]
2004-02-26 21:37 ` Dominic Mitchell
2004-02-26 21:56   ` Eric Mangold

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=4023.1077793975@trentino.logica.co.uk \
    --to=okiddle@yahoo.co.uk \
    --cc=teratorn@world-net.net \
    --cc=zsh-users@sunsite.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).