Hey Bram, Hmmm... I wasn't thinking about going down into the current directory, haha.
How about we try something like this? Basically, my idea is to match sub-dirs only if the current directory is being searched... Currently looking for a good way to test this. It's hard to find one :/ --- src/ex_getln.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/ex_getln.c b/src/ex_getln.c index 063900a38..26986cbb3 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -5193,15 +5193,26 @@ expand_shellcmd( hash_init(&found_ht); for (s = path; ; s = e) { + + // Note that we only match directories if we are searching the current + // directory. Matching sub-directories of items in the PATH is not + // helpful. if (*s == NUL) { if (did_curdir) break; - /* Find directories in the current directory, path is empty. */ + + // Find directories in the current directory, path is empty. did_curdir = TRUE; + flags |= EW_DIR; } else if (*s == '.') + { did_curdir = TRUE; + flags |= EW_DIR; + } + else + flags &= ~EW_DIR; #if defined(MSWIN) e = vim_strchr(s, ';'); -- 2.17.1 -- -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.