From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11459 invoked by alias); 7 Nov 2015 06:16:47 -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: 20907 Received: (qmail 5195 invoked from network); 7 Nov 2015 06:16:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Authority-Analysis: v=2.1 cv=T/C1EZ6Q c=1 sm=1 tr=0 a=NKvc7L9z7/b0bXwZ1ZmuGA==:117 a=NKvc7L9z7/b0bXwZ1ZmuGA==:17 a=IkcTkHD0fZMA:10 a=7YgmM5gMvzTutd7D6dQA:9 a=QEXdDO2ut3YA:10 Message-id: <563D974B.3000308@eastlink.ca> Date: Fri, 06 Nov 2015 22:16:43 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: convolutions References: <563D5ED5.1070102@eastlink.ca> In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit On 11/06/2015 09:37 PM, Mikael Magnusson wrote: > A smart thing to include when asking for a simpler way to do an > obfuscated thing is what it is you're actually trying to do. Saves > people the effort of trying to deobfuscate your code first. It's also > super unclear what you mean by "expanding $red into native". ... expanding color variables, eg. " ${red} " into their native " \e[31;1m " in a file. That isn't clear? Variables holding color codes seem like a very routine thing to me, there are many of them as a standard part of the shell. If you have some long string with color variables ( eg. "$_red" ) in it, and you echo the string, the colors execute, but if you save that same string to a file and 'cat' it, the color variables do not expand--it is necessary to convert them to the actual escape codes. My code snippet does that, I'm just wondering if it's as simple as it can be.