From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24485 invoked by alias); 9 May 2011 02:22:41 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16007 Received: (qmail 7873 invoked from network); 9 May 2011 02:22:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.216.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to :x-mailer; bh=xntGuvSVx0BQ1DSgrsbd4wvPXZRduDNd+4yEQGKam9s=; b=uLwF/xW8wMu5PkebF/7YLCf9kdHXSNMYqqJhEn3/ROsIet//Km3hBHejUrPO7TB0nb Q6AyU4L4zLSmqZ0ujEOnNWkhrKgbztSbU6T43TTYbGqRT54fwBtZ2PRcskTTulRfwxsH IvD3wE+oLSu1BqtmYCMR2XrdJQDCC14QbUJpw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=B60OKVThu/sCHvxKD+AaeC2SNkEO+2oKpBwqSmkiSHCI8xS0mz5NeNLVFzjUTD84WG XBgz6f9phgZLAEDf6xLSiRGAni3mLXKYB7PxecL8+qjpPNKFX2qA7NjSs5i1ISTOAjvJ urGyAA8QbIhS7rMWA46rnT9PElTya9TOG5WqQ= Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: How to redirect output without escape sequences to a file From: Aaron Davies In-Reply-To: Date: Sun, 8 May 2011 21:58:13 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <1E0074CD-F7C1-44FF-82CC-EC77D68A6204@gmail.com> References: To: zsh-users@zsh.org X-Mailer: Apple Mail (2.1084) On May 8, 2011, at 3:27 PM, Thorsten Kampe wrote: > I've modified my PS4 so it contains a little bit of colour[1]. When I=20= > redirect the debug output to a file ("&> trace.log") this naturally=20 > contains the escape sequences literally[2] (which makes the output=20 > somehow unclear). >=20 > Is there a way to either strip the escape sequences when redirected to = a=20 > file or to modify PS4 when stderr is redirected to a file? not sure about those, but "less -R" (or "less -r") may help--they make = less output ANSI color sequences (or all control sequences) literally, = instead of with caret notation, so you'd actually see the same colors = you do on the console. --=20 Aaron Davies aaron.davies@gmail.com=