diff options
author | ache <ache@FreeBSD.org> | 1997-06-06 23:04:33 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-06-06 23:04:33 +0000 |
commit | 837346c6cf1f35402b1bd514b9a7c86d357bb4c6 (patch) | |
tree | 8b62881cf582aad3f80ed09f39f318d85ea2aca8 | |
parent | 7b2c8490f98ea95c6711548f83c8361daad2f7cf (diff) | |
download | FreeBSD-src-837346c6cf1f35402b1bd514b9a7c86d357bb4c6.zip FreeBSD-src-837346c6cf1f35402b1bd514b9a7c86d357bb4c6.tar.gz |
Now [^abc] means the same as [!abc] like bash and *csh already does
-rw-r--r-- | bin/sh/expand.c | 8 |
1 files changed, 4 insertions, 4 deletions
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++; } |