From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: triviality regarding $# counts
Date: Sun, 14 Apr 2024 15:00:50 -0700 [thread overview]
Message-ID: <6822b043-a40d-42a3-b2fc-e0da6312ba88@eastlink.ca> (raw)
In-Reply-To: <CAA=-s3yP5d6SZN-Add57-QAr1ECY6KJf4jwk4p+BNmEt_URZqA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]
On 2024-04-14 10:42, Mark J. Reed wrote:
> ... That means all of these assignments store exactly the same thing
> in the variable *x*:
>
> *x=this\ is\ all\ one\ word*
>
That one is new to me. So a quoted or escaped space is no longer a word
delimiter. Yeah ... that's why in typeset, any naked space is a
delimiter, even a dozen of them make no difference, they are 'just'
delimiters. Yup, this kind of thing won't catch me again.
> *x="this is all one word"*
> *x='this is all one word'*
> *x=$'this is all one word'*
> *x=this\ is' 'all" "one$' 'word*
> *
> *
>
> The ability to mix and match gives us the old way to get an apostrophe
> into an otherwise-single-quoted string: to close the quotes, add a
> backslashed apostrophe, and then go back into quotes:
>
> *x='That'\''s all, folks!'*
>
Geez ... that's dicing with the law. I'm seeing:
'That'
then an escaped apostrophe, so literal, then
's all, folks!"
... three ... dunno how to say it ... three words joined into one.
>
>
> But it's easier to just use ANSI quotes:
>
> *x=$'That\'s all, folks!'*
>
>
Yes, that's clear.
>
> --
> Mark J. Reed <markjreed@gmail.com>
[-- Attachment #2: Type: text/html, Size: 4038 bytes --]
next prev parent reply other threads:[~2024-04-14 22:01 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 0:56 Ray Andrews
2024-04-12 4:55 ` Lawrence Velázquez
2024-04-12 14:48 ` Ray Andrews
2024-04-12 19:09 ` Bart Schaefer
2024-04-13 1:13 ` Ray Andrews
2024-04-13 1:33 ` Mark J. Reed
2024-04-13 2:28 ` Ray Andrews
2024-04-13 3:25 ` Lawrence Velázquez
2024-04-13 14:37 ` Ray Andrews
2024-04-13 15:14 ` Ray Andrews
2024-04-13 17:19 ` Mark J. Reed
2024-04-13 17:27 ` Mark J. Reed
2024-04-13 18:08 ` Ray Andrews
2024-04-13 19:45 ` Bart Schaefer
2024-04-13 20:36 ` Ray Andrews
2024-04-13 21:01 ` Bart Schaefer
2024-04-14 0:28 ` Ray Andrews
2024-04-14 0:30 ` Lawrence Velázquez
2024-04-14 3:26 ` Ray Andrews
2024-04-14 3:49 ` Lawrence Velázquez
2024-04-14 4:57 ` Bart Schaefer
2024-04-14 13:24 ` Ray Andrews
2024-04-14 13:35 ` Roman Perepelitsa
2024-04-14 14:06 ` Ray Andrews
2024-04-14 14:15 ` Roman Perepelitsa
2024-04-14 14:53 ` Ray Andrews
2024-04-14 15:11 ` Mark J. Reed
2024-04-14 16:23 ` Ray Andrews
2024-04-14 14:06 ` Mark J. Reed
2024-04-14 14:47 ` Ray Andrews
2024-04-14 14:59 ` Mark J. Reed
2024-04-14 15:51 ` Bart Schaefer
2024-04-14 17:22 ` Ray Andrews
2024-04-14 17:42 ` Mark J. Reed
2024-04-14 18:24 ` Bart Schaefer
2024-04-14 22:00 ` Ray Andrews [this message]
2024-04-13 20:11 ` Mark J. Reed
2024-04-13 20:53 ` Bart Schaefer
2024-04-14 0:19 ` Ray Andrews
2024-04-13 1:35 ` Bart Schaefer
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=6822b043-a40d-42a3-b2fc-e0da6312ba88@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).