zsh-workers
 help / color / mirror / code / Atom feed
* Re: ( Text in unknown character set UTF-8 not shown )
       [not found] ` <101222231721.ZM21959@torch.brasslantern.com>
@ 2010-12-23 17:41   ` ZyX
  2010-12-23 19:38     ` Why does $'' not expand inside ""? Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: ZyX @ 2010-12-23 17:41 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: Text/Plain, Size: 1101 bytes --]

Reply to message «Re: ( Text in unknown character set UTF-8 not shown )», 
sent 10:17:21 23 December 2010, Thursday
by Bart Schaefer:

> I believe the reasoning is that double-quote is allowed to appear
> inside $'...' and to expand $'...' inside double-quotes creates a
> parsing conflict.  "How does this $'with " embeded' parse?"
"How does this $'with " embeded' parse?"
"Just like this `with " embedded` parse."
There are no parsing conflicts here, but
> Because it doesn't in any of the shells that introduced it before
> zsh had it.
is legitimate enough for me because it helps porting scripts from/to zsh.

> } It's not, as far as I can tell, mentioned in the documentation.
> 
> The documentation for zsh tends to omit things that are assumed
> knowledge, particularly when a concept or feature originates from
> another source -- because if you didn't already know about it from
> the original source, why did you even think to use it?
But when I worked in bash I knew nothing about $'...' (because I even did not 
know where to find documentation to tweak my inputrc).

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Why does $'' not expand inside ""?
  2010-12-23 17:41   ` ( Text in unknown character set UTF-8 not shown ) ZyX
@ 2010-12-23 19:38     ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2010-12-23 19:38 UTC (permalink / raw)
  To: zsh-workers

On Dec 23,  8:41pm, ZyX wrote:
} Subject: Re: ( Text in unknown character set UTF-8 not shown )

Sorry about that weird subject.

} > I believe the reasoning is that double-quote is allowed to appear
} > inside $'...' and to expand $'...' inside double-quotes creates a
} > parsing conflict.  "How does this $'with " embeded' parse?"
} "How does this $'with " embeded' parse?"
} "Just like this `with " embedded` parse."

Ah, but backticks were already present in the shell.  The conflict is
with "How did this $'with " embedded' parse before $'existed'?"

} > The documentation for zsh tends to omit things that are assumed
} > knowledge, particularly when a concept or feature originates from
} > another source -- because if you didn't already know about it from
} > the original source, why did you even think to use it?
} But when I worked in bash I knew nothing about $'...' (because I
} even did not know where to find documentation to tweak my inputrc).

Entirely understandable nowadays, but much of the zsh doc was written
when zsh was always the shell to which someone switched from another
shell with which they were already familiar.  That's not the case as
often any more now that zsh is packaged with several OS dists, and is
not the case for $'...', but the tendency to write that way remains.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-23 19:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AANLkTi=vnaRw3qxpuuEWF9t0K-TyPJKkhVUYy_8qR-=e@mail.gmail.com>
     [not found] ` <101222231721.ZM21959@torch.brasslantern.com>
2010-12-23 17:41   ` ( Text in unknown character set UTF-8 not shown ) ZyX
2010-12-23 19:38     ` Why does $'' not expand inside ""? Bart Schaefer

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).