zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Peter Stephenson <p.w.stephenson@ntlworld.com>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: stdbuf -o0 -i0 via a Zsh native interface?
Date: Fri, 26 May 2023 02:17:16 +0000	[thread overview]
Message-ID: <CAKc7PVDr4PtJ=gyc+8LyRdSPsA2wYQCGwxE2PP1+HG0JF9T+oQ@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7ZbPmZWH1swPYDv-z+trheiKEO_Rz4wCU_AwbrUN7jpCA@mail.gmail.com>

On Thu, 25 May 2023 at 21:21, Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> Use with great caution, but to test the concept:
>
> TRAPDEBUG() { setopt err_exit; stdbuf -o0 -i0 ${(z)ZSH_DEBUG_CMD} }

Interesting, I've never touched debug trap, this gives me a glimpse of
how it is working.

And as for the topic in general, I've had a moment of understanding
that what's needed is basically: a `stdbuf` command that's *built-in*,
and this comes down  to your idea of `STTY=… my-cmd` -like
inline-export variable, which is a nicer, more integrated version of a
stdbuf-clone builtin (and could be made non-only-inline-export, to set
once and forget). Now, who has time to look at stdbuf.c? :) To grasp
what the LD-trick used there is?

-- 
Best regards,
Sebastian Gniazdowski


  reply	other threads:[~2023-05-26  2:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25 11:21 Sebastian Gniazdowski
2023-05-25 14:16 ` Peter Stephenson
2023-05-25 18:35   ` Bart Schaefer
2023-05-25 19:02     ` Sebastian Gniazdowski
2023-05-25 19:09       ` Bart Schaefer
2023-05-25 19:28         ` Sebastian Gniazdowski
2023-05-25 21:21           ` Bart Schaefer
2023-05-26  2:17             ` Sebastian Gniazdowski [this message]
2023-05-26 10:23               ` Sebastian Gniazdowski
2023-05-26  9:30                 ` Roman Perepelitsa
2023-05-26 20:52                   ` Bart Schaefer
2023-05-30 11:17     ` Peter Stephenson
2023-05-31 12:38       ` Sebastian Gniazdowski

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='CAKc7PVDr4PtJ=gyc+8LyRdSPsA2wYQCGwxE2PP1+HG0JF9T+oQ@mail.gmail.com' \
    --to=sgniazdowski@gmail.com \
    --cc=p.w.stephenson@ntlworld.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).