Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: I'm missing something with fpath.
- X-seq: zsh-users 2896
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Jason Price <jprice@xxxxxxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxxxxxx
- Subject: Re: I'm missing something with fpath.
- Date: Thu, 27 Jan 2000 23:16:23 +0000
- In-reply-to: <kgopuun1fe8.fsf@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <kgopuun1fe8.fsf@xxxxxxxxxxxxxxxxxx>
On Jan 27, 2:30pm, Jason Price wrote:
> Subject: I'm missing something with fpath.
> Or maybe globing.
It's globbing.
> for dirname in $fpath ; do
> autoload $dirname/*(.x:t)
> done
Dump the "for" loop. You want a nice one-liner like
autoload $^fpath/*(N.x:t)
where the N means to silently drop any glob pattern that doesn't match
any files.
> $FUNCTIONDIR/compinit world executable on install, and the compinstall
> function puts $FUNCTINDIR in .zshrc to be autoloaded from as above,
> couldn't this lead to a bad new user experience?
>
> Or am I smoking crack/missing something obvious?
You {sh,c}ould drop the `x' from the glob qualifiers. In general, there
isn't any reason for a file that contains an autoloaded function to have
its execute bit set. The only reason for making such a file executable
is to be able to run it as a standalone shell script as well as run it as
an autoloaded function.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author