mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
refactor: capture command output silently
This commit is contained in:
parent
c1b27ee818
commit
a86f1d2f31
@ -175,7 +175,7 @@ endfunction
|
|||||||
" Ref: https://stackoverflow.com/q/2573021/6064933 and https://unix.stackexchange.com/q/8101/221410 .
|
" Ref: https://stackoverflow.com/q/2573021/6064933 and https://unix.stackexchange.com/q/8101/221410 .
|
||||||
function! utils#CaptureCommandOutput(command) abort
|
function! utils#CaptureCommandOutput(command) abort
|
||||||
redir @m
|
redir @m
|
||||||
execute a:command
|
silent! execute a:command
|
||||||
redir END
|
redir END
|
||||||
call v:lua.vim.notify("command output captured to register m", "info", {'title': 'nvim-config'})
|
call v:lua.vim.notify("command output captured to register m", "info", {'title': 'nvim-config'})
|
||||||
"create a scratch buffer for dumping the text, ref: https://vi.stackexchange.com/a/11311/15292.
|
"create a scratch buffer for dumping the text, ref: https://vi.stackexchange.com/a/11311/15292.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user