aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/options.txt6
-rw-r--r--src/nvim/option.c21
2 files changed, 15 insertions, 12 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 269080e750..2527a91cc8 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -5267,9 +5267,9 @@ A jump table for the options with a short description can be found at |Q_op|.
in a file and echoed to the screen. If the 'shell' option is "csh" or
"tcsh" after initializations, the default becomes "|& tee". If the
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta",
- "bash" or "fish" the default becomes "2>&1| tee". This means that
- stderr is also included. Before using the 'shell' option a path is
- removed, thus "/bin/sh" uses "sh".
+ "bash", "fish", "ash" or "dash" the default becomes "2>&1| tee". This
+ means that stderr is also included. Before using the 'shell' option a
+ path is removed, thus "/bin/sh" uses "sh".
The initialization of this option is done after reading the vimrc
and the other initializations, so that when the 'shell' option is set
there, the 'shellpipe' option changes automatically, unless it was
diff --git a/src/nvim/option.c b/src/nvim/option.c
index a811d749b9..6f28f37d2b 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -855,15 +855,18 @@ void set_init_3(void)
p_srr = (char_u *)">&";
options[idx_srr].def_val[VI_DEFAULT] = p_srr;
}
- } else if ( fnamecmp(p, "sh") == 0
- || fnamecmp(p, "ksh") == 0
- || fnamecmp(p, "mksh") == 0
- || fnamecmp(p, "pdksh") == 0
- || fnamecmp(p, "zsh") == 0
- || fnamecmp(p, "zsh-beta") == 0
- || fnamecmp(p, "bash") == 0
- || fnamecmp(p, "fish") == 0
- ) {
+ } else if (fnamecmp(p, "sh") == 0
+ || fnamecmp(p, "ksh") == 0
+ || fnamecmp(p, "mksh") == 0
+ || fnamecmp(p, "pdksh") == 0
+ || fnamecmp(p, "zsh") == 0
+ || fnamecmp(p, "zsh-beta") == 0
+ || fnamecmp(p, "bash") == 0
+ || fnamecmp(p, "fish") == 0
+ || fnamecmp(p, "ash") == 0
+ || fnamecmp(p, "dash") == 0
+ ) {
+ // Always use POSIX shell style redirection if we reach this
if (do_sp) {
p_sp = (char_u *)"2>&1| tee";
options[idx_sp].def_val[VI_DEFAULT] = p_sp;