File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 66" Returns a string that is safe to pass to `system` on both vim and neovim
77function ! s: get_command (opts, cmd)
88 if g: suda #executable == # ' sudo'
9- let ret = [ g: suda # executable ] + a: opts + [' --' ] + a: cmd
9+ let ret = a: opts + [' --' ] + a: cmd
1010 else
1111 " TODO:
1212 " Should we pass '--' before cmd when using a custom suda#executable?
1313 " Should suda#executable be split? Should we allow suda#executable to be a list instead?
1414 " This behavior is entirely undocumented
15- let ret = [ g: suda # executable ] + a: cmd
15+ let ret = a: cmd
1616 endif
1717
1818 " TODO: Should we detect `has('neovim')` and return a list to avoid a shell?
19- return join (map (ret , { k , v - > shellescape (v ) }), ' ' )
19+ return join ([ g: suda # executable ] + map (ret , { k , v - > shellescape (v ) }), ' ' )
2020endfunction
2121
2222" {cmd} is a argv list for the process
You can’t perform that action at this time.
0 commit comments