Check for built-ins with .exe extension on Windows

This commit is contained in:
Tim Pope 2019-08-08 01:44:44 -04:00
parent 0db4ceb980
commit 9d36dc2d74

View File

@ -2111,6 +2111,7 @@ function! s:GitCommand(line1, line2, range, count, bang, mods, reg, arg, args) a
endif
let alias = get(s:Aliases(dir), args[0], '!')
if alias !~# '^!\|[\"'']' && !filereadable(s:ExecPath() . '/git-' . args[0])
\ && !(has('win32') && filereadable(s:ExecPath() . '/git-' . args[0] . '.exe'))
call remove(args, 0)
call extend(args, split(alias, '\s\+'), 'keep')
endif