From 0cc4b12ba72bbc3c7a0d3f999caeddb9a94057e6 Mon Sep 17 00:00:00 2001 From: "Federico G. Schwindt" Date: Wed, 1 Aug 2007 10:08:57 +0000 Subject: escape [, ], and ? as well. from cbiere@netbsd. millert@ ok. --- bin/ksh/edit.c | 4 ++-- 1 file 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; -- cgit v1.2.3