I noticed when tab-completing shell commands (e.g., ":Man <TAB>" or ":!
<TAB>") that sub-directories of directories in my $PATH were included in
the results. To me this was undesirable. I can't think of why this
would be useful... please correct me if I'm wrong.
The patch below fixes this problem by making the flags used to expand
shell commands constant (so that directories are not included). Please
note that if this is included, it may be advisable to get rid of the
"flagsarg" argument to "expand_shellcmd()" as it would no longer serve
any purpose.
Also, I'm trying to submit patches properly... I think I'm doing it right
(I start at the "---") with the patch right? Still working on my email
workflow.
Thanks,
Jason Franklin
---
src/ex_getln.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 063900a38..00093d3ce 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -5170,7 +5170,7 @@ expand_shellcmd(
if (pat[i] == '\\' && pat[i + 1] == ' ')
STRMOVE(pat + i, pat + i + 1);
- flags |= EW_FILE | EW_EXEC | EW_SHELLCMD;
+ flags = EW_FILE | EW_EXEC | EW_SHELLCMD;
if (pat[0] == '.' && (vim_ispathsep(pat[1])
|| (pat[1] == '.' && vim_ispathsep(pat[2]))))
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.