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 #8180)
This commit is contained in:
Natanael Copa
2021-05-06 18:46:35 +02:00
committed by Bram Moolenaar
parent e3e598e82b
commit 5631836975
3 changed files with 9 additions and 4 deletions

View File

@ -6606,9 +6606,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 in a file and echoed to the screen. If the 'shell' option is "csh" or
"tcsh" after initializations, the default becomes "|& tee". If the "tcsh" after initializations, the default becomes "|& tee". If the
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta", 'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta",
"bash" or "fish" the default becomes "2>&1| tee". This means that "bash", "fish", "ash" or "dash" the default becomes "2>&1| tee". This
stderr is also included. Before using the 'shell' option a path is means that stderr is also included. Before using the 'shell' option a
removed, thus "/bin/sh" uses "sh". path is removed, thus "/bin/sh" uses "sh".
The initialization of this option is done after reading the ".vimrc" The initialization of this option is done after reading the ".vimrc"
and the other initializations, so that when the 'shell' option is set and the other initializations, so that when the 'shell' option is set
there, the 'shellpipe' option changes automatically, unless it was there, the 'shellpipe' option changes automatically, unless it was

View File

@ -910,7 +910,7 @@ set_init_3(void)
} }
} }
else else
// Always use bourne shell style redirection if we reach this // Always use POSIX shell style redirection if we reach this
if ( fnamecmp(p, "sh") == 0 if ( fnamecmp(p, "sh") == 0
|| fnamecmp(p, "ksh") == 0 || fnamecmp(p, "ksh") == 0
|| fnamecmp(p, "mksh") == 0 || fnamecmp(p, "mksh") == 0
@ -919,6 +919,8 @@ set_init_3(void)
|| fnamecmp(p, "zsh-beta") == 0 || fnamecmp(p, "zsh-beta") == 0
|| fnamecmp(p, "bash") == 0 || fnamecmp(p, "bash") == 0
|| fnamecmp(p, "fish") == 0 || fnamecmp(p, "fish") == 0
|| fnamecmp(p, "ash") == 0
|| fnamecmp(p, "dash") == 0
# ifdef MSWIN # ifdef MSWIN
|| fnamecmp(p, "cmd") == 0 || fnamecmp(p, "cmd") == 0
|| fnamecmp(p, "sh.exe") == 0 || fnamecmp(p, "sh.exe") == 0
@ -929,6 +931,7 @@ set_init_3(void)
|| fnamecmp(p, "zsh-beta.exe") == 0 || fnamecmp(p, "zsh-beta.exe") == 0
|| fnamecmp(p, "bash.exe") == 0 || fnamecmp(p, "bash.exe") == 0
|| fnamecmp(p, "cmd.exe") == 0 || fnamecmp(p, "cmd.exe") == 0
|| fnamecmp(p, "dash.exe") == 0
# endif # endif
) )
{ {

View File

@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2839,
/**/ /**/
2838, 2838,
/**/ /**/