* Possible file completion bug when the path contains a backslash
@ 2013-01-11 19:22 Drew Frank
2013-01-12 5:00 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Drew Frank @ 2013-01-11 19:22 UTC (permalink / raw)
To: zsh-workers
Hi zsh-workers,
Briefly, file completion is not working as expected when (1) the
file's path contains a backslash; and (2) I've run compinit. A small
test case that reproduces the problem is provided in my superuser post
(http://superuser.com/questions/531875/zsh-compinit-breaks-file-completion-when-there-is-a-backslash-in-the-path),
but I will repeat it here for convenience:
$ zsh -f
$ mkdir bad\\dir
$ touch bad\\dir/myfile
$ ls bad\\dir/[TAB]
At this point, the path is completed to "bad\\dir/myfile", which is
the behavior I expect. However:
$ autoload -U compinit
$ compinit
$ ls bad\\dir/[TAB]
After running compinit, the completion no longer works. I originally
thought this was "correct" behavior that I could change via some
setting, but someone on the IRC channel told me that they followed
these steps and could not reproduce the problem. They were using zsh
5.0.0-dev-0. I ran this example using both 5.0.2 and 4.3.10, and in
both cases completion failed after running compinit.
Any idea what's going on here? Is this, in fact, a bug?
Thanks,
Drew
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Possible file completion bug when the path contains a backslash
2013-01-11 19:22 Possible file completion bug when the path contains a backslash Drew Frank
@ 2013-01-12 5:00 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2013-01-12 5:00 UTC (permalink / raw)
To: zsh-workers
On Jan 11, 11:22am, Drew Frank wrote:
}
} $ autoload -U compinit
} $ compinit
} $ ls bad\\dir/[TAB]
}
} Any idea what's going on here? Is this, in fact, a bug?
It appears to be a bug in the (largely undocumented) compfiles builtin,
which generates a glob pattern of 'baddir*(-/)' for the directory in
question, which then does not match. Special characters other than a
backslash appear to be handled correctly, at least in a few minimal
tests I tried.
Don't have time right now to try to trace this down (and frankly don't
care to venture into that part of the code if I don't have to ...).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-12 5:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-11 19:22 Possible file completion bug when the path contains a backslash Drew Frank
2013-01-12 5:00 ` Bart Schaefer
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).