Strip .exe from completed Git commands

This commit is contained in:
Tim Pope
2010-03-10 19:37:49 -05:00
parent 1548f141e0
commit 13fd856db9

View File

@@ -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 == ''