From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14043 invoked by alias); 16 Mar 2015 00:29:31 -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: 20017 Received: (qmail 28681 invoked from network); 16 Mar 2015 00:29:19 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=+fNqMbSu/Hkg7ImeI2hmtnFf9lcbNMGJZ+3/HUKBHNc=; b=NwElQU1KNxJS7lBvWsaBg0P+O8bwybQ4WMdn9zm3ZudQlG3xFfRg5VHK/vPL+qZ4zt tvAE/FjK5FEMKKDN5VE3zbDcVSyhbSBW5P9b+jyMapzAcLRnI8n/8COlNkTcfEcdTutY l/cAaPnkju1vnconKo2VsxD7zztHbap4YjGpvTSBNoPuzGQkfxAixlRsztMrNQy3N+Uw E0WR9DDAf9/JPldWhmfktu2Ly2NBGWP3WeFYsPPVTa81bCiv6cawsHalI1XtWo+/Y+Y0 ynaMZOshpf0FtDoI8D3Ka8KXlrbm9qytTSR1nvCd4ys2KjQ02V1lF4yPl+btvtYoTvs2 laew== X-Gm-Message-State: ALoCoQnMbVjrp+UXgbvNoknIZYEZYo1ZP/OAuoYxStrMMTY4uuvifcHsyjDoyVaa4qBkXAyAFmOT X-Received: by 10.182.158.195 with SMTP id ww3mr45655775obb.22.1426465756025; Sun, 15 Mar 2015 17:29:16 -0700 (PDT) From: Bart Schaefer Message-Id: <150315173022.ZM28469@torch.brasslantern.com> Date: Sun, 15 Mar 2015 17:30:22 -0700 In-Reply-To: <20150315213935.GB2795@localhost.localdomain> Comments: In reply to Han Pingtian "Re: How to get 'fc' context?" (Mar 16, 5:39am) References: <20150314234403.GA2795@localhost.localdomain> <150314183802.ZM26315@torch.brasslantern.com> <20150315213935.GB2795@localhost.localdomain> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: How to get 'fc' context? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 %