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

Re: [PATCH] test-lib: fix non-portable pattern bracket expressions

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Feb 12, 2019, 00:30 UTC
Message-ID
<20190212003018.GA1622@szeder.dev>
In-Reply-To
<20190211234626.GA13301@sigill.intra.peff.net>
On Mon, Feb 11, 2019 at 06:46:26PM -0500, Jeff King wrote:
Show 7 quoted lines
> On Mon, Feb 11, 2019 at 08:58:03PM +0100, SZEDER Gábor wrote:
> 
> > Use a '!' character to start a non-matching pattern bracket
> > expression, as specified by POSIX in Shell Command Language section
> > 2.13.1 Patterns Matching a Single Character [1].
> 
> Just when I think I know every little gotcha in the shell,
I've already gave up on that :)
> I learn
> another one. :) Thanks for fixing this, and for digging up the POSIX
> reference.

I had to, that 16.04's dash worked, but neither dash in older LTS nor newer upstream version did was particularly puzzling. Turns out that in 0.5.8-1 Ubuntu (Debian? dunno.) started to configure dash with '--enable-fnmatch', which makes it understand '^' as well.

Previous: Jeff KingNext: Jeff King
Message 11 of 13 in “test-lib: make '--stress' more bisect-friendly”
  1. test-lib: make '--stress' more bisect-friendlySZEDER Gábor, Feb 8, 2019
  2. Jeff KingFeb 8, 2019
  3. Jeff KingFeb 8, 2019
  4. SZEDER GáborFeb 8, 2019
  5. Jeff KingFeb 8, 2019
  6. SZEDER GáborFeb 8, 2019
  7. Jeff KingFeb 8, 2019
  8. test-lib: fix non-portable pattern bracket expressionsSZEDER Gábor, Feb 11, 2019
  9. Junio C HamanoFeb 11, 2019
  10. Jeff KingFeb 11, 2019
  11. SZEDER GáborFeb 12, 2019
  12. Jeff KingFeb 12, 2019
  13. Carlo ArenasFeb 12, 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.