From 837346c6cf1f35402b1bd514b9a7c86d357bb4c6 Mon Sep 17 00:00:00 2001 From: ache Date: Fri, 6 Jun 1997 23:04:33 +0000 Subject: Now [^abc] means the same as [!abc] like bash and *csh already does --- bin/sh/expand.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin/sh/expand.c') diff --git a/bin/sh/expand.c b/bin/sh/expand.c index ec577fd..04c37a2 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: expand.c,v 1.17 1997/04/28 03:28:43 steve Exp $ + * $Id: expand.c,v 1.18 1997/05/19 00:18:40 steve Exp $ */ #ifndef lint @@ -1032,7 +1032,7 @@ expmeta(enddir, name) metaflag = 1; else if (*p == '[') { q = p + 1; - if (*q == '!') + if (*q == '!' || *q == '^') q++; for (;;) { if (*q == CTLESC) @@ -1267,7 +1267,7 @@ pmatch(pattern, string) char chr; endp = p; - if (*endp == '!') + if (*endp == '!' || *endp == '^') endp++; for (;;) { if (*endp == '\0') @@ -1278,7 +1278,7 @@ pmatch(pattern, string) break; } invert = 0; - if (*p == '!') { + if (*p == '!' || *p == '^') { invert++; p++; } -- cgit v1.1