From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19362 invoked from network); 22 Mar 2001 06:52:57 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Mar 2001 06:52:57 -0000 Received: (qmail 24580 invoked by alias); 22 Mar 2001 06:52:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13699 Received: (qmail 24566 invoked from network); 22 Mar 2001 06:52:48 -0000 From: "Bart Schaefer" Message-Id: <1010322065223.ZM19693@candle.brasslantern.com> Date: Thu, 22 Mar 2001 06:52:23 +0000 In-Reply-To: <87zoefdor5.fsf@home.delysid.org> Comments: In reply to Mario Lang "Re: ZSpeak! Only Zsh can do this!" (Mar 21, 6:18pm) References: <200103191007.LAA01992@beta.informatik.hu-berlin.de> <87zoefdor5.fsf@home.delysid.org> X-Mailer: Z-Mail (5.0.0 30July97) To: Mario Lang Subject: Re: ZSpeak! Only Zsh can do this! Cc: zsh-workers@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 21, 6:18pm, Mario Lang wrote: } Subject: Re: ZSpeak! Only Zsh can do this! } } Another really nice to have(tm) feature would be stdout buffering. } What I mean is that the shell should have an array (much like history) } which contains the outputs (stdout and stderr separated) } from the last commands. This amounts, approximately, to implementing the "less" pager in the zsh C code. (The old, original "less" before it grew several million bells and whistles, when it was mainly just a clever way of buffering output so you could scroll backwards and forwards through it.) The difficulty with doing this is that a surprisingly large number of commands do pay attention to whether their standard output is a pipe or a file or a terminal. For the shell to capture the outputs means that the output of every command is _always_ a pipe. It simply does not work (see my remarks on the problems of using multios with `exec'). However ... it might be possible to construct something based on the zpty module, where stdout and stderr would (unless redirected) each go to a separate pty, and both ptys would be managed by a front-end that slurped up the output from each as it appeared. That such a thing is possible is evidenced by the `screen' tty windowing program, which actually might be a better starting point than zsh for such a project. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net