From: Thorsten Kampe <thorsten@thorstenkampe.de>
To: zsh-users@zsh.org
Subject: How to redirect output without escape sequences to a file
Date: Sun, 8 May 2011 21:27:30 +0200 [thread overview]
Message-ID: <iq6qrc$39j$1@dough.gmane.org> (raw)
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
next reply other threads:[~2011-05-08 19:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-08 19:27 Thorsten Kampe [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='iq6qrc$39j$1@dough.gmane.org' \
--to=thorsten@thorstenkampe.de \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).