zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: convolutions
Date: Fri, 06 Nov 2015 22:16:43 -0800	[thread overview]
Message-ID: <563D974B.3000308@eastlink.ca> (raw)
In-Reply-To: <CAHYJk3TpPvCxqphkMLLnp+rK-s+JcDOVEAW0aDQK58R_0RerCg@mail.gmail.com>

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.


  reply	other threads:[~2015-11-07  6:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-07  2:15 convolutions Ray Andrews
2015-11-07  2:49 ` convolutions ZyX
2015-11-07  4:10   ` convolutions Ray Andrews
2015-11-07  5:37 ` convolutions Mikael Magnusson
2015-11-07  6:16   ` Ray Andrews [this message]
2015-11-07  6:38     ` convolutions Mikael Magnusson
2015-11-07 15:35       ` convolutions Ray Andrews
2015-11-07 17:26         ` convolutions ZyX
2015-11-07  5:38 ` convolutions Bart Schaefer
2015-11-07  6:33   ` convolutions Ray Andrews
2015-11-07  9:32     ` convolutions Bart Schaefer
2015-11-07  9:40       ` convolutions Bart Schaefer
2015-11-07 16:09       ` convolutions Ray Andrews
2015-11-07 17:33         ` convolutions Bart Schaefer
2015-11-07 18:28           ` convolutions Ray Andrews
2015-11-07 17:17   ` convolutions Martin Vaeth
2015-11-08 15:27     ` convolutions Ray Andrews
2015-11-08 19:14       ` convolutions Bart Schaefer
2015-11-08 21:06         ` convolutions Ray Andrews
2015-11-09  8:50       ` convolutions Martin Vaeth

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=563D974B.3000308@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --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).