Enhance Telescope command (#588)
* Enhance Telescope command close #581 * bug fix
This commit is contained in:
@@ -131,6 +131,11 @@ end
|
|||||||
|
|
||||||
function command.load_command(cmd,...)
|
function command.load_command(cmd,...)
|
||||||
local args = {...}
|
local args = {...}
|
||||||
|
if cmd == nil then
|
||||||
|
run_command({cmd = 'builtin'})
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local user_opts = {}
|
local user_opts = {}
|
||||||
user_opts['cmd'] = cmd
|
user_opts['cmd'] = cmd
|
||||||
user_opts.opts = {}
|
user_opts.opts = {}
|
||||||
|
|||||||
@@ -100,4 +100,4 @@ function! s:telescope_complete(arg,line,pos)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Telescope Commands with complete
|
" Telescope Commands with complete
|
||||||
command! -nargs=+ -complete=custom,s:telescope_complete Telescope lua require('telescope.command').load_command(<f-args>)
|
command! -nargs=* -complete=custom,s:telescope_complete Telescope lua require('telescope.command').load_command(<f-args>)
|
||||||
|
|||||||
Reference in New Issue
Block a user