Back out fix for PR 22846 as it has issues. See PR 22846 for details.
This commit is contained in:
parent
b046beb10c
commit
b0a8c7deed
@ -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 <sys/cdefs.h>
|
||||
|
||||
#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))
|
||||
|
@ -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 <sys/cdefs.h>
|
||||
|
||||
#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 ']':
|
||||
|
Loading…
Reference in New Issue
Block a user