Subject: Re: bin/22846
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, jmmv@menta.net>
From: Christian Biere <christianbiere@gmx.de>
List: netbsd-bugs
Date: 10/08/2006 03:35:02
The following reply was made to PR bin/22846; it has been noted by GNATS.
From: Christian Biere <christianbiere@gmx.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/22846
Date: Sun, 8 Oct 2006 05:34:41 +0200
Christian Biere wrote:
> The following reply was made to PR bin/22846; it has been noted by GNATS.
> $ touch 'yadda[a-z]'
> $ ls yadda<tab>
> ... gains
> $ ls yadda[a-z]
The following patch should fix this i.e., adds quoting for "[]?". Maybe
there's another shell meta character that should be escaped as well.
This doesn't fix the original issue regarding non-working tab completion
though.
Index: bin/ksh/edit.c
===================================================================
RCS file: /cvsroot/src/bin/ksh/edit.c,v
retrieving revision 1.20
diff -u -r1.20 edit.c
--- bin/ksh/edit.c 14 May 2006 01:09:03 -0000 1.20
+++ bin/ksh/edit.c 8 Oct 2006 03:31:40 -0000
@@ -1072,7 +1072,7 @@
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;