Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
How to redirect output without escape sequences to a file
- X-seq: zsh-users 16002
- From: Thorsten Kampe <thorsten@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: How to redirect output without escape sequences to a file
- Date: Sun, 8 May 2011 21:27:30 +0200
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author