|
Karsten Hopp |
87a158 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
87a158 |
Subject: Patch 7.2.417
|
|
Karsten Hopp |
87a158 |
Fcc: outbox
|
|
Karsten Hopp |
87a158 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
87a158 |
Mime-Version: 1.0
|
|
Karsten Hopp |
87a158 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
87a158 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
87a158 |
------------
|
|
Karsten Hopp |
87a158 |
|
|
Karsten Hopp |
87a158 |
Patch 7.2.417
|
|
Karsten Hopp |
87a158 |
Problem: When 'shell' has an argument with a slash then 'shellpipe' is not
|
|
Karsten Hopp |
87a158 |
set properly. (Britton Kerin)
|
|
Karsten Hopp |
87a158 |
Solution: Assume there are no spaces in the path, arguments follow.
|
|
Karsten Hopp |
87a158 |
Files: src/option.c
|
|
Karsten Hopp |
87a158 |
|
|
Karsten Hopp |
87a158 |
|
|
Karsten Hopp |
87a158 |
*** ../vim-7.2.416/src/option.c 2010-02-24 14:34:10.000000000 +0100
|
|
Karsten Hopp |
87a158 |
--- src/option.c 2010-05-13 13:05:28.000000000 +0200
|
|
Karsten Hopp |
87a158 |
***************
|
|
Karsten Hopp |
87a158 |
*** 3696,3704 ****
|
|
Karsten Hopp |
87a158 |
--- 3696,3727 ----
|
|
Karsten Hopp |
87a158 |
* Isolate the name of the shell:
|
|
Karsten Hopp |
87a158 |
* - Skip beyond any path. E.g., "/usr/bin/csh -f" -> "csh -f".
|
|
Karsten Hopp |
87a158 |
* - Remove any argument. E.g., "csh -f" -> "csh".
|
|
Karsten Hopp |
87a158 |
+ * But don't allow a space in the path, so that this works:
|
|
Karsten Hopp |
87a158 |
+ * "/usr/bin/csh --rcfile ~/.cshrc"
|
|
Karsten Hopp |
87a158 |
+ * But don't do that for Windows, it's common to have a space in the path.
|
|
Karsten Hopp |
87a158 |
*/
|
|
Karsten Hopp |
87a158 |
+ #ifdef WIN3264
|
|
Karsten Hopp |
87a158 |
p = gettail(p_sh);
|
|
Karsten Hopp |
87a158 |
p = vim_strnsave(p, (int)(skiptowhite(p) - p));
|
|
Karsten Hopp |
87a158 |
+ #else
|
|
Karsten Hopp |
87a158 |
+ p = skiptowhite(p_sh);
|
|
Karsten Hopp |
87a158 |
+ if (*p == NUL)
|
|
Karsten Hopp |
87a158 |
+ {
|
|
Karsten Hopp |
87a158 |
+ /* No white space, use the tail. */
|
|
Karsten Hopp |
87a158 |
+ p = vim_strsave(gettail(p_sh));
|
|
Karsten Hopp |
87a158 |
+ }
|
|
Karsten Hopp |
87a158 |
+ else
|
|
Karsten Hopp |
87a158 |
+ {
|
|
Karsten Hopp |
87a158 |
+ char_u *p1, *p2;
|
|
Karsten Hopp |
87a158 |
+
|
|
Karsten Hopp |
87a158 |
+ /* Find the last path separator before the space. */
|
|
Karsten Hopp |
87a158 |
+ p1 = p_sh;
|
|
Karsten Hopp |
87a158 |
+ for (p2 = p_sh; p2 < p; mb_ptr_adv(p2))
|
|
Karsten Hopp |
87a158 |
+ if (vim_ispathsep(*p2))
|
|
Karsten Hopp |
87a158 |
+ p1 = p2 + 1;
|
|
Karsten Hopp |
87a158 |
+ p = vim_strnsave(p1, (int)(p - p1));
|
|
Karsten Hopp |
87a158 |
+ }
|
|
Karsten Hopp |
87a158 |
+ #endif
|
|
Karsten Hopp |
87a158 |
if (p != NULL)
|
|
Karsten Hopp |
87a158 |
{
|
|
Karsten Hopp |
87a158 |
/*
|
|
Karsten Hopp |
87a158 |
*** ../vim-7.2.416/src/version.c 2010-05-07 16:54:32.000000000 +0200
|
|
Karsten Hopp |
87a158 |
--- src/version.c 2010-05-13 13:11:17.000000000 +0200
|
|
Karsten Hopp |
87a158 |
***************
|
|
Karsten Hopp |
87a158 |
*** 683,684 ****
|
|
Karsten Hopp |
87a158 |
--- 683,686 ----
|
|
Karsten Hopp |
87a158 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
87a158 |
+ /**/
|
|
Karsten Hopp |
87a158 |
+ 417,
|
|
Karsten Hopp |
87a158 |
/**/
|
|
Karsten Hopp |
87a158 |
|
|
Karsten Hopp |
87a158 |
--
|
|
Karsten Hopp |
87a158 |
If you put 7 of the most talented OSS developers in a room for a week
|
|
Karsten Hopp |
87a158 |
and asked them to fix a bug in a spreadsheet program, in 1 week
|
|
Karsten Hopp |
87a158 |
you'd have 2 new mail readers and a text-based web browser.
|
|
Karsten Hopp |
87a158 |
|
|
Karsten Hopp |
87a158 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
87a158 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
87a158 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
87a158 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|