mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
updated for version 7.2.417
Problem: When 'shell' has an argument with a slash then 'shellpipe' is not set properly. (Britton Kerin) Solution: Assume there are no spaces in the path, arguments follow.
This commit is contained in:
parent
0387e653c8
commit
ae61bcf0ab
23
src/option.c
23
src/option.c
@ -3696,9 +3696,32 @@ set_init_3()
|
|||||||
* Isolate the name of the shell:
|
* Isolate the name of the shell:
|
||||||
* - Skip beyond any path. E.g., "/usr/bin/csh -f" -> "csh -f".
|
* - Skip beyond any path. E.g., "/usr/bin/csh -f" -> "csh -f".
|
||||||
* - Remove any argument. E.g., "csh -f" -> "csh".
|
* - Remove any argument. E.g., "csh -f" -> "csh".
|
||||||
|
* But don't allow a space in the path, so that this works:
|
||||||
|
* "/usr/bin/csh --rcfile ~/.cshrc"
|
||||||
|
* But don't do that for Windows, it's common to have a space in the path.
|
||||||
*/
|
*/
|
||||||
|
#ifdef WIN3264
|
||||||
p = gettail(p_sh);
|
p = gettail(p_sh);
|
||||||
p = vim_strnsave(p, (int)(skiptowhite(p) - p));
|
p = vim_strnsave(p, (int)(skiptowhite(p) - p));
|
||||||
|
#else
|
||||||
|
p = skiptowhite(p_sh);
|
||||||
|
if (*p == NUL)
|
||||||
|
{
|
||||||
|
/* No white space, use the tail. */
|
||||||
|
p = vim_strsave(gettail(p_sh));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char_u *p1, *p2;
|
||||||
|
|
||||||
|
/* Find the last path separator before the space. */
|
||||||
|
p1 = p_sh;
|
||||||
|
for (p2 = p_sh; p2 < p; mb_ptr_adv(p2))
|
||||||
|
if (vim_ispathsep(*p2))
|
||||||
|
p1 = p2 + 1;
|
||||||
|
p = vim_strnsave(p1, (int)(p - p1));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (p != NULL)
|
if (p != NULL)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -681,6 +681,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 */
|
||||||
|
/**/
|
||||||
|
417,
|
||||||
/**/
|
/**/
|
||||||
416,
|
416,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user