diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index de389fb..916efcd 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -655,10 +655,8 @@ function! s:GitComplete(A,L,P) abort 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 == '' - return sort(cmds+keys(s:repo().aliases())) else - return filter(sort(cmds+keys(s:repo().aliases())),'v:val[0:strlen(a:A)-1] ==# a:A') + return filter(sort(cmds+keys(s:repo().aliases())), 'strpart(v:val, 0, strlen(a:A)) ==# a:A') endif endfunction