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)
5631836975
This commit is contained in:
Jan Edmund Lazo 2021-05-08 08:18:03 -04:00
parent 6fcd96250b
commit ec04d37188
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15
2 changed files with 15 additions and 12 deletions

View File

@ -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

View File

@ -855,7 +855,7 @@ void set_init_3(void)
p_srr = (char_u *)">&";
options[idx_srr].def_val[VI_DEFAULT] = p_srr;
}
} else if ( fnamecmp(p, "sh") == 0
} else if (fnamecmp(p, "sh") == 0
|| fnamecmp(p, "ksh") == 0
|| fnamecmp(p, "mksh") == 0
|| fnamecmp(p, "pdksh") == 0
@ -863,7 +863,10 @@ void set_init_3(void)
|| 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;