Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: Problem with autoloading completion functions
- X-seq: zsh-workers 6837
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: RE: Problem with autoloading completion functions
- Date: Fri, 25 Jun 1999 10:16:15 +0400
- Importance: Normal
- In-reply-to: <006401bebe62$a37dddc0$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
>
> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author