From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23265 invoked by alias); 20 Feb 2012 20:10:39 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30246 Received: (qmail 15194 invoked from network); 20 Feb 2012 20:10:37 -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.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.216.50 as permitted sender) Received-SPF: pass (google.com: domain of mikachu@gmail.com designates 10.229.75.216 as permitted sender) client-ip=10.229.75.216; Authentication-Results: mr.google.com; spf=pass (google.com: domain of mikachu@gmail.com designates 10.229.75.216 as permitted sender) smtp.mail=mikachu@gmail.com; dkim=pass header.i=mikachu@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=98oS5ZvSTVN011f5cJKD8iatiPO0cBdwxQgsDpInUmk=; b=JAIqidmLsrLZBZdv8ta4NxSyGvdMG2md1QrFt9eAa4fxjY+pmneZPnLCXECoeRkERN uw2nZ87KF/YP+XHxoPlCLrXXATclpOwYgcvRBL+alm5foQiWy5SHxe2PNk7M/pQhxGzI rNg+TmZriuTTrilyX2+bqq/m3ikGGMgKIQm78= MIME-Version: 1.0 In-Reply-To: <120220105301.ZM436@torch.brasslantern.com> References: <20120220130259.GB7797@xvii.vinc17.org> <20120220151309.4cc1a83d@pwslap01u.europe.root.pri> <20120220160944.GC7797@xvii.vinc17.org> <20120220163557.672588e2@pwslap01u.europe.root.pri> <120220094100.ZM359@torch.brasslantern.com> <20120220183335.GE7797@xvii.vinc17.org> <120220105301.ZM436@torch.brasslantern.com> Date: Mon, 20 Feb 2012 20:48:52 +0100 Message-ID: Subject: Re: suspend (^Z) behavior while a function is running is unclear From: Mikael Magnusson To: Bart Schaefer Cc: zsh-workers@zsh.org Content-Type: text/plain; charset=UTF-8 On 20 February 2012 19:53, Bart Schaefer wrote: > On Feb 20, 7:33pm, Vincent Lefevre wrote: > } Subject: Re: suspend (^Z) behavior while a function is running is unclear > } > } > torch% foreach foo (a b c) { sleep 5 } | : > } > zsh: job can't be suspended > } > } However if the command outputs something, one loses the output. > > I didn't really mean to imply that you should use this, just that some > of the plumbing is in place if we wanted to provide direct control. > > On the other hand: > > foreach foo (a b c) { print $foo; sleep 5 } | while { read -rE } { : } > > (Using shortloops syntax to emphasize zsh-ness of this trick.) (This is actually not shortloops syntax.) -- Mikael Magnusson