073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.233
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.233
073263
Problem:    Escaping special characters for using "%" with a shell command is
073263
	    inconsistant, parenthesis are escaped but spaces are not.
073263
Solution:   Only escape "!". (Gary Johnson)
073263
Files:	    src/ex_docmd.c
073263
073263
073263
*** ../vim-7.4.232/src/ex_docmd.c	2014-04-01 17:49:40.140891378 +0200
073263
--- src/ex_docmd.c	2014-04-01 18:26:16.036861171 +0200
073263
***************
073263
*** 4580,4604 ****
073263
  
073263
  	/* For a shell command a '!' must be escaped. */
073263
  	if ((eap->usefilter || eap->cmdidx == CMD_bang)
073263
! 			    && vim_strpbrk(repl, (char_u *)"!&;()<>") != NULL)
073263
  	{
073263
  	    char_u	*l;
073263
  
073263
! 	    l = vim_strsave_escaped(repl, (char_u *)"!&;()<>");
073263
  	    if (l != NULL)
073263
  	    {
073263
  		vim_free(repl);
073263
  		repl = l;
073263
- 		/* For a sh-like shell escape "!" another time. */
073263
- 		if (strstr((char *)p_sh, "sh") != NULL)
073263
- 		{
073263
- 		    l = vim_strsave_escaped(repl, (char_u *)"!");
073263
- 		    if (l != NULL)
073263
- 		    {
073263
- 			vim_free(repl);
073263
- 			repl = l;
073263
- 		    }
073263
- 		}
073263
  	    }
073263
  	}
073263
  
073263
--- 4580,4594 ----
073263
  
073263
  	/* For a shell command a '!' must be escaped. */
073263
  	if ((eap->usefilter || eap->cmdidx == CMD_bang)
073263
! 			    && vim_strpbrk(repl, (char_u *)"!") != NULL)
073263
  	{
073263
  	    char_u	*l;
073263
  
073263
! 	    l = vim_strsave_escaped(repl, (char_u *)"!");
073263
  	    if (l != NULL)
073263
  	    {
073263
  		vim_free(repl);
073263
  		repl = l;
073263
  	    }
073263
  	}
073263
  
073263
*** ../vim-7.4.232/src/version.c	2014-04-01 17:49:40.144891378 +0200
073263
--- src/version.c	2014-04-01 18:54:13.276838100 +0200
073263
***************
073263
*** 736,737 ****
073263
--- 736,739 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     233,
073263
  /**/
073263
073263
-- 
073263
hundred-and-one symptoms of being an internet addict:
073263
17. You turn on your intercom when leaving the room so you can hear if new
073263
    e-mail arrives.
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///