zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Mario Lang <mlang@home.delysid.org>
Cc: zsh-workers@sunsite.dk
Subject: Re: ZSpeak! Only Zsh can do this!
Date: Thu, 22 Mar 2001 06:52:23 +0000	[thread overview]
Message-ID: <1010322065223.ZM19693@candle.brasslantern.com> (raw)
In-Reply-To: <87zoefdor5.fsf@home.delysid.org>

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   


  reply	other threads:[~2001-03-22  6:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-19 10:07 Sven Wischnowsky
2001-03-21 17:18 ` Mario Lang
2001-03-22  6:52   ` Bart Schaefer [this message]
2001-03-23  8:42     ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2001-03-16 14:21 Mario Lang
2001-03-16 14:39 ` Peter Stephenson
2001-03-16 18:23 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1010322065223.ZM19693@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=mlang@home.delysid.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).