zsh-workers
 help / color / mirror / code / Atom feed
* Another _path_files bug?
@ 2011-02-10 16:42 Bart Schaefer
  2011-02-10 17:28 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2011-02-10 16:42 UTC (permalink / raw)
  To: zsh-workers

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?

-- 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-02-13 18:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 16:42 Another _path_files bug? Bart Schaefer
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

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).