mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 17:30:04 +08:00
bashcomplete: can not trigger omnicomplete in some pos
Solution:improve regex.
This commit is contained in:
parent
4faf94a9fc
commit
5d56018b13
@ -7,7 +7,7 @@ let s:COP = SpaceVim#api#import('vim#compatible')
|
||||
" this is for vim command completion
|
||||
|
||||
function! s:self.complete(ArgLead, CmdLine, CursorPos) abort
|
||||
if a:CmdLine =~ '^[^ ]*$'
|
||||
if a:CmdLine =~ '^\s\{0,\}\w\+$'
|
||||
return s:COP.systemlist('compgen -c ' . a:CmdLine)
|
||||
endif
|
||||
let result = s:COP.systemlist([s:completer, a:CmdLine])
|
||||
@ -18,7 +18,7 @@ endfunction
|
||||
" this is for vim input()
|
||||
|
||||
function! s:self.complete_input(ArgLead, CmdLine, CursorPos) abort
|
||||
if a:CmdLine =~ '^[^ ]*$'
|
||||
if a:CmdLine =~ '^\s\{0,\}\w\+$'
|
||||
return s:COP.systemlist('compgen -c ' . a:CmdLine)
|
||||
endif
|
||||
let result = s:COP.systemlist([s:completer, a:CmdLine])
|
||||
|
Loading…
Reference in New Issue
Block a user