From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5821 invoked by alias); 15 Mar 2015 22:04:28 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20016 Received: (qmail 20898 invoked from network); 15 Mar 2015 22:04:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Date: Mon, 16 Mar 2015 05:39:35 +0800 From: Han Pingtian To: zsh-users@zsh.org Subject: Re: How to get 'fc' context? Message-ID: <20150315213935.GB2795@localhost.localdomain> Mail-Followup-To: zsh-users@zsh.org References: <20150314234403.GA2795@localhost.localdomain> <150314183802.ZM26315@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <150314183802.ZM26315@torch.brasslantern.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15031521-0013-0000-0000-0000002E20B5 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.