zsh-users
 help / color / mirror / code / Atom feed
From: "Lawrence Velázquez" <larryv@zsh.org>
To: linuxtechguy@gmail.com
Cc: zsh-users@zsh.org
Subject: Re: Looking for clarity of the word/term "string" as used in a couple of places in man pages
Date: Sun, 26 Jun 2022 00:35:35 -0400	[thread overview]
Message-ID: <b564fb4c-b6ab-48a5-9c4c-29975c48dc2e@www.fastmail.com> (raw)
In-Reply-To: <CA+rB6GLSQd1=dLsPDe4uzf2vxFxOCX3jaw0QfiNsN4KJ2kS1yA@mail.gmail.com>

On Sat, Jun 25, 2022, at 9:14 PM, Jim wrote:
> The CONDITIONAL EXPRESSIONS '-n string' and '-z string' both allow 
> 'string' to be
> either a literal string(quoted or not) or a parameter.
>
> Parameter Expansion Flags 'r' and 'l' for 'string1' and 'string2' 
> appear only to allow literal
> strings. And, quotes are considered part of said string.  The only 
> special character that
> I found that works, so far, is a backslash(\).
>
> Is this an inconsistent use of the term string, or am I missing something?

What you're missing is that conditional expressions' "file", "string",
and "pattern" arguments are documented to undergo shell expansions,
while the arguments of most parameter expansion flags are not.

"String" is not a rigorously defined term, so it's not all that
useful to get hung up on what it "means".

-- 
vq


      reply	other threads:[~2022-06-26  4:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-26  1:14 Jim
2022-06-26  4:35 ` Lawrence Velázquez [this message]

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=b564fb4c-b6ab-48a5-9c4c-29975c48dc2e@www.fastmail.com \
    --to=larryv@zsh.org \
    --cc=linuxtechguy@gmail.com \
    --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).