Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: stdbuf -o0 -i0 via a Zsh native interface?
- X-seq: zsh-workers 51788
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: stdbuf -o0 -i0 via a Zsh native interface?
- Date: Thu, 25 May 2023 19:02:17 +0000
- Archived-at: <https://zsh.org/workers/51788>
- In-reply-to: <CAH+w=7ZgA=80EP5peb6sO330hj2tY58LCJ=+7Lcr464L1A-JnQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAKc7PVAh95GL_kx1FiACaexEHsK8PVLrJ+T4KxnKTZr=5KDXMw@mail.gmail.com> <1297534493.4668003.1685024167868@mail.virginmedia.com> <CAH+w=7ZgA=80EP5peb6sO330hj2tY58LCJ=+7Lcr464L1A-JnQ@mail.gmail.com>
On Thu, 25 May 2023 at 18:36, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Thu, May 25, 2023 at 7:16 AM Peter Stephenson
> <p.w.stephenson@xxxxxxxxxxxx> wrote:
> >
> > > On 25/05/2023 12:21 Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
> >
> > Something like this? It looks like a good fit for zsystem.
>
> That's a start, but it doesn't solve Sebastian's problem of having to
> hack the stdbuf prefix into the command string for external commands.
I think that it does solve the problem, if the buffer settings are
applied to external commands. I would say that they are, but your
answer gives doubts… are they applied?
Also, I wonder why the buffers can be set only to 0, 1 and 2 and not
to every descriptor? This might be an effect of suggestion from my
original post, but the mechanism of a builtin command obtaining file
descriptor opens my eyes that buffers can be changed on every
descriptor (or not?).
> We'd need something akin to the STTY parameter to specify a prefix for
> external commands. That might have its own security concerns.
That's an interesting approach, however IMHO it would make the
mechanism's interface script-targeted, and not foreground, interactive
work (because of the need of prepend command each time with a var export).
--
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author