From b0a8c7deed79aa18d74dee34fa4b357b867124cb Mon Sep 17 00:00:00 2001 From: seanb Date: Tue, 24 Nov 2009 16:00:42 +0000 Subject: [PATCH] Back out fix for PR 22846 as it has issues. See PR 22846 for details. --- bin/ksh/edit.c | 6 +++--- bin/ksh/eval.c | 19 ++----------------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/bin/ksh/edit.c b/bin/ksh/edit.c index aaa62d5914ca..8c877d3c6483 100644 --- a/bin/ksh/edit.c +++ b/bin/ksh/edit.c @@ -1,4 +1,4 @@ -/* $NetBSD: edit.c,v 1.22 2009/04/25 05:11:37 lukem Exp $ */ +/* $NetBSD: edit.c,v 1.23 2009/11/24 16:00:42 seanb Exp $ */ /* * Command line editing - common code @@ -7,7 +7,7 @@ #include #ifndef lint -__RCSID("$NetBSD: edit.c,v 1.22 2009/04/25 05:11:37 lukem Exp $"); +__RCSID("$NetBSD: edit.c,v 1.23 2009/11/24 16:00:42 seanb Exp $"); #endif @@ -880,7 +880,7 @@ add_glob(str, slen) for (s = toglob; *s; s++) { if (*s == '\\' && s[1]) s++; - else if (*s == '*' || *s == '?' || *s == '$' + else if (*s == '*' || *s == '[' || *s == '?' || *s == '$' || (s[1] == '(' /*)*/ && strchr("*+?@!", *s))) break; else if (ISDIRSEP(*s)) diff --git a/bin/ksh/eval.c b/bin/ksh/eval.c index 1724d4511a08..330a2ca9abec 100644 --- a/bin/ksh/eval.c +++ b/bin/ksh/eval.c @@ -1,4 +1,4 @@ -/* $NetBSD: eval.c,v 1.11 2009/04/25 05:11:37 lukem Exp $ */ +/* $NetBSD: eval.c,v 1.12 2009/11/24 16:00:42 seanb Exp $ */ /* * Expansion - quoting, separation, substitution, globbing @@ -6,7 +6,7 @@ #include #ifndef lint -__RCSID("$NetBSD: eval.c,v 1.11 2009/04/25 05:11:37 lukem Exp $"); +__RCSID("$NetBSD: eval.c,v 1.12 2009/11/24 16:00:42 seanb Exp $"); #endif @@ -605,21 +605,6 @@ expand(cp, wp, f) if (!quote) switch (c) { case '[': - { - const char *p = sp; - bool_t special = FALSE; - while (*p != EOS) { - if (p[0] == CHAR && - p[1] == ']') { - special = TRUE; - break; - } - - p += 2; - } - if (!special) - break; - } case NOT: case '-': case ']':