zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: another file completion problem in 4.3.9-dev-2
Date: Sun, 03 May 2009 11:03:12 -0700	[thread overview]
Message-ID: <090503110312.ZM21928@torch.brasslantern.com> (raw)
In-Reply-To: <m3ocuarupq.fsf@klanderman.net>

On May 3, 12:56pm, Greg Klanderman wrote:
}
} >>>>> Bart Schaefer <schaefer@brasslantern.com> 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        
BarBaz  FooBaz
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?


      reply	other threads:[~2009-05-03 18:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-02  4:09 Greg Klanderman
2009-05-02 14:54 ` Bart Schaefer
2009-05-03 16:56   ` Greg Klanderman
2009-05-03 18:03     ` Bart Schaefer [this message]

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=090503110312.ZM21928@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).