Re: Bash reference manual feedback

2022-09-12 Thread Martin D Kealey
I believe you are correct on all points except this one:

On Mon, 12 Sept 2022 at 01:30, David Apps  wrote:

> h3 6.12 Shell Compatibility Mode
>
> > * the shell does not print a warning message if an attempt is made to
> > use a quoted compound assignment as an argument to declare (declare -a
> > foo=’(1 2)’). Later versions warn that this usage is deprecated
>
> 9. It is probably unhelpful to use the "’" character here.
>

You have inadvertently stated the entire point of this section: yes, they
are an unhelpful historical anomaly and should not be used in scripts. Of
course this advisory has to actually show the characters that it's telling
you to avoid.

Or do you think it should also tell you to avoid:
declare -a foo="(1 2)"
declare -a foo=\(1\ 2\)

-Martin


Re: Bash reference manual feedback

2022-09-12 Thread Andrew Church
>> 9. It is probably unhelpful to use the "’" character here.
>
>You have inadvertently stated the entire point of this section: yes, they
>are an unhelpful historical anomaly and should not be used in scripts. Of
>course this advisory has to actually show the characters that it's telling
>you to avoid.

I suspect the intent here was to point out the use of the "smart quote"
(U+2019) instead of the intended ASCII single quote (U+0027).

  --Andrew Church
https://achurch.org/



Re: bash-5.1.16 fails to unlink named pipes if pipeline terminates prematurely

2022-09-12 Thread RVP

On Fri, 9 Sep 2022, Chet Ramey wrote:


Bash is out of the picture by the time the diff command dies due to
SIGPIPE. It performs word expansions, including process substitution,
and execs diff. It's no longer around to remove the named pipes.



Without the `| head' to provoke a SIGPIPE, the named pipes are removed.
Should't it do the same for the SIGPIPE case too? (In any case, I've
recompiled bash without that config. override, so this is just a minor
irritation.)

Thx,
-RVP