Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Another _path_files bug?



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?

-- 



Messages sorted by: Reverse Date, Date, Thread, Author