git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] test-lib: check Bash version for '-x' without using shell arrays

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Jan 3, 2019, 11:36 UTC
Message-ID
<20190103113659.GA4673@szeder.dev>
In-Reply-To
<20190101231949.8184-1-szeder.dev@gmail.com>
On Wed, Jan 02, 2019 at 12:19:49AM +0100, SZEDER Gábor wrote:
Show 6 quoted lines
> To my understanding both shells are right and conform to POSIX,
> because the standard allows both behavior by stating the following
> under '2.8.1 Consequences of Shell Errors':
> 
>   "An expansion error is one that occurs when the shell expansions
>   define in wordexp are carried out (for example, "${x!y}", because

That "define" above always stops my (non-native) English parser for a moment or two... shouldn't it be s/define/defined/ ?

It's not a copy-paste error, POSIX does indeed write "define" there, see:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_01
(First paragraph below the table and the Notes.)
>   '!' is not a valid operator); an implementation may treat these as
>   syntax errors if it is able to detect them during tokenization,
>   rather than during expansion."
> 
Previous: Carlo Arenas
Message 14 of 14 in “test-lib: check Bash version for '-x' without using shell arrays”
  1. test-lib: check Bash version for '-x' without using shell arraysSZEDER Gábor, Jan 1, 2019
  2. Johannes SixtJan 2, 2019
  3. Junio C HamanoJan 2, 2019
  4. test-lib: check Bash version for '-x' without using shell arraysSZEDER Gábor, Jan 3, 2019
  5. Junio C HamanoJan 3, 2019
  6. SZEDER GáborJan 4, 2019
  7. Junio C HamanoJan 4, 2019
  8. SZEDER GáborJan 4, 2019
  9. Carlo ArenasJan 4, 2019
  10. Junio C HamanoJan 4, 2019
  11. Jeff KingJan 3, 2019
  12. Eric SunshineJan 2, 2019
  13. Carlo ArenasJan 2, 2019
  14. SZEDER GáborJan 3, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.