From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1513 invoked by alias); 1 Jan 2015 06:35:27 -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: 19645 Received: (qmail 21723 invoked from network); 1 Jan 2015 06:35:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=LrklEcZZ c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=YNv0rlydsVwA:10 a=aS6_nkNOJKoq4Sl2Pt8A:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <141231223506.ZM26289@torch.brasslantern.com> Date: Wed, 31 Dec 2014 22:35:06 -0800 In-reply-to: <54A4DF80.7040206@eastlink.ca> Comments: In reply to Ray Andrews "print color escapes" (Dec 31, 9:47pm) References: <54A4DF80.7040206@eastlink.ca> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: print color escapes MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Dec 31, 9:47pm, Ray Andrews wrote: } } tried various things, but can't find a legit way of printing the values } of the color escapes. How should it be done? You probably want either ${(V)fg[cyan]} or ${(q)fg[cyan]}. torch% print -r ${(V)fg[cyan]} ^[[36m torch% print -r ${(q)fg[cyan]} $'\033'\[36m } I'd expect 'print } -r' to 'stay literal' with the expanded variable but no luck. It is staying literal with the expanded variable. The variable has a literal escape (ascii 033) in the value, not the string backslash e, so print -r emits that literal escape etc. It's the terminal that then turns that into a color, not the print command.