zsh-users
 help / color / mirror / code / Atom feed
* How to redirect output without escape sequences to a file
@ 2011-05-08 19:27 Thorsten Kampe
  2011-05-09  1:58 ` Aaron Davies
  2011-05-09 15:01 ` Bart Schaefer
  0 siblings, 2 replies; 7+ messages in thread
From: Thorsten Kampe @ 2011-05-08 19:27 UTC (permalink / raw)
  To: zsh-users

Hi,

I've modified my PS4 so it contains a little bit of colour[1]. When I 
redirect the debug output to a file ("&> trace.log") this naturally 
contains the escape sequences literally[2] (which makes the output 
somehow unclear).

Is there a way to either strip the escape sequences when redirected to a 
file or to modify PS4 when stderr is redirected to a file?

Thanks in advance,
Thorsten
[1] PS4='%{\e[1;36m%}+%{\e[m%}%1N[%i]%{\e[1;36m%}:%{\e[m%} '
[2] ^[[1;36m+^[[mslpsnoop.sh[53]^[[1;36m:^[[m print


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

end of thread, other threads:[~2011-05-16 21:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-08 19:27 How to redirect output without escape sequences to a file Thorsten Kampe
2011-05-09  1:58 ` Aaron Davies
2011-05-09 15:01 ` Bart Schaefer
2011-05-12 18:10   ` Thorsten Kampe
2011-05-13  6:32     ` Bart Schaefer
2011-05-16 11:03   ` Thorsten Kampe
2011-05-16 21:36     ` 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).