Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Creating A Clean Environment For Autoloaded Functions
- X-seq: zsh-users 17516
- From: Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Creating A Clean Environment For Autoloaded Functions
- Date: Tue, 1 Jan 2013 07:30:02 +0800
- In-reply-to: <121230112044.ZM879@torch.brasslantern.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CA+zrezQX3hAh1dcPvi6-W9pJ+goWrm2vzQ6gSP=EAjyuw2micQ@mail.gmail.com> <121230112044.ZM879@torch.brasslantern.com>
On Sun, Dec 30, 2012 at 11:20:44AM -0800, Bart Schaefer wrote:
> {
> zmodload zsh/parameter
> local -a existing_modules
> existing_modules=( ${(k)modules[(R)loaded]} )
>
> : do whatever zmodloads you want ...
>
> } always {
> # Requires zsh 5.0, otherwise you need a loop
> zmodload -u ${(k)modules[(R)loaded]:|existing_modules}
How could we know that, the "(k)" will be run before ":|" here, please?
Because "k" will be applied with the subscripting, so it will be before
the ":|" ?
Thanks.
> }
Messages sorted by:
Reverse Date,
Date,
Thread,
Author