From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7646 invoked from network); 22 Sep 2008 00:37:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 22 Sep 2008 00:37:44 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 44582 invoked from network); 22 Sep 2008 00:37:26 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 22 Sep 2008 00:37:26 -0000 Received: (qmail 27374 invoked by alias); 22 Sep 2008 00:37:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25705 Received: (qmail 27356 invoked from network); 22 Sep 2008 00:37:18 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 22 Sep 2008 00:37:18 -0000 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.232]) by bifrost.dotsrc.org (Postfix) with ESMTP id 1BBBF802720D for ; Mon, 22 Sep 2008 02:37:14 +0200 (CEST) Received: by rv-out-0506.google.com with SMTP id g37so1134505rvb.21 for ; Sun, 21 Sep 2008 17:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=MrPMbZK6TaShhU5KSyvrnrTHzqdFaoCe7N8ukL44BoY=; b=dQuhhtj0NZ0w+ISGmsgfY9BCl8ffBO5B1FTYW0pGugyFkxSf9UB41G5bfrl/aPV3Sa DCfQc0PF9s/c3I9jF1o+lBEyBEVUP+YUmhCrTljbbnzh203HMqzkEQnpDR+K4MLaN+8Z eTLwpCpVwWvKXtjXHOmcXuxCWIErA7qtu1mc0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=oibWe2eBCrscE4Qbt08wk+Xu0zWTGPUuIyR8OHeNHLpfmHuJnoRyF5crO2qdpftrgE cWj7pCLlOCiRkZi5e2cN46FFlyikIqzg0NIcSDlGkhUffpJTQwsRmvHi9/4y6sRGcRyl vszJw/P4bJgzxhQEyb0kPZmBn6panmCqFJdJc= Received: by 10.115.73.20 with SMTP id a20mr3683537wal.213.1222043833675; Sun, 21 Sep 2008 17:37:13 -0700 (PDT) Received: by 10.114.159.2 with HTTP; Sun, 21 Sep 2008 17:37:13 -0700 (PDT) Message-ID: <6cd6de210809211737o564e47a4jf7f92ada4cd970dc@mail.gmail.com> Date: Sun, 21 Sep 2008 20:37:13 -0400 From: "Rocky Bernstein" To: "Zsh hackers list" Subject: fc (history) requires zsh is interactive? Why can't interactive toggled? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_37079_14892338.1222043833652" X-Virus-Scanned: ClamAV 0.92.1/8304/Mon Sep 22 00:20:16 2008 on bifrost X-Virus-Status: Clean ------=_Part_37079_14892338.1222043833652 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline When I run fc -l (history) from a zsh script that isn't interactive I get the message not interactive shell Why is it that fc -l needs an interactive shell? One can put entries in the history and one can use vared to cycle through them, so what is it about an interactive shell that is important here? Related to this, why can't an interactive shell be toggled? Suppose I run a non-interactive program and later want to attach to it say for debugging. At that point, I attach interactive tty and it becomes interactive. So what are the issues involved in turning a non-interactive program (from zsh's definition) to an interactive one? Thanks. ------=_Part_37079_14892338.1222043833652 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
When I run fc -l (history) from a zsh script that isn't interactive I get the message
 not interactive shell

Why is it that fc -l needs an interactive shell? One can put entries in the history and one can use vared to cycle through them, so what is it about an interactive shell that is important here?

Related to this, why can't an interactive shell be toggled? Suppose I run a non-interactive program and later want to attach to it say for debugging. At that point, I attach interactive tty and it becomes interactive. So what are the issues involved in turning a non-interactive program (from zsh's definition) to an interactive one?

Thanks.
------=_Part_37079_14892338.1222043833652--