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:10:03
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:09:23 +0200
This bug is actually not fixed. ksh has still problems with tab-completion
if there's a brackets '[' in the filename.
$ touch '[]'
$ ls \[<tab>
Hitting <tab> doesn't cause any completion. The same applies without a
leading backslash. Appending './' or a single-quote doesn't help either.
Further, consider the following:
$ touch 'yadda[a-z]'
$ ls yadda<tab>
... gains
$ ls yadda[a-z]
Note that the brackets are not escaped. If a file matching the pattern
exists, for example "yaddab", the completion stops at the opening bracket
and then blocks as in the first case.
This is vulnerable to a race-condition. If yaddab is created after
tab-completion but before the command is executed, the command will use
yaddab and not 'yadda[a-z]'. The same applies to '?' which is not escaped
either when using tab completion.
ksh does the right thing for '{', '}', '(', ')' and '*' but not '[', ']'
and '?'.
--
Christian