From 53df837ac653f471d0b158408a1589636b3e8f7e Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 23 Mar 2021 16:28:47 -0400 Subject: [PATCH] Don't complete directories as subcommands --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 2fad56c..704135d 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2780,7 +2780,7 @@ function! s:CompletableSubcommands(dir) abort endif let cpath = s:cpath(path) if !has_key(s:path_subcommands, cpath) - let s:path_subcommands[cpath] = filter(map(s:GlobComplete(path.'/git-', '*', 1),'substitute(v:val,"\\.exe$","","")'), 'v:val !~# "--"') + let s:path_subcommands[cpath] = filter(map(s:GlobComplete(path.'/git-', '*', 1),'substitute(v:val,"\\.exe$","","")'), 'v:val !~# "--\\|/"') endif call extend(commands, s:path_subcommands[cpath]) endfor