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

Re: How to get 'fc' context?



On Sat, Mar 14, 2015 at 06:38:02PM -0700, Bart Schaefer wrote:
> On Mar 15,  7:44am, Han Pingtian wrote:
> }
> } How can we get the 'fc' context, please?
> 
> I don't think there is an "fc context" in the way you seem to mean.
> 
> "fc" either invokes an external editor, in which case the shell is
> not involved at all, or it feeds the history directly back to the
> interpreter again, in which case it's not doing anything that would
> have a context.
> 
> The reason you get "toplevel file" is because "fc -e" has copied the
> history event to a file and then invoked "source" on the file.
> 
> What exactly are you trying to accomplish with this?

I'd like to see if there is a method showing context 'fc' to me. I was reading
the manual about the zsh_eval_context, and thought I can do this by 
calling something like "fc -e -".  But it didn't do what I want.

Thanks.



Messages sorted by: Reverse Date, Date, Thread, Author