2019-07-04 10:34:37 +0100, Stephane Chazelas:
[...]
> See 2.6.2 parameter expansion:
> 
> } If a parameter expansion occurs inside double-quotes:
> }
> }   • Pathname expansion shall not be performed on the results of the 
> expansion.
> }
> }   • Field splitting shall not be performed on the results of the expansion.

That wording is a bit wrong. I think the intention was that it
removes the special meaning of wildcard characters, it shouldn't
by itself affect whether pathname expansion is done or not (like
in ls -d -- "$var"*).

Same applies for command substitution.

There's no matching text to say that word splitting is not
applied if $((...)) is in double quotes, but IIRC, it's
clarified elsewhere that word splitting is not performed on
quoted expansions.

 
> I'm sure there's something similar for ${a#"$b"} or case $a in ("$b")
[...]

Well, I'm not sure about ${a#"$b"} now. There's this text I
don't really understand as well:

> Enclosing the full parameter expansion string in double-quotes
> shall not cause the following four varieties of pattern
> characters to be quoted, whereas quoting characters within the
> braces shall have this effect. In each variety, if word is
> omitted, the empty pattern shall be used.

What "following four varieties of pattern characters"?

(follows a number of examples showing bad coding practice
(missing quotes, usage of echo for arbitrary data...))

I can't find much about case $a in ($b) either.

-- 
Stephane

Reply via email to