doc issue (because no regression… even if it works in ksh93):

19:09 < nDuff> I'm reading the following behavior as contrary to the documentation. Could someone clarify?
19:09 < nDuff> $ words_pat='*@(cat|mice)*'; [[ 'there is a {cat}' = $words_pat ]]; echo $?
19:09 < nDuff> 1
19:09 < nDuff> $ [[ 'there is a {cat}' = *@(cat|mice)* ]]; echo $?
19:09 < nDuff> 0
This commit is contained in:
tg 2014-06-06 23:50:22 +00:00
parent 224bea2d87
commit ccf991486f
1 changed files with 4 additions and 3 deletions

7
mksh.1
View File

@ -1,4 +1,4 @@
.\" $MirOS: src/bin/mksh/mksh.1,v 1.332 2014/03/07 22:47:49 tg Exp $ .\" $MirOS: src/bin/mksh/mksh.1,v 1.333 2014/06/06 23:50:22 tg Exp $
.\" $OpenBSD: ksh.1,v 1.151 2014/01/28 14:16:59 jmc Exp $ .\" $OpenBSD: ksh.1,v 1.151 2014/01/28 14:16:59 jmc Exp $
.\"- .\"-
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, .\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
@ -74,7 +74,7 @@
.\" with -mandoc, it might implement .Mx itself, but we want to .\" with -mandoc, it might implement .Mx itself, but we want to
.\" use our own definition. And .Dd must come *first*, always. .\" use our own definition. And .Dd must come *first*, always.
.\" .\"
.Dd $Mdocdate: March 7 2014 $ .Dd $Mdocdate: June 6 2014 $
.\" .\"
.\" Check which macro package we use, and do other -mdoc setup. .\" Check which macro package we use, and do other -mdoc setup.
.\" .\"
@ -964,7 +964,7 @@ The second operand of the
.Sq != .Sq !=
and and
.Sq = .Sq =
expressions are patterns (e.g. the comparison expressions are a subset of patterns (e.g. the comparison
.Ic \&[[ foobar = f*r ]] .Ic \&[[ foobar = f*r ]]
succeeds). succeeds).
This even works indirectly: This even works indirectly:
@ -976,6 +976,7 @@ $ [[ $bar = \&"$baz" ]]; echo $?
.Pp .Pp
Perhaps surprisingly, the first comparison succeeds, Perhaps surprisingly, the first comparison succeeds,
whereas the second doesn't. whereas the second doesn't.
This does not apply to all extglob metacharacters, currently.
.El .El
.El .El
.Ss Quoting .Ss Quoting