zsh-workers
 help / color / mirror / code / Atom feed
* broken pipe with prompt -h
@ 2002-06-29 11:34 Adam Spiers
  2002-06-29 17:17 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Spiers @ 2002-06-29 11:34 UTC (permalink / raw)
  To: zsh workers mailing list

In attempts to counter my previous foolishness for initially making
'8bit' the default display mode for my adam2 prompt, and then swapping
it around so that 'plain' is the default, I've found myself wanting to
check from within my .zshrc which version of adam2 is available in the
installed zsh:

  $ prompt -h adam2 | grep -q 8bit

However, due to some signal-trapping related funniness, if grep finds
a match early enough, set_prompt gets a SIGPIPE:

  $ prompt -h adam2 | grep -q plain
  set_prompt:52: write error: broken pipe
  set_prompt:53: write error: broken pipe

I tried to fix this with a

  trap '' PIPE

just after the 'setopt localtraps' in set_prompt and in various other
places, but it only occasionally works, which is very curious.  Can
anyone please tell me the correct fix?


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

end of thread, other threads:[~2002-07-04 12:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-29 11:34 broken pipe with prompt -h Adam Spiers
2002-06-29 17:17 ` Bart Schaefer
2002-07-03 17:08   ` Adam Spiers
2002-07-03 19:21     ` Bart Schaefer
2002-07-04 12:12       ` Adam Spiers

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