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 6
6
" Returns a string that is safe to pass to `system` on both vim and neovim
7
7
function ! s: get_command (opts, cmd)
8
8
if g: suda #executable == # ' sudo'
9
- let ret = [ g: suda # executable ] + a: opts + [' --' ] + a: cmd
9
+ let ret = a: opts + [' --' ] + a: cmd
10
10
else
11
11
" TODO:
12
12
" Should we pass '--' before cmd when using a custom suda#executable?
13
13
" Should suda#executable be split? Should we allow suda#executable to be a list instead?
14
14
" This behavior is entirely undocumented
15
- let ret = [ g: suda # executable ] + a: cmd
15
+ let ret = a: cmd
16
16
endif
17
17
18
18
" 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 ) }), ' ' )
20
20
endfunction
21
21
22
22
" {cmd} is a argv list for the process
You can’t perform that action at this time.
0 commit comments