Simplify tab completion
This commit is contained in:
parent
c4713200f7
commit
2b05b275f5
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user