zsh-users
 help / color / mirror / code / Atom feed
* detect pipe
@ 2021-01-27 16:45 Ray Andrews
  2021-01-27 23:59 ` Bart Schaefer
  0 siblings, 1 reply; 28+ messages in thread
From: Ray Andrews @ 2021-01-27 16:45 UTC (permalink / raw)
  To: Zsh Users

I have a function that as used this test for piping quite reliably:

     if [ ! -t 0 ]; then

... but today it stopped working.  I thought I might have broken 
something in the function so tried backups and it would flicker in and 
out of effect, work one time and not the next.  Searching the web I see 
that apparently the above test is not 100% reliable. True?  If so, is 
there a better way?  This is probably not strictly a zsh problem but the 
randomness of it working intermittently suggests some time lag or delay 
or something. Perhaps the test needs time to think?  Someone might have 
a workaround even if this isn't zsh's fault.



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

end of thread, other threads:[~2021-02-14 22:25 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 16:45 detect pipe Ray Andrews
2021-01-27 23:59 ` Bart Schaefer
2021-01-28  4:57   ` Ray Andrews
2021-01-28  6:16     ` Bart Schaefer
2021-01-28 10:08     ` Vincent Lefevre
2021-01-28 10:28       ` Vincent Lefevre
2021-01-28 15:05         ` Ray Andrews
2021-01-28 15:45           ` Ray Andrews
2021-01-28 20:58             ` Bart Schaefer
2021-01-28 20:59               ` Bart Schaefer
2021-01-29  1:17               ` Ray Andrews
2021-01-29  2:50                 ` Bart Schaefer
2021-01-29  3:21                   ` Ray Andrews
2021-01-30  0:29                     ` Bart Schaefer
2021-01-30 14:26                       ` Ray Andrews
2021-01-30 19:00                         ` Bart Schaefer
2021-01-30 19:19                           ` Ray Andrews
2021-01-31 19:12                             ` Ray Andrews
2021-01-31 21:28                               ` Bart Schaefer
2021-02-14 17:31                           ` Vincent Lefevre
2021-02-14 19:33                             ` Bart Schaefer
2021-02-14 20:33                               ` Ray Andrews
2021-02-14 21:20                                 ` Bart Schaefer
2021-02-14 22:25                                   ` Ray Andrews
2021-02-14 21:24                                 ` Vincent Lefevre
2021-02-14 21:19                               ` Vincent Lefevre
2021-02-14 21:24                                 ` Bart Schaefer
2021-02-14 21:38                                 ` Bart Schaefer

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