zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "ZSH workers mailing list" <zsh-workers@sunsite.auc.dk>
Subject: RE: Problem with autoloading completion functions
Date: Fri, 25 Jun 1999 10:16:15 +0400	[thread overview]
Message-ID: <006501bebed2$3b4379c0$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <006401bebe62$a37dddc0$21c9ca95@mow.siemens.ru>


>
> I had this 'autoload $^fpath/*(N:t)' in my .zshrc ... and all worked nice and
> fine ... until I suddenly found that subscript does not work as expected.
>

Well, thinking more about it I believe we really need file name in autoload. So,
what about:


autoload -f <path> fn1 fn2 ... (with possible extension, that if <path> is a
directory, we look at <path>/fn1 <path>/fn2 ...) If no -f is given, fallback to
searching fpath.

install completion function into ${prefix}/zsh/completion

assign initial value to cpath (_cpath, completion_path - does not actually
matter). It has additional benefit, that you can test for existence of cpath to
check if completion was installed

'course, "real" functions like compdump, compinit(?) should be if $fpath

modify compinit to use cpath instead. Possible extension is ``compinit <path1>
<path2> ...'' - meaning, look in path1, path2 ... for completion functions.

The above has one more advantage - it allows new function subsystem (meaning,
set of related functions) be easily defined, installed and used as a single
entity. Without messing up with global fpath.

Any comments?

/andrej


  reply	other threads:[~1999-06-25  6:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-24 16:57 Andrej Borsenkow
1999-06-25  6:16 ` Andrej Borsenkow [this message]
1999-06-25  7:38 ` Peter Stephenson
1999-06-25  8:23   ` Andrej Borsenkow
1999-06-25  6:33 Sven Wischnowsky
1999-06-25  6:44 ` 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='006501bebed2$3b4379c0$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --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).