As of mksh-R59 there is a regression in glob pattern matching with '[['. Backslash-escaping of a * passed from a variable appears to be ignored.

$ mksh-R58 -c 'v=a\\*e; [[ abcde == $v ]]';echo $?
1
$ mksh-R59 -c 'v=a\\*e; [[ abcde == $v ]]';echo $?
0   <== bug

ksh93, bash, yash and zsh all behave like mksh R58 and earlier.

Testing the git repo revealed the regression was introduced by this commit:

| commit 24e61ee166cf50c7c1fcaf58d7393b2e6e557c93
| Author: tg <t...@mirbsd.org>
| Date:   Tue Apr 7 23:14:44 2020 +0000
|
|     implement full extglob pattern matching on [[ x = $y ]] RHS
|
|     eliminates some eval and brings us closer to ksh93

--
modernish -- harness the shell
https://github.com/modernish/modernish

Reply via email to