diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-03-24 02:54:50 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-04-12 01:35:49 +0200 |
commit | d6e5f94ae945308d96be414c9c1fb3f0ae71355e (patch) | |
tree | 8aaa681a84034915153b40861146c6f27993fa52 /src | |
parent | 2d72d85b23761383ac7838faed2f7b53bdce8817 (diff) | |
download | rneovim-d6e5f94ae945308d96be414c9c1fb3f0ae71355e.tar.gz rneovim-d6e5f94ae945308d96be414c9c1fb3f0ae71355e.tar.bz2 rneovim-d6e5f94ae945308d96be414c9c1fb3f0ae71355e.zip |
win: defaults: 'shellredir', 'shellxquote', 'shellxescape'
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/misc1.c | 6 | ||||
-rw-r--r-- | src/nvim/options.lua | 18 | ||||
-rw-r--r-- | src/nvim/os/shell.c | 2 |
3 files changed, 18 insertions, 8 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index 0b74b4437e..8d93505be3 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -2678,7 +2678,8 @@ void fast_breakcheck(void) } } -// Call shell. Calls os_call_shell, with 'shellxquote' added. +// os_call_shell wrapper. Handles 'verbose', :profile, and v:shell_error. +// Invalidates cached tags. int call_shell(char_u *cmd, ShellOpts opts, char_u *extra_shell_arg) { int retval; @@ -2686,8 +2687,7 @@ int call_shell(char_u *cmd, ShellOpts opts, char_u *extra_shell_arg) if (p_verbose > 3) { verbose_enter(); - smsg(_("Calling shell to execute: \"%s\""), - cmd == NULL ? p_sh : cmd); + smsg(_("Calling shell to execute: \"%s\""), cmd == NULL ? p_sh : cmd); ui_putc('\n'); verbose_leave(); } diff --git a/src/nvim/options.lua b/src/nvim/options.lua index 4ca63f2efe..774c39808f 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -2051,7 +2051,11 @@ return { secure=true, vi_def=true, varname='p_srr', - defaults={if_true={vi=">"}} + defaults={ + condition='WIN32', + if_true={vi=">%s 2>&1"}, + if_false={vi=">"} + } }, { full_name='shellslash', abbreviation='ssl', @@ -2073,7 +2077,11 @@ return { secure=true, vi_def=true, varname='p_sxq', - defaults={if_true={vi=""}} + defaults={ + condition='WIN32', + if_true={vi="("}, + if_false={vi=""} + } }, { full_name='shellxescape', abbreviation='sxe', @@ -2081,7 +2089,11 @@ return { secure=true, vi_def=true, varname='p_sxe', - defaults={if_true={vi=""}} + defaults={ + condition='WIN32', + if_true={vi='"&|<>()@^'}, + if_false={vi=""} + } }, { full_name='shiftround', abbreviation='sr', diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c index b449cc3d5a..5cc9d4b79b 100644 --- a/src/nvim/os/shell.c +++ b/src/nvim/os/shell.c @@ -124,11 +124,9 @@ int os_call_shell(char_u *cmd, ShellOpts opts, char_u *extra_args) } size_t nread; - int exitcode = do_os_system(shell_build_argv((char *)cmd, (char *)extra_args), input.data, input.len, output_ptr, &nread, emsg_silent, forward_output); - xfree(input.data); if (output) { |