execline: case: Subexpression matching does not work?

From: cat æscling <aescling_at_cat.family>
Date: Wed, 20 Oct 2021 23:30:12 +0000 (UTC)


When I try to run the example program in the documentation for case, the default case is executed every time:

$ cat >match
#!/bin/execlineb -S1
case -N -- $1
  "\\([fo]+\\)bar\\(baz\\)" { /usr/bin/env }

$ match foooobarbaz

I see this in the release version execline as compiled on my own, as well as in the version currently in the Void Linux repositories, which uses the release version of the software and skalibs.

As far as I can tell, matching still works correctly when *not* using subexpressions:

$ execlineb -c 'emptyenv case -N -- apple { "a.*" { /usr/bin/env } }'

Though I have hardly tested thoroughly.

I had been secretly hoping for exactly this functionality in execline for a good while now, so I would appreciate it if I could have a version of the case command that works properly!
Received on Thu Oct 21 2021 - 01:30:12 CEST

This archive was generated by hypermail 2.4.0 : Thu Oct 21 2021 - 01:32:56 CEST