zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: first adventures
Date: Sat, 01 Nov 2014 13:24:52 -0700	[thread overview]
Message-ID: <54554194.80109@eastlink.ca> (raw)
In-Reply-To: <20141101184028.0737142d@pws-pc.ntlworld.com>

On 11/01/2014 11:40 AM, Peter Stephenson wrote:

This isn't fair in this case.  The character \ was picked to be a
special character because it isn't commonly used in normal text.  So
it's special to the command line.  You now need it to be special
somewhere else *as well*, at a later stage, for something that also
picked the backslash to be special for exactly the same reason.  It's
not surprising that takes a bit of doing.


Yeah, I see that.  Still, all those {( ) .... processors are arbitrary, 
tho useful, tools.  One could,
I suppose create new ones to  do whatever one wanted, including 
stripping quotation marks
while leaving the 'special' backslash pairs. But I understand the logic 
of (Q) now, and I'm happy with (z)
anyway because quoted strings are naturally single arguments, and (z) 
leaves ' \n ' alone.

But my thinking is anticipated by the ' -r ' switch, which recognizes 
the specialness
of the ' \n ' family of escapes, so one could imagine other parts of the 
shell recognizing that, too.
It would just 'harmonize' what print and read and echo do with what the 
shell itself might be
able to provide, namely special treatment for  \n \t \b , etc. if requested.
> With your analogy, you're trying to put a coffee bean into a roaster and
> saying that you want it to emerge unscathed in such a way that it can be roast by
> something else after it emerges.
I'd rather say that I'd like to be able look at the bean before it's 
roasted at all.  Anyway, TRAPDEBUG
seems to do exactly that, so my itch is scratched.
>
> If you want text not to be processed by the shell, the best way of doing
> that is to pass it via standard input and output rather than the command
> line, using "read -r" and "print -r".

Can you give me an example of that, please?
> pws
>


  reply	other threads:[~2014-11-01 20:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <544D2D6F.8030505@eastlink.ca>
     [not found] ` <20141026175257.2611487b@pws-pc.ntlworld.com>
     [not found]   ` <544FD6DD.7010806@eastlink.ca>
     [not found]     ` <141028210510.ZM10784@torch.brasslantern.com>
     [not found]       ` <54510A96.20009@eastlink.ca>
     [not found]         ` <141029134624.ZM15681@torch.brasslantern.com>
     [not found]           ` <545178DF.1040600@eastlink.ca>
     [not found]             ` <141029210738.ZM15833@torch.brasslantern.com>
     [not found]               ` <5452ED18.7070208@eastlink.ca>
     [not found]                 ` <141030195906.ZM30057@torch.brasslantern.com>
2014-10-31 18:10                   ` Ray Andrews
2014-10-31 19:59                     ` Peter Stephenson
2014-11-01  4:26                       ` Ray Andrews
2014-11-01  7:51                         ` Mikael Magnusson
2014-11-01 16:35                           ` Ray Andrews
2014-11-01 18:40                             ` Peter Stephenson
2014-11-01 20:24                               ` Ray Andrews [this message]
2014-11-01 21:11                                 ` Peter Stephenson
2014-11-01 23:23                                   ` Ray Andrews

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=54554194.80109@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).