Skip to content

Commit

Permalink
Always execute system commands as string
Browse files Browse the repository at this point in the history
  • Loading branch information
rbong committed Sep 19, 2024
1 parent 13adc0f commit d58ee18
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions autoload/flog/shell.vim
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,12 @@ function! flog#shell#EscapeList(list) abort
return map(copy(a:list), 'flog#shell#Escape(v:val)')
endfunction

if has('nvim') || v:version > 704 || (v:version == 704 && get(v:, 'patchlevel', 0) >= 247)
function! flog#shell#Systemlist(cmd) abort
return systemlist(a:cmd)
endfunction
else
function! flog#shell#Systemlist(cmd) abort
if type(a:cmd) == v:t_list
return systemlist(join(a:cmd, ' '))
endif
return systemlist(a:cmd)
endfunction
endif
function! flog#shell#Systemlist(cmd) abort
if type(a:cmd) == v:t_list
return systemlist(join(a:cmd, ' '))
endif
return systemlist(a:cmd)
endfunction

function! flog#shell#Run(cmd) abort
let l:output = flog#shell#Systemlist(a:cmd)
Expand Down

0 comments on commit d58ee18

Please sign in to comment.