mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-04-14 15:19:12 +08:00
Fix Git mv options (#4353)
This commit is contained in:
parent
95e235ab43
commit
41c981e9c6
@ -38,7 +38,29 @@ function! s:on_exit(id, data, event) abort
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! git#rm#complete(ArgLead, CmdLine, CursorPos) abort
|
||||
function! s:options() abort
|
||||
return join([
|
||||
\ '-v',
|
||||
\ '-n',
|
||||
\ '-f',
|
||||
\ '-k',
|
||||
\ ], "\n")
|
||||
endfunction
|
||||
|
||||
function! s:long_options() abort
|
||||
return join([
|
||||
\ '--verbose',
|
||||
\ '--dry-run',
|
||||
\ '--force',
|
||||
\ ], "\n")
|
||||
endfunction
|
||||
|
||||
function! git#mv#complete(ArgLead, CmdLine, CursorPos) abort
|
||||
if a:ArgLead =~# '^--'
|
||||
return s:long_options()
|
||||
elseif a:ArgLead =~# '^-'
|
||||
return s:options()
|
||||
endif
|
||||
|
||||
return "%\n" . join(getcompletion(a:ArgLead, 'file'), "\n")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user