summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2007-08-01 10:08:57 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2007-08-01 10:08:57 +0000
commit0cc4b12ba72bbc3c7a0d3f999caeddb9a94057e6 (patch)
tree96cc09f779283356eaf87bec88c8d94da70fd1f2
parent7c722291d4bda7e77a0fc17886ff389aec09dc40 (diff)
escape [, ], and ? as well. from cbiere@netbsd.
millert@ ok.
-rw-r--r--bin/ksh/edit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ksh/edit.c b/bin/ksh/edit.c
index 2c06c6aeef2..7033ef1d2c8 100644
--- a/bin/ksh/edit.c
+++ b/bin/ksh/edit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: edit.c,v 1.31 2005/12/11 20:31:21 otto Exp $ */
+/* $OpenBSD: edit.c,v 1.32 2007/08/01 10:08:56 fgsch Exp $ */
/*
* Command line editing - common code
@@ -841,7 +841,7 @@ x_escape(const char *s, size_t len, int (*putbuf_func) (const char *, size_t))
int rval=0;
for (add = 0, wlen = len; wlen - add > 0; add++) {
- if (strchr("\\$(){}*&;#|<>\"'`", s[add]) || strchr(ifs, s[add])) {
+ if (strchr("\\$(){}[]?*&;#|<>\"'`", s[add]) || strchr(ifs, s[add])) {
if (putbuf_func(s, add) != 0) {
rval = -1;
break;