From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7270 invoked from network); 22 Sep 2008 12:07:59 -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 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 12:07:59 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 51303 invoked from network); 22 Sep 2008 12:07:17 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 22 Sep 2008 12:07:17 -0000 Received: (qmail 4624 invoked by alias); 22 Sep 2008 12:07:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25708 Received: (qmail 4612 invoked from network); 22 Sep 2008 12:07:04 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 22 Sep 2008 12:07:04 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [217.69.20.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id E31FC8048AB6 for ; Mon, 22 Sep 2008 14:06:40 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly37d.srv.mailcontrol.com (MailControl) with ESMTP id m8MC68IB032644 for ; Mon, 22 Sep 2008 13:06:11 +0100 Received: from news01 ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Mon, 22 Sep 2008 13:06:07 +0100 Date: Mon, 22 Sep 2008 13:06:02 +0100 From: Peter Stephenson To: "Zsh hackers list" Subject: Re: fc (history) requires zsh is interactive? Why can't interactive toggled? Message-ID: <20080922130602.4746e4d1@news01> In-Reply-To: <6cd6de210809211737o564e47a4jf7f92ada4cd970dc@mail.gmail.com> References: <6cd6de210809211737o564e47a4jf7f92ada4cd970dc@mail.gmail.com> Organization: CSR X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 22 Sep 2008 12:06:07.0932 (UTC) FILETIME=[987157C0:01C91CAB] X-Scanned-By: MailControl A-08-50-14 (www.mailcontrol.com) on 10.68.0.147 X-Virus-Scanned: ClamAV 0.92.1/8307/Mon Sep 22 07:05:57 2008 on bifrost X-Virus-Status: Clean On Sun, 21 Sep 2008 20:37:13 -0400 "Rocky Bernstein" wrote: > 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? When non-interactive, history isn't loaded at the start and needs loading for the command you're running or by special interaction. So "fc -l" hasn't been very useful and the error message tends to be more helpful than simply doing nothing because you're in a non-interactive shell with, the vast majority of the time, no history. There's no basic reason why it shouldn't work if history works elsewhere. > Related to this, why can't an interactive shell be toggled? No basic reason, again, but it's a complicated support nightmare making things changeable at run time rather than, as now, once when the shell starts up. For example, turning on job control in the middle of a hitherto non-interactive shell changes the nature of what's stored in the job table. All that could in principle be fixed, it's just work, and likely to be fairly low priority since we have very little effort available for new large-scale tasks, particularly those which are liable to introduce bugs. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070