Re: man bash-builtins

2021-02-14 Thread Stephane Chazelas
2021-02-12 19:33:33 -0700, ron: > In the Synopsis section, the builtin `caller` is not included. Several > keywords are listed as builtins: [, if, until and while. You're probably refering to the bash-builtins.1 man page shipped with Debian. If you look at the bottom, you'll see that man page is f

Re: syntax error while parsing a case command within `$(...)'

2021-02-14 Thread Koichi Murase
2021年2月14日(日) 15:41 Andreas Kusalananda Kähäri : > And using (x) doesn't help: > > % bash -c ': $(case x in (x) esac)' > bash: -c: line 1: unexpected EOF while looking for matching `)' > bash: -c: line 2: syntax error: unexpected end of file This is interesting. I think this is just an oversight.

Re: export loses error

2021-02-14 Thread Stephane Chazelas
2021-02-09 10:23:51 -0500, Chet Ramey: [...] > It's the assignment statement that's the oddball here; it's the only place > where the exit status from a command substitution has any effect. This is a > POSIX (maybe ksh) invention to provide assignment statements with a useful > exit status. [...]

Re: syntax error while parsing a case command within `$(...)'

2021-02-14 Thread Oğuz
14 Şubat 2021 Pazar tarihinde Koichi Murase yazdı: > 2021年2月14日(日) 15:41 Andreas Kusalananda Kähäri : > > And using (x) doesn't help: > > > > % bash -c ': $(case x in (x) esac)' > > bash: -c: line 1: unexpected EOF while looking for matching `)' > > bash: -c: line 2: syntax error: unexpected end

Re: syntax error while parsing a case command within `$(...)'

2021-02-14 Thread Koichi Murase
2021年2月14日(日) 17:16 Oğuz : >> This is interesting. I think this is just an oversight. A quick fix >> like the attached patch should be fine. [ Note: The patch seems to >> work fine, but I haven't carefully read the code, so I'm not sure if >> this fix is really correct. ] > > It seems to be on the

Re: syntax error while parsing a case command within `$(...)'

2021-02-14 Thread Robert Elz
Date:Sun, 14 Feb 2021 17:00:06 +0800 From:Koichi Murase Message-ID: | I guess you are using Bash for so many years, Yes, since Paul Fox created and maintained it (version 1). It allowed me to escape from csh. | but it was fixed in Bash 4.0 (2009). That is

Re: syntax error while parsing a case command within `$(...)'

2021-02-14 Thread Stephane Chazelas
2021-02-14 18:02:52 +0700, Robert Elz: [...] > | I guess you are using Bash for so many years, > > Yes, since Paul Fox created and maintained it (version 1). It allowed > me to escape from csh. ITYM Brian Fox. Maybe the confusion comes from zsh's Paul Falstad. -- Stephane

Re: syntax error while parsing a case command within `$(...)'

2021-02-14 Thread Robert Elz
Date:Sun, 14 Feb 2021 13:14:29 + From:Stephane Chazelas Message-ID: <20210214131429.yxr5egs7zs6fe...@chazelas.org> | ITYM Brian Fox. Yes, probably ... my memory is pathetic, and that was all a long time ago. kre

Re: syntax error while parsing a case command within `$(...)'

2021-02-14 Thread Oğuz
14 Şubat 2021 Pazar tarihinde Robert Elz yazdı: > > That's a step up on outright rejecting them, which they do from time > to time. I don't much care, anyone who really cares about receiving > e-mail shouldn't be using gmail. > What else am I gonna use? It's free -- Oğuz

Re: syntax error while parsing a case command within `$(...)'

2021-02-14 Thread Dale R. Worley
Before we worry about what to change, I want to note that the original example is syntactically incorrect. The example is $ bash -c ': $(case x in x) esac)' But the manual page makes it clear that each case must be ended with ";;". case word in [ [(] pattern [ | pattern ] ... ) list ;;

Re: syntax error while parsing a case command within `$(...)'

2021-02-14 Thread Oğuz
14 Şubat 2021 Pazar tarihinde Dale R. Worley yazdı: > Before we worry about what to change, I want to note that the original > example is syntactically incorrect. The example is > > $ bash -c ': $(case x in x) esac)' > > But the manual page makes it clear that each case must be ended with > ";

Re: syntax error while parsing a case command within `$(...)'

2021-02-14 Thread Eli Schwartz
On 2/14/21 2:43 PM, Dale R. Worley wrote: > Before we worry about what to change, I want to note that the original > example is syntactically incorrect. The example is > > $ bash -c ': $(case x in x) esac)' > > But the manual page makes it clear that each case must be ended with > ";;". > >

Re: syntax error while parsing a case command within `$(...)'

2021-02-14 Thread Lawrence Velázquez
> On Feb 14, 2021, at 3:00 PM, Oğuz wrote: > > 14 Şubat 2021 Pazar tarihinde Dale R. Worley yazdı: > >> Before we worry about what to change, I want to note that the original >> example is syntactically incorrect. The example is >> >> $ bash -c ': $(case x in x) esac)' >> >> But the manual

Re: syntax error while parsing a case command within `$(...)'

2021-02-14 Thread Andreas Schwab
On Feb 14 2021, Eli Schwartz wrote: > Just a running trend that esac does not get recognized without a > separator. $ bash -c 'case x in x) esac' Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something co

Re: syntax error while parsing a case command within `$(...)'

2021-02-14 Thread Eli Schwartz
On 2/14/21 3:35 PM, Andreas Schwab wrote: > On Feb 14 2021, Eli Schwartz wrote: > >> Just a running trend that esac does not get recognized without a >> separator. > > $ bash -c 'case x in x) esac' The thread title does mention $(...) as the relevant context up for discussion. Apologies if my te

Re: syntax error while parsing a case command within `$(...)'

2021-02-14 Thread Andreas Schwab
On Feb 14 2021, Eli Schwartz wrote: > On 2/14/21 3:35 PM, Andreas Schwab wrote: >> On Feb 14 2021, Eli Schwartz wrote: >> >>> Just a running trend that esac does not get recognized without a >>> separator. >> >> $ bash -c 'case x in x) esac' > > The thread title does mention $(...) as the releva

Behaviour of test -v with assoc array and quote character in key

2021-02-14 Thread Daniel Gröber
Hi list, I've found what I belive to be a bug in how `test -v` expands the key in an associative array. The following minimal test case demonstrates the problem: declare -A array mytest () { array["$1"]=123 test -v array["$1"] printf 'test -v array