Zsh Mailing List Archive
Messages sorted by:
Re: another file completion problem in 4.3.9-dev-2
- X-seq: zsh-workers 26920
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: another file completion problem in 4.3.9-dev-2
- Date: Sun, 03 May 2009 11:03:12 -0700
- In-reply-to: <m3ocuarupq.fsf@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <18939.51080.161444.80368@xxxxxxxxxxxxxxxxxx> <090502075455.ZM29259@xxxxxxxxxxxxxxxxxxxxxx> <m3ocuarupq.fsf@xxxxxxxxxxxxxx>
On May 3, 12:56pm, Greg Klanderman wrote:
} >>>>> Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
} > "baz" is a mismatch in at least two dimensions, both position in the
} > word (not a prefix) and case. I suspect the matcher list can adjust
} > for only one dimension at a time.
} I don't think that's true, it usually works for me, for example:
} lwm% touch FooBar FooBaz
} lwm% ls baz # <TAB> ===> FooBaz
Right, and look at this:
torch% ls baz<TAB>
torch% ls FooBaz <cursor>
The only match found is FooBaz. The condition seems to be that "baz"
matches nothing, and "Ba" matches a prefix of BarBaz, so there's no
futher attempt to find another spot where "Ba" might match -- the
mismatch of "z" vs. "r" discards BarBaz as a possible completion
unless correction is also allowed.
Completion isn't coded like a regular expression engine that will
backtrack and retry until it finds all possible substring hits -- in
fact, when presented with the choice the decision frequently was to
make completion fail quickly even if that meant missing something.
Otherwise it's too easy to get into situations where you hit TAB and
the shell just goes away for minutes at a time. Some people would
say that's already too easily perpetrated.
} Any thoughts on the other one I sent a couple weeks back, which seemed
} to have something to do with quoting of space?
I can't reproduce it using the steps that you outlined. For example,
at the point where you say --
> OK, now <Control-d> lists:
I can't list with ^D, instead it deletes the backslash character
that is under the cursor. If I invoke list-choices explicitly, the
cursor moves to the end of the line when the list is displayed, then
moves to the backslash again when I hit TAB; no "o" is inserted.
Is it possible you have some settings creeping in from /etc/z* even
when starting with zsh -f ? Or perhaps the contents of the several
directories makes a difference -- can you reproduce with empty dirs?
Messages sorted by: