Enhance Telescope command (#588)

* Enhance Telescope command close #581

* bug fix
This commit is contained in:
Raphael
2021-03-02 16:34:29 +08:00
committed by GitHub
parent 678494e503
commit 677b44d3a0
2 changed files with 6 additions and 1 deletions

View File

@@ -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 = {}

View File

@@ -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>)