Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to get 'fc' context?
- X-seq: zsh-users 20017
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: How to get 'fc' context?
- Date: Sun, 15 Mar 2015 17:30:22 -0700
- In-reply-to: <20150315213935.GB2795@localhost.localdomain>
- 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: <20150314234403.GA2795@localhost.localdomain> <150314183802.ZM26315@torch.brasslantern.com> <20150315213935.GB2795@localhost.localdomain>
On Mar 16, 5:39am, Han Pingtian wrote:
}
} I was reading the manual about the zsh_eval_context
Ah. I see now.
The value of $zsh_eval_context is only "fc" while invoking the editor,
and with "fc -e -" there is no editor.
So if you did
% autoload zed
% fc -e zed
then while zed is running, $zsh_eval_context contains "fc", but the only
way you can examine it is with something like a ZLE widget.
Try for example:
% fc -e '() { print echo $zsh_eval_context } >|'
echo toplevel fc shfunc
toplevel fc shfunc
%
Messages sorted by:
Reverse Date,
Date,
Thread,
Author