commit 13fd856db99ab3fa6f99f17886f7e2742d5ba9cc (tree)
parent 1548f141e08e3e0cd04afc8eae93880ebde77ae8
Author: Tim Pope <code@tpope.net>
Date: Wed, 10 Mar 2010 19:37:49 -0500
Strip .exe from completed Git commands
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
@@ -474,7 +474,7 @@ function! s:GitComplete(A,L,P) abort
if !exists('s:exec_path')
let s:exec_path = s:sub(system(g:fugitive_git_executable.' --exec-path'),'\n$','')
endif
- let cmds = map(split(glob(s:exec_path.'/git-*'),"\n"),'v:val[strlen(s:exec_path)+5 : -1]')
+ let cmds = map(split(glob(s:exec_path.'/git-*'),"\n"),'s:sub(v:val[strlen(s:exec_path)+5 : -1],"\\.exe$","")')
if a:L =~ ' [[:alnum:]-]\+ '
return s:repo().superglob(a:A)
elseif a:A == ''