zsh-workers
 help / color / mirror / code / Atom feed
* stdbuf -o0 -i0 via a Zsh native interface?
@ 2023-05-25 11:21 Sebastian Gniazdowski
  2023-05-25 14:16 ` Peter Stephenson
  0 siblings, 1 reply; 13+ messages in thread
From: Sebastian Gniazdowski @ 2023-05-25 11:21 UTC (permalink / raw)
  To: Zsh hackers list

Hi
I'm using coproc to continuously read command's output, to have the
effect of `CMD | fzf` – i.e. of instantly available contents while
reading all of it eventually, However, I've had problem with buffering
– no output from the CMD in `coproc CMD` was available for a long
time, and I've found that `coproc { stdbuf -o0 -i0 CMD; }` helps.

However, this is sub-optimal solution because I have to hideously
prepend the stdbuf command before each user CMD, meaning that entering
builtin commands will not work (e.g.: `stdbuf -i0 -o0 print smthg`).

I wonder if the infamous buffering problem, solved by the hacky
ld-preload stdbuf program could be fixed on the level of Zsh? Like,
e.g.: special array, say: zsh_buffer=( 0 0 0 )? For stdin, stdout and
stderr buffers.

-- 
Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-05-31 12:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-25 11:21 stdbuf -o0 -i0 via a Zsh native interface? 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
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

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).