Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: How to get 'fc' context?



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