On 2015-12-26, Gary Johnson wrote:
> On 2015-12-26, Tony Mechelynck wrote:
>
> > For :!/ type (or which) return "not found" and exit with status 1 so
> > Vim tries to complete in a different manner. I'm not sure how it finds
> > its results in this case.
>
> It uses expand_shellcmd(), which appears to contain a bug in that it
> appends "*" to the end of the file name, expands that pattern to a
> list of files, then traverses that list _twice_ to build the list of
> matching files. I haven't figured out why yet.
>
> I also tried an older version of Vim, 7.3.315, and it doesn't have
> the bug.
For the record, and since I may not have any more time to look at
this for a while, here's what I've found so far. "hg bisect" says:
The first bad revision is:
changeset: 6695:6529590f6c43
tag: v7.4.672
user: Bram Moolenaar <[email protected]>
date: Sat Mar 21 17:32:19 2015 +0100
summary: updated for version 7.4.672
And "hg log -v" says about that revision:
changeset: 6695:6529590f6c43
tag: v7.4.672
user: Bram Moolenaar <[email protected]>
date: Sat Mar 21 17:32:19 2015 +0100
files: src/eval.c src/ex_getln.c src/misc1.c src/os_amiga.c
src/os_msdos.c src/os_unix.c src/os_vms.c src/proto/os_amiga.pro
src/proto/os_msdos.pro src/proto/os_unix.pro src/proto/os_win32.pro
src/version.c src/vim.h
description:
updated for version 7.4.672
Problem: When completing a shell command, directories in the current
directory are not listed.
Solution: When "." is not in $PATH also look in the current directory for
directories.
Here is the test I used to distinguish "good" from "bad" versions.
$ make
$ src/vim -N -u NONE -c 'set wildmode=list'
:!/tmp/tmp1/<Tab>
"Good" results are:
tmpA/ tmpB/ tmpC/
"Bad" results are:
tmpA/ tmpB/ tmpC/ tmpA/ tmpB/ tmpC/
The test directories were created with:
$ mkdir -p /tmp/tmp1/tmp{A..C}
Regards,
Gary
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.