Zsh Mailing List Archive
Messages sorted by:
Re: Moving completion functions
- X-seq: zsh-workers 13683
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: Moving completion functions
- Date: Wed, 21 Mar 2001 09:58:40 +0000
- In-reply-to: <3AB7CC59.E566C8A1@xxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <3AB7CC59.E566C8A1@xxxxxxxxxxxxx>
On Mar 20, 9:32pm, Oliver Kiddle wrote:
} Subject: Re: Moving completion functions
} Bart wrote:
} > What exactly would you like fpath to contain by default? Nothing?
} Yes. Unless the parent process exported FPATH to zsh.
Long, long ago it was decided that it was a bad idea to import FPATH.
So long ago that it's not in the zsh-workers archive, unfortunately.
Probably has something to do with the fact that its a huge security
hole, i.e., you can cause some other user's shell to inherit a trojan
via any function you can guess he might autoload.
} > it also sets it to get the stuff from the Functions subdirectory, etc.
} I always thought of them as just examples and user contributions as
} opposed to being part of zsh's functionality. Before the new
} completion, they had to be manually installed and added to $fpath. I've
} just noticed though that they are now mentioned in the documentation
} which I suppose makes them more official.
Not all of them are mentioned in the docs, and some of them really are
not much more than examples; I think we should rearrange some of the
files under Functions/ while we're doing the ones for Completion/. (I
will try to make some suggestions after I've had some sleep.)
} > If we remove the Completion directories from the default fpath, then we
} > must also give up --enable-function-subdirs. Not that we can't use the
} > subdirs for installation, but that we must hardwire the installation so
} > that compinit can know what to add to fpath. Even then, compinit needs
} > to get the base path (to which to append /Completion/...) from
} > somewhere.
} As I said with the original suggestion, there could be a variable set
} to point to the base of the installed functions.
A parameter set how? By hardwiring it at compile time? I suppose that
the zsh/complete module could define one.
} I don't understand why compinit would need to know before-hand what
} directories it should add - it would just use a bit of globbing
} modified for $OSTYPE and options passed to it
Maybe; I'm not convinced.
} Do we need to account for kshautoload though?
The patch I included for compinit, did so, for compinit itself; but:
} How does someone with kshautoload set get the new completion system to
} work short of doing unsetopt kshautoload?
The only way is to "zcompile -z" the whole thing and then put the .zwc
file in fpath. This has been mentioned before (it may even be in the
Bart Schaefer Brass Lantern Enterprises
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by: