aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-08 08:18:03 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-08 08:23:44 -0400
commitec04d371882a55c370700dd73e1419cbc130c942 (patch)
tree8e3679e0c05126504b692cc94cc25f5d4e803be3
parent6fcd96250b22b82b4043afd63182e125aef1e90a (diff)
downloadrneovim-ec04d371882a55c370700dd73e1419cbc130c942.tar.gz
rneovim-ec04d371882a55c370700dd73e1419cbc130c942.tar.bz2
rneovim-ec04d371882a55c370700dd73e1419cbc130c942.zip
vim-patch:8.2.2839: default redirection missing "ash" and "dash"
Problem: Default redirection missing "ash" and "dash". Solution: Recognize "ash" and "dash". (Natanael Copa, closes vim/vim#8180) https://github.com/vim/vim/commit/56318369750066718b880afa69e7ae3843d0410b
-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;