From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Another _path_files bug?
Date: Thu, 10 Feb 2011 08:42:50 -0800 [thread overview]
Message-ID: <110210084252.ZM30454@torch.brasslantern.com> (raw)
I have my zsh build tree separate from my source tree. I also have a
".zsh-test/.zshrc" file that does nothing but load compsys, so that I
can easily test completion issues.
schaefer[609] ZDOTDIR=$HOME/.zsh-test Src/zsh
torch% print $ZSH_VERSION $ZSH_PATCHLEVEL
4.3.11-dev-1 1.5189
torch% ls Test
Makefile
torch% setopt completeinword
The completinword setting is necessary to cause the bug.
So now start completion:
torch% ls Test/
The "/" is bold (was auto-suffixed), so type a / so that it will remain.
Now back up so the cursor is on the "e". and complete again:
torch% ls Test//Test/Makefile
This only happens when there is only a single completion in the directory.
If the completion is ambiguous, it works correctly:
torch% touch Test/emptyfile
torch% ls Test/
emptyfile Makefile
(At this point the cursor has moved to be after the "/".)
The first significant difference seems to be at around line 740 - 760 of
_path_files where, in the completeinword case, $mid gets assigned on line
749. I think, but am not yet sure, that when $tsuf contains but does not
begin with a "/", then at line 754 (and possibly also at line 752, but
again not sure) $cpre should NOT have a trailing slash appended.
Anyone else care to have a dive at this?
--
next reply other threads:[~2011-02-10 16:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-10 16:42 Bart Schaefer [this message]
2011-02-10 17:28 ` Bart Schaefer
2011-02-11 20:39 ` Peter Stephenson
2011-02-12 22:22 ` Bart Schaefer
2011-02-12 23:03 ` Bart Schaefer
2011-02-13 17:54 ` Peter Stephenson
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=110210084252.ZM30454@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/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).