From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Tobias Gruetzmacher <tobias@portfolio16.de>
Cc: zsh-workers@sunsite.dk
Subject: Re: Strange bug when completing [ in file names
Date: Thu, 20 Jan 2005 12:05:09 +0100 [thread overview]
Message-ID: <6483.1106219109@trentino.logica.co.uk> (raw)
In-Reply-To: <41EAE932.5070808@portfolio16.de>
On 16 Jan, Tobias Gruetzmacher wrote:
> I have a very strange problem when completing files in directories under
> my home directory. The problem only occours when I start the file name
> with ~ and have a [ somewhere in the file name. Some short test case:
Looks like the handling of the suffix style in _expand is seeing the `['
character and assuming that we have a glob pattern in there. But we
don't: the `[' is quoted. The following patch fixes it.
Oliver
Index: Completion/Base/Completer/_expand
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/Completer/_expand,v
retrieving revision 1.9
diff -u -r1.9 _expand
--- Completion/Base/Completer/_expand 7 Aug 2004 15:27:29 -0000 1.9
+++ Completion/Base/Completer/_expand 20 Jan 2005 11:03:32 -0000
@@ -35,7 +35,7 @@
zstyle -T ":completion:${curcontext}:" suffix &&
[[ "$word" = (\~*/*|*\$(|[=~#^+])[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]|*\$\{*\}?) &&
- "${(e)word}" != *[][^*?\(\)\<\>\{\}\|]* ]] &&
+ "${(e)word}" != *[^\\][][^*?\(\)\<\>\{\}\|]* ]] &&
return 1
zstyle -s ":completion:${curcontext}:" accept-exact tmp ||
next prev parent reply other threads:[~2005-01-20 11:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-16 22:22 Tobias Gruetzmacher
2005-01-17 4:41 ` Bart Schaefer
2005-01-17 14:44 ` Tobias Gruetzmacher
2005-01-18 0:33 ` Bart Schaefer
2005-01-20 11:05 ` Oliver Kiddle [this message]
2005-01-20 15:29 ` Bart Schaefer
2005-01-20 18:04 ` Oliver Kiddle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6483.1106219109@trentino.logica.co.uk \
--to=okiddle@yahoo.co.uk \
--cc=tobias@portfolio16.de \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).