Karsten Hopp 8ec412
To: vim_dev@googlegroups.com
Karsten Hopp 8ec412
Subject: Patch 7.4.191
Karsten Hopp 8ec412
Fcc: outbox
Karsten Hopp 8ec412
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 8ec412
Mime-Version: 1.0
Karsten Hopp 8ec412
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 8ec412
Content-Transfer-Encoding: 8bit
Karsten Hopp 8ec412
------------
Karsten Hopp 8ec412
Karsten Hopp 8ec412
Patch 7.4.191
Karsten Hopp 8ec412
Problem:    Escaping a file name for shell commands can't be done without a
Karsten Hopp 8ec412
            function.
Karsten Hopp 8ec412
Solution:   Add the :S file name modifier.
Karsten Hopp 8ec412
Files:      src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
Karsten Hopp 8ec412
            src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
Karsten Hopp 8ec412
            src/testdir/Make_vms.mms, src/testdir/Makefile,
Karsten Hopp 8ec412
            src/testdir/test105.in, src/testdir/test105.ok,
Karsten Hopp 8ec412
            runtime/doc/cmdline.txt, runtime/doc/eval.txt,
Karsten Hopp 8ec412
            runtime/doc/map.txt, runtime/doc/options.txt,
Karsten Hopp 8ec412
            runtime/doc/quickfix.txt, runtime/doc/usr_30.txt,
Karsten Hopp 8ec412
            runtime/doc/usr_40.txt, runtime/doc/usr_42.txt,
Karsten Hopp 8ec412
            runtime/doc/vi_diff.txt, src/eval.c, src/misc2.c, src/normal.c,
Karsten Hopp 8ec412
            src/proto/misc2.pro
Karsten Hopp 8ec412
Karsten Hopp 8ec412
Karsten Hopp 8ec412
*** ../vim-7.4.190/src/testdir/Make_amiga.mak	2014-02-05 22:25:29.974568243 +0100
Karsten Hopp 8ec412
--- src/testdir/Make_amiga.mak	2014-02-23 23:16:51.056762395 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 35,41 ****
Karsten Hopp 8ec412
  		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 8ec412
  		test94.out test95.out test96.out test97.out test98.out \
Karsten Hopp 8ec412
  		test99.out test100.out test101.out test102.out test103.out \
Karsten Hopp 8ec412
! 		test104.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  .SUFFIXES: .in .out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
--- 35,41 ----
Karsten Hopp 8ec412
  		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 8ec412
  		test94.out test95.out test96.out test97.out test98.out \
Karsten Hopp 8ec412
  		test99.out test100.out test101.out test102.out test103.out \
Karsten Hopp 8ec412
! 		test104.out test105.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  .SUFFIXES: .in .out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 156,158 ****
Karsten Hopp 8ec412
--- 156,159 ----
Karsten Hopp 8ec412
  test102.out: test102.in
Karsten Hopp 8ec412
  test103.out: test103.in
Karsten Hopp 8ec412
  test104.out: test104.in
Karsten Hopp 8ec412
+ test105.out: test105.in
Karsten Hopp 8ec412
*** ../vim-7.4.190/src/testdir/Make_dos.mak	2014-02-05 22:25:29.978568243 +0100
Karsten Hopp 8ec412
--- src/testdir/Make_dos.mak	2014-02-23 23:17:41.840762314 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 33,39 ****
Karsten Hopp 8ec412
  		test84.out test85.out test86.out test87.out test88.out \
Karsten Hopp 8ec412
  		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 8ec412
  		test94.out test95.out test96.out test98.out test99.out \
Karsten Hopp 8ec412
! 		test100.out test101.out test102.out test103.out test104.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
--- 33,40 ----
Karsten Hopp 8ec412
  		test84.out test85.out test86.out test87.out test88.out \
Karsten Hopp 8ec412
  		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 8ec412
  		test94.out test95.out test96.out test98.out test99.out \
Karsten Hopp 8ec412
! 		test100.out test101.out test102.out test103.out test104.out \
Karsten Hopp 8ec412
! 		test105.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
*** ../vim-7.4.190/src/testdir/Make_ming.mak	2014-02-05 22:25:29.978568243 +0100
Karsten Hopp 8ec412
--- src/testdir/Make_ming.mak	2014-02-23 23:17:29.400762333 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 53,59 ****
Karsten Hopp 8ec412
  		test84.out test85.out test86.out test87.out test88.out \
Karsten Hopp 8ec412
  		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 8ec412
  		test94.out test95.out test96.out test98.out test99.out \
Karsten Hopp 8ec412
! 		test100.out test101.out test102.out test103.out test104.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
--- 53,60 ----
Karsten Hopp 8ec412
  		test84.out test85.out test86.out test87.out test88.out \
Karsten Hopp 8ec412
  		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 8ec412
  		test94.out test95.out test96.out test98.out test99.out \
Karsten Hopp 8ec412
! 		test100.out test101.out test102.out test103.out test104.out \
Karsten Hopp 8ec412
! 		test105.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
*** ../vim-7.4.190/src/testdir/Make_os2.mak	2014-02-05 22:25:29.978568243 +0100
Karsten Hopp 8ec412
--- src/testdir/Make_os2.mak	2014-02-23 23:17:49.476762302 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 35,41 ****
Karsten Hopp 8ec412
  		test81.out test82.out test83.out test84.out test88.out \
Karsten Hopp 8ec412
  		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 8ec412
  		test94.out test95.out test96.out test98.out test99.out \
Karsten Hopp 8ec412
! 		test100.out test101.out test102.out test103.out test104.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  .SUFFIXES: .in .out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
--- 35,42 ----
Karsten Hopp 8ec412
  		test81.out test82.out test83.out test84.out test88.out \
Karsten Hopp 8ec412
  		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 8ec412
  		test94.out test95.out test96.out test98.out test99.out \
Karsten Hopp 8ec412
! 		test100.out test101.out test102.out test103.out test104.out \
Karsten Hopp 8ec412
! 		test105.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  .SUFFIXES: .in .out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
*** ../vim-7.4.190/src/testdir/Make_vms.mms	2014-02-05 22:25:29.978568243 +0100
Karsten Hopp 8ec412
--- src/testdir/Make_vms.mms	2014-02-23 23:17:56.596762290 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 4,10 ****
Karsten Hopp 8ec412
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
Karsten Hopp 8ec412
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
Karsten Hopp 8ec412
  #
Karsten Hopp 8ec412
! # Last change:  2013 Nov 21
Karsten Hopp 8ec412
  #
Karsten Hopp 8ec412
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
Karsten Hopp 8ec412
  # Edit the lines in the Configuration section below to select.
Karsten Hopp 8ec412
--- 4,10 ----
Karsten Hopp 8ec412
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
Karsten Hopp 8ec412
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
Karsten Hopp 8ec412
  #
Karsten Hopp 8ec412
! # Last change:  2014 Feb 23
Karsten Hopp 8ec412
  #
Karsten Hopp 8ec412
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
Karsten Hopp 8ec412
  # Edit the lines in the Configuration section below to select.
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 79,85 ****
Karsten Hopp 8ec412
  	 test82.out test83.out test84.out test88.out test89.out \
Karsten Hopp 8ec412
  	 test90.out test91.out test92.out test93.out test94.out \
Karsten Hopp 8ec412
  	 test95.out test96.out test97.out test98.out test99.out \
Karsten Hopp 8ec412
! 	 test100.out test101.out test102.out test103.out test104.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  # Known problems:
Karsten Hopp 8ec412
  # Test 30: a problem around mac format - unknown reason
Karsten Hopp 8ec412
--- 79,86 ----
Karsten Hopp 8ec412
  	 test82.out test83.out test84.out test88.out test89.out \
Karsten Hopp 8ec412
  	 test90.out test91.out test92.out test93.out test94.out \
Karsten Hopp 8ec412
  	 test95.out test96.out test97.out test98.out test99.out \
Karsten Hopp 8ec412
! 	 test100.out test101.out test102.out test103.out test104.out \
Karsten Hopp 8ec412
! 	 test105.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  # Known problems:
Karsten Hopp 8ec412
  # Test 30: a problem around mac format - unknown reason
Karsten Hopp 8ec412
*** ../vim-7.4.190/src/testdir/Makefile	2014-02-05 22:25:29.982568243 +0100
Karsten Hopp 8ec412
--- src/testdir/Makefile	2014-02-23 23:18:14.040762262 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 31,37 ****
Karsten Hopp 8ec412
  		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 8ec412
  		test94.out test95.out test96.out test97.out test98.out \
Karsten Hopp 8ec412
  		test99.out test100.out test101.out test102.out test103.out \
Karsten Hopp 8ec412
! 		test104.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  SCRIPTS_GUI = test16.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
--- 31,37 ----
Karsten Hopp 8ec412
  		test89.out test90.out test91.out test92.out test93.out \
Karsten Hopp 8ec412
  		test94.out test95.out test96.out test97.out test98.out \
Karsten Hopp 8ec412
  		test99.out test100.out test101.out test102.out test103.out \
Karsten Hopp 8ec412
! 		test104.out test105.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  SCRIPTS_GUI = test16.out
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
*** ../vim-7.4.190/src/testdir/test105.in	2014-02-23 23:35:40.680760596 +0100
Karsten Hopp 8ec412
--- src/testdir/test105.in	2014-02-23 23:30:24.748761099 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 0 ****
Karsten Hopp 8ec412
--- 1,45 ----
Karsten Hopp 8ec412
+ Test filename modifiers     vim: set ft=vim :
Karsten Hopp 8ec412
+ 
Karsten Hopp 8ec412
+ STARTTEST
Karsten Hopp 8ec412
+ :source small.vim
Karsten Hopp 8ec412
+ :%delete _
Karsten Hopp 8ec412
+ :set shell=sh
Karsten Hopp 8ec412
+ :set shellslash
Karsten Hopp 8ec412
+ :let tab="\t"
Karsten Hopp 8ec412
+ :command -nargs=1 Put :let expr=<q-args> | $put =expr.tab.strtrans(string(eval(expr)))
Karsten Hopp 8ec412
+ :let $HOME=fnamemodify('.', ':p:h:h:h')
Karsten Hopp 8ec412
+ :Put fnamemodify('.',              ':p'      )[-1:]
Karsten Hopp 8ec412
+ :Put fnamemodify('.',              ':p:h'    )[-1:]
Karsten Hopp 8ec412
+ :Put fnamemodify('test.out',       ':p'      )[-1:]
Karsten Hopp 8ec412
+ :Put fnamemodify('test.out',       ':.'      )
Karsten Hopp 8ec412
+ :Put fnamemodify('../testdir/a',   ':.'      )
Karsten Hopp 8ec412
+ :Put fnamemodify('test.out',       ':~'      )
Karsten Hopp 8ec412
+ :Put fnamemodify('../testdir/a',   ':~'      )
Karsten Hopp 8ec412
+ :Put fnamemodify('../testdir/a',   ':t'      )
Karsten Hopp 8ec412
+ :Put fnamemodify('.',              ':p:t'    )
Karsten Hopp 8ec412
+ :Put fnamemodify('test.out',       ':p:t'    )
Karsten Hopp 8ec412
+ :Put fnamemodify('test.out',       ':p:e'    )
Karsten Hopp 8ec412
+ :Put fnamemodify('test.out',       ':p:t:e'  )
Karsten Hopp 8ec412
+ :Put fnamemodify('abc.fb2.tar.gz', ':r'      )
Karsten Hopp 8ec412
+ :Put fnamemodify('abc.fb2.tar.gz', ':r:r'    )
Karsten Hopp 8ec412
+ :Put fnamemodify('abc.fb2.tar.gz', ':r:r:r'  )
Karsten Hopp 8ec412
+ :Put substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(src/testdir/.*\)', '\1', '')
Karsten Hopp 8ec412
+ :Put fnamemodify('abc.fb2.tar.gz', ':e'      )
Karsten Hopp 8ec412
+ :Put fnamemodify('abc.fb2.tar.gz', ':e:e'    )
Karsten Hopp 8ec412
+ :Put fnamemodify('abc.fb2.tar.gz', ':e:e:e'  )
Karsten Hopp 8ec412
+ :Put fnamemodify('abc.fb2.tar.gz', ':e:e:e:e')
Karsten Hopp 8ec412
+ :Put fnamemodify('abc.fb2.tar.gz', ':e:e:r'  )
Karsten Hopp 8ec412
+ :Put fnamemodify('abc def',        ':S'      )
Karsten Hopp 8ec412
+ :Put fnamemodify('abc" "def',      ':S'      )
Karsten Hopp 8ec412
+ :Put fnamemodify('abc"%"def',      ':S'      )
Karsten Hopp 8ec412
+ :Put fnamemodify('abc'' ''def',    ':S'      )
Karsten Hopp 8ec412
+ :Put fnamemodify('abc''%''def',    ':S'      )
Karsten Hopp 8ec412
+ :Put fnamemodify("abc\ndef",       ':S'      )
Karsten Hopp 8ec412
+ :set shell=tcsh
Karsten Hopp 8ec412
+ :Put fnamemodify("abc\ndef",       ':S'      )
Karsten Hopp 8ec412
+ :$put ='vim: ts=8'
Karsten Hopp 8ec412
+ :1 delete _
Karsten Hopp 8ec412
+ :w! test.out
Karsten Hopp 8ec412
+ :qa!
Karsten Hopp 8ec412
+ ENDTEST
Karsten Hopp 8ec412
+ 
Karsten Hopp 8ec412
*** ../vim-7.4.190/src/testdir/test105.ok	2014-02-23 23:35:40.688760596 +0100
Karsten Hopp 8ec412
--- src/testdir/test105.ok	2014-02-23 23:32:11.204760929 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 0 ****
Karsten Hopp 8ec412
--- 1,29 ----
Karsten Hopp 8ec412
+ fnamemodify('.',              ':p'      )[-1:]	'/'
Karsten Hopp 8ec412
+ fnamemodify('.',              ':p:h'    )[-1:]	'r'
Karsten Hopp 8ec412
+ fnamemodify('test.out',       ':p'      )[-1:]	't'
Karsten Hopp 8ec412
+ fnamemodify('test.out',       ':.'      )	'test.out'
Karsten Hopp 8ec412
+ fnamemodify('../testdir/a',   ':.'      )	'a'
Karsten Hopp 8ec412
+ fnamemodify('test.out',       ':~'      )	'~/src/testdir/test.out'
Karsten Hopp 8ec412
+ fnamemodify('../testdir/a',   ':~'      )	'~/src/testdir/a'
Karsten Hopp 8ec412
+ fnamemodify('../testdir/a',   ':t'      )	'a'
Karsten Hopp 8ec412
+ fnamemodify('.',              ':p:t'    )	''
Karsten Hopp 8ec412
+ fnamemodify('test.out',       ':p:t'    )	'test.out'
Karsten Hopp 8ec412
+ fnamemodify('test.out',       ':p:e'    )	'out'
Karsten Hopp 8ec412
+ fnamemodify('test.out',       ':p:t:e'  )	'out'
Karsten Hopp 8ec412
+ fnamemodify('abc.fb2.tar.gz', ':r'      )	'abc.fb2.tar'
Karsten Hopp 8ec412
+ fnamemodify('abc.fb2.tar.gz', ':r:r'    )	'abc.fb2'
Karsten Hopp 8ec412
+ fnamemodify('abc.fb2.tar.gz', ':r:r:r'  )	'abc'
Karsten Hopp 8ec412
+ substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(src/testdir/.*\)', '\1', '')	'src/testdir/abc.fb2'
Karsten Hopp 8ec412
+ fnamemodify('abc.fb2.tar.gz', ':e'      )	'gz'
Karsten Hopp 8ec412
+ fnamemodify('abc.fb2.tar.gz', ':e:e'    )	'tar.gz'
Karsten Hopp 8ec412
+ fnamemodify('abc.fb2.tar.gz', ':e:e:e'  )	'fb2.tar.gz'
Karsten Hopp 8ec412
+ fnamemodify('abc.fb2.tar.gz', ':e:e:e:e')	'fb2.tar.gz'
Karsten Hopp 8ec412
+ fnamemodify('abc.fb2.tar.gz', ':e:e:r'  )	'tar'
Karsten Hopp 8ec412
+ fnamemodify('abc def',        ':S'      )	'''abc def'''
Karsten Hopp 8ec412
+ fnamemodify('abc" "def',      ':S'      )	'''abc" "def'''
Karsten Hopp 8ec412
+ fnamemodify('abc"%"def',      ':S'      )	'''abc"%"def'''
Karsten Hopp 8ec412
+ fnamemodify('abc'' ''def',    ':S'      )	'''abc''\'''' ''\''''def'''
Karsten Hopp 8ec412
+ fnamemodify('abc''%''def',    ':S'      )	'''abc''\''''%''\''''def'''
Karsten Hopp 8ec412
+ fnamemodify("abc\ndef",       ':S'      )	'''abc^@def'''
Karsten Hopp 8ec412
+ fnamemodify("abc\ndef",       ':S'      )	'''abc\^@def'''
Karsten Hopp 8ec412
+ vim: ts=8
Karsten Hopp 8ec412
*** ../vim-7.4.190/runtime/doc/cmdline.txt	2013-11-09 05:30:18.000000000 +0100
Karsten Hopp 8ec412
--- runtime/doc/cmdline.txt	2014-02-23 23:20:57.020762003 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 758,763 ****
Karsten Hopp 8ec412
--- 758,764 ----
Karsten Hopp 8ec412
  function expand() |expand()|.
Karsten Hopp 8ec412
  	%	Is replaced with the current file name.		  *:_%* *c_%*
Karsten Hopp 8ec412
  	#	Is replaced with the alternate file name.	  *:_#* *c_#*
Karsten Hopp 8ec412
+ 		This is remembered for every window.
Karsten Hopp 8ec412
  	#n	(where n is a number) is replaced with		  *:_#0* *:_#n*
Karsten Hopp 8ec412
  		the file name of buffer n.  "#0" is the same as "#".     *c_#n*
Karsten Hopp 8ec412
  	##	Is replaced with all names in the argument list	  *:_##* *c_##*
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 823,830 ****
Karsten Hopp 8ec412
  		   the start of the function.
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  							 *filename-modifiers*
Karsten Hopp 8ec412
! 	 *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs*
Karsten Hopp 8ec412
! 	        *%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs*
Karsten Hopp 8ec412
  The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<sfile>",
Karsten Hopp 8ec412
  "<afile>" or "<abuf>".  They are also used with the |fnamemodify()| function.
Karsten Hopp 8ec412
  These are not available when Vim has been compiled without the |+modify_fname|
Karsten Hopp 8ec412
--- 824,831 ----
Karsten Hopp 8ec412
  		   the start of the function.
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  							 *filename-modifiers*
Karsten Hopp 8ec412
! *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*
Karsten Hopp 8ec412
!      *%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs* *%:S*
Karsten Hopp 8ec412
  The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<sfile>",
Karsten Hopp 8ec412
  "<afile>" or "<abuf>".  They are also used with the |fnamemodify()| function.
Karsten Hopp 8ec412
  These are not available when Vim has been compiled without the |+modify_fname|
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 879,884 ****
Karsten Hopp 8ec412
--- 880,889 ----
Karsten Hopp 8ec412
  	:gs?pat?sub?
Karsten Hopp 8ec412
  		Substitute all occurrences of "pat" with "sub".  Otherwise
Karsten Hopp 8ec412
  		this works like ":s".
Karsten Hopp 8ec412
+ 	:S	Escape special characters for use with a shell command (see 
Karsten Hopp 8ec412
+ 		|shellescape()|). Must be the last one. Examples: >
Karsten Hopp 8ec412
+ 		    :!dir <cfile>:S
Karsten Hopp 8ec412
+ 		    :call system('chmod +w -- ' . expand('%:S'))
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  Examples, when the file name is "src/version.c", current dir
Karsten Hopp 8ec412
  "/home/mool/vim": >
Karsten Hopp 8ec412
*** ../vim-7.4.190/runtime/doc/eval.txt	2014-01-14 12:33:32.000000000 +0100
Karsten Hopp 8ec412
--- runtime/doc/eval.txt	2014-02-23 23:19:32.420762138 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 5414,5419 ****
Karsten Hopp 8ec412
--- 5428,5434 ----
Karsten Hopp 8ec412
  <		This results in a directory listing for the file under the
Karsten Hopp 8ec412
  		cursor.  Example of use with |system()|: >
Karsten Hopp 8ec412
  		    :call system("chmod +w -- " . shellescape(expand("%")))
Karsten Hopp 8ec412
+ <		See also |::S|.
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  shiftwidth()						*shiftwidth()*
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 5896,5909 ****
Karsten Hopp 8ec412
  		passed as stdin to the command.  The string is written as-is,
Karsten Hopp 8ec412
  		you need to take care of using the correct line separators
Karsten Hopp 8ec412
  		yourself.  Pipes are not used.
Karsten Hopp 8ec412
! 		Note: Use |shellescape()| to escape special characters in a
Karsten Hopp 8ec412
! 		command argument.  Newlines in {expr} may cause the command to
Karsten Hopp 8ec412
! 		fail.  The characters in 'shellquote' and 'shellxquote' may
Karsten Hopp 8ec412
! 		also cause trouble.
Karsten Hopp 8ec412
  		This is not to be used for interactive commands.
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  		The result is a String.  Example: >
Karsten Hopp 8ec412
  		    :let files = system("ls " .  shellescape(expand('%:h')))
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  <		To make the result more system-independent, the shell output
Karsten Hopp 8ec412
  		is filtered to replace <CR> with <NL> for Macintosh, and
Karsten Hopp 8ec412
--- 5911,5926 ----
Karsten Hopp 8ec412
  		passed as stdin to the command.  The string is written as-is,
Karsten Hopp 8ec412
  		you need to take care of using the correct line separators
Karsten Hopp 8ec412
  		yourself.  Pipes are not used.
Karsten Hopp 8ec412
! 		Note: Use |shellescape()| or |::S| with |expand()| or 
Karsten Hopp 8ec412
! 		|fnamemodify()| to escape special characters in a command 
Karsten Hopp 8ec412
! 		argument.  Newlines in {expr} may cause the command to fail.  
Karsten Hopp 8ec412
! 		The characters in 'shellquote' and 'shellxquote' may also 
Karsten Hopp 8ec412
! 		cause trouble.
Karsten Hopp 8ec412
  		This is not to be used for interactive commands.
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  		The result is a String.  Example: >
Karsten Hopp 8ec412
  		    :let files = system("ls " .  shellescape(expand('%:h')))
Karsten Hopp 8ec412
+ 		    :let files = system('ls ' . expand('%:h:S'))
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  <		To make the result more system-independent, the shell output
Karsten Hopp 8ec412
  		is filtered to replace <CR> with <NL> for Macintosh, and
Karsten Hopp 8ec412
*** ../vim-7.4.190/runtime/doc/map.txt	2013-08-10 13:24:56.000000000 +0200
Karsten Hopp 8ec412
--- runtime/doc/map.txt	2014-02-23 23:19:32.424762138 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 380,386 ****
Karsten Hopp 8ec412
     The simplest way to load a set of related language mappings is by using the
Karsten Hopp 8ec412
  'keymap' option.  See |45.5|.
Karsten Hopp 8ec412
     In Insert mode and in Command-line mode the mappings can be disabled with
Karsten Hopp 8ec412
! the CTRL-^ command |i_CTRL-^| |c_CTRL-^| These commands change the value of
Karsten Hopp 8ec412
  the 'iminsert' option.  When starting to enter a normal command line (not a
Karsten Hopp 8ec412
  search pattern) the mappings are disabled until a CTRL-^ is typed.  The state
Karsten Hopp 8ec412
  last used is remembered for Insert mode and Search patterns separately.  The
Karsten Hopp 8ec412
--- 380,386 ----
Karsten Hopp 8ec412
     The simplest way to load a set of related language mappings is by using the
Karsten Hopp 8ec412
  'keymap' option.  See |45.5|.
Karsten Hopp 8ec412
     In Insert mode and in Command-line mode the mappings can be disabled with
Karsten Hopp 8ec412
! the CTRL-^ command |i_CTRL-^| |c_CTRL-^|. These commands change the value of
Karsten Hopp 8ec412
  the 'iminsert' option.  When starting to enter a normal command line (not a
Karsten Hopp 8ec412
  search pattern) the mappings are disabled until a CTRL-^ is typed.  The state
Karsten Hopp 8ec412
  last used is remembered for Insert mode and Search patterns separately.  The
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 593,599 ****
Karsten Hopp 8ec412
  When you have a mapping that contains an Ex command, you need to put a line
Karsten Hopp 8ec412
  terminator after it to have it executed.  The use of <CR> is recommended for
Karsten Hopp 8ec412
  this (see |<>|).  Example: >
Karsten Hopp 8ec412
!    :map  _ls  :!ls -l %<CR>:echo "the end"<CR>
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  To avoid mapping of the characters you type in insert or Command-line mode,
Karsten Hopp 8ec412
  type a CTRL-V first.  The mapping in Insert mode is disabled if the 'paste'
Karsten Hopp 8ec412
--- 593,599 ----
Karsten Hopp 8ec412
  When you have a mapping that contains an Ex command, you need to put a line
Karsten Hopp 8ec412
  terminator after it to have it executed.  The use of <CR> is recommended for
Karsten Hopp 8ec412
  this (see |<>|).  Example: >
Karsten Hopp 8ec412
!    :map  _ls  :!ls -l %:S<CR>:echo "the end"<CR>
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  To avoid mapping of the characters you type in insert or Command-line mode,
Karsten Hopp 8ec412
  type a CTRL-V first.  The mapping in Insert mode is disabled if the 'paste'
Karsten Hopp 8ec412
*** ../vim-7.4.190/runtime/doc/options.txt	2013-11-12 04:43:57.000000000 +0100
Karsten Hopp 8ec412
--- runtime/doc/options.txt	2014-02-23 23:19:32.428762138 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 4757,4764 ****
Karsten Hopp 8ec412
  			global or local to buffer |global-local|
Karsten Hopp 8ec412
  			{not in Vi}
Karsten Hopp 8ec412
  	Program to use for the ":make" command.  See |:make_makeprg|.
Karsten Hopp 8ec412
! 	This option may contain '%' and '#' characters, which are expanded to
Karsten Hopp 8ec412
! 	the current and alternate file name. |:_%| |:_#|
Karsten Hopp 8ec412
  	Environment variables are expanded |:set_env|.  See |option-backslash|
Karsten Hopp 8ec412
  	about including spaces and backslashes.
Karsten Hopp 8ec412
  	Note that a '|' must be escaped twice: once for ":set" and once for
Karsten Hopp 8ec412
--- 4757,4765 ----
Karsten Hopp 8ec412
  			global or local to buffer |global-local|
Karsten Hopp 8ec412
  			{not in Vi}
Karsten Hopp 8ec412
  	Program to use for the ":make" command.  See |:make_makeprg|.
Karsten Hopp 8ec412
! 	This option may contain '%' and '#' characters (see  |:_%| and |:_#|), 
Karsten Hopp 8ec412
! 	which are expanded to the current and alternate file name.  Use |::S| 
Karsten Hopp 8ec412
! 	to escape file names in case they contain special characters.
Karsten Hopp 8ec412
  	Environment variables are expanded |:set_env|.  See |option-backslash|
Karsten Hopp 8ec412
  	about including spaces and backslashes.
Karsten Hopp 8ec412
  	Note that a '|' must be escaped twice: once for ":set" and once for
Karsten Hopp 8ec412
*** ../vim-7.4.190/runtime/doc/quickfix.txt	2013-08-10 13:25:00.000000000 +0200
Karsten Hopp 8ec412
--- runtime/doc/quickfix.txt	2014-02-23 23:19:32.432762138 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 838,844 ****
Karsten Hopp 8ec412
  The alltests.py script seems to be used quite often, that's all.
Karsten Hopp 8ec412
  Useful values for the 'makeprg' options therefore are:
Karsten Hopp 8ec412
   setlocal makeprg=./alltests.py " Run a testsuite
Karsten Hopp 8ec412
!  setlocal makeprg=python %      " Run a single testcase
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  Also see http://vim.sourceforge.net/tip_view.php?tip_id=280.
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
--- 838,844 ----
Karsten Hopp 8ec412
  The alltests.py script seems to be used quite often, that's all.
Karsten Hopp 8ec412
  Useful values for the 'makeprg' options therefore are:
Karsten Hopp 8ec412
   setlocal makeprg=./alltests.py " Run a testsuite
Karsten Hopp 8ec412
!  setlocal makeprg=python\ %:S   " Run a single testcase
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  Also see http://vim.sourceforge.net/tip_view.php?tip_id=280.
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 1332,1338 ****
Karsten Hopp 8ec412
  Here is an alternative from Michael F. Lamb for Unix that filters the errors
Karsten Hopp 8ec412
  first: >
Karsten Hopp 8ec412
    :setl errorformat=%Z%f:%l:\ %m,%A%p^,%-G%*[^sl]%.%#
Karsten Hopp 8ec412
!   :setl makeprg=javac\ %\ 2>&1\ \\\|\ vim-javac-filter
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  You need to put the following in "vim-javac-filter" somewhere in your path
Karsten Hopp 8ec412
  (e.g., in ~/bin) and make it executable: >
Karsten Hopp 8ec412
--- 1332,1338 ----
Karsten Hopp 8ec412
  Here is an alternative from Michael F. Lamb for Unix that filters the errors
Karsten Hopp 8ec412
  first: >
Karsten Hopp 8ec412
    :setl errorformat=%Z%f:%l:\ %m,%A%p^,%-G%*[^sl]%.%#
Karsten Hopp 8ec412
!   :setl makeprg=javac\ %:S\ 2>&1\ \\\|\ vim-javac-filter
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  You need to put the following in "vim-javac-filter" somewhere in your path
Karsten Hopp 8ec412
  (e.g., in ~/bin) and make it executable: >
Karsten Hopp 8ec412
*** ../vim-7.4.190/runtime/doc/usr_30.txt	2013-08-10 13:25:05.000000000 +0200
Karsten Hopp 8ec412
--- runtime/doc/usr_30.txt	2014-02-23 23:19:32.432762138 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 128,134 ****
Karsten Hopp 8ec412
  You can include special Vim keywords in the command specification.  The %
Karsten Hopp 8ec412
  character expands to the name of the current file.  So if you execute the
Karsten Hopp 8ec412
  command: >
Karsten Hopp 8ec412
! 	:set makeprg=make\ %
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  When you are editing main.c, then ":make" executes the following command: >
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
--- 128,134 ----
Karsten Hopp 8ec412
  You can include special Vim keywords in the command specification.  The %
Karsten Hopp 8ec412
  character expands to the name of the current file.  So if you execute the
Karsten Hopp 8ec412
  command: >
Karsten Hopp 8ec412
! 	:set makeprg=make\ %:S
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  When you are editing main.c, then ":make" executes the following command: >
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 137,143 ****
Karsten Hopp 8ec412
  This is not too useful, so you will refine the command a little and use the :r
Karsten Hopp 8ec412
  (root) modifier: >
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
! 	:set makeprg=make\ %:r.o
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  Now the command executed is as follows: >
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
--- 137,143 ----
Karsten Hopp 8ec412
  This is not too useful, so you will refine the command a little and use the :r
Karsten Hopp 8ec412
  (root) modifier: >
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
! 	:set makeprg=make\ %:r:S.o
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  Now the command executed is as follows: >
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
*** ../vim-7.4.190/runtime/doc/usr_40.txt	2013-08-10 13:25:05.000000000 +0200
Karsten Hopp 8ec412
--- runtime/doc/usr_40.txt	2014-02-23 23:19:32.432762138 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 209,215 ****
Karsten Hopp 8ec412
  separates the two commands.  This also means that a | character can't be used
Karsten Hopp 8ec412
  inside a map command.  To include one, use <Bar> (five characters).  Example:
Karsten Hopp 8ec412
  >
Karsten Hopp 8ec412
! 	:map <F8> :write <Bar> !checkin %<CR>
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  The same problem applies to the ":unmap" command, with the addition that you
Karsten Hopp 8ec412
  have to watch out for trailing white space.  These two commands are different:
Karsten Hopp 8ec412
--- 209,215 ----
Karsten Hopp 8ec412
  separates the two commands.  This also means that a | character can't be used
Karsten Hopp 8ec412
  inside a map command.  To include one, use <Bar> (five characters).  Example:
Karsten Hopp 8ec412
  >
Karsten Hopp 8ec412
! 	:map <F8> :write <Bar> !checkin %:S<CR>
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  The same problem applies to the ":unmap" command, with the addition that you
Karsten Hopp 8ec412
  have to watch out for trailing white space.  These two commands are different:
Karsten Hopp 8ec412
*** ../vim-7.4.190/runtime/doc/usr_42.txt	2013-08-10 13:25:05.000000000 +0200
Karsten Hopp 8ec412
--- runtime/doc/usr_42.txt	2014-02-23 23:19:32.432762138 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 311,317 ****
Karsten Hopp 8ec412
  item with a bitmap.  For example, define a new toolbar item with: >
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  	:tmenu ToolBar.Compile  Compile the current file
Karsten Hopp 8ec412
! 	:amenu ToolBar.Compile  :!cc % -o %:r<CR>
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  Now you need to create the icon.  For MS-Windows it must be in bitmap format,
Karsten Hopp 8ec412
  with the name "Compile.bmp".  For Unix XPM format is used, the file name is
Karsten Hopp 8ec412
--- 311,317 ----
Karsten Hopp 8ec412
  item with a bitmap.  For example, define a new toolbar item with: >
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  	:tmenu ToolBar.Compile  Compile the current file
Karsten Hopp 8ec412
! 	:amenu ToolBar.Compile  :!cc %:S -o %:r:S<CR>
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  Now you need to create the icon.  For MS-Windows it must be in bitmap format,
Karsten Hopp 8ec412
  with the name "Compile.bmp".  For Unix XPM format is used, the file name is
Karsten Hopp 8ec412
*** ../vim-7.4.190/runtime/doc/vi_diff.txt	2013-08-10 13:25:07.000000000 +0200
Karsten Hopp 8ec412
--- runtime/doc/vi_diff.txt	2014-02-23 23:19:32.432762138 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 540,546 ****
Karsten Hopp 8ec412
  Added :wnext command.  Same as ":write" followed by ":next".
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  The ":w!" command always writes, also when the file is write protected.  In Vi
Karsten Hopp 8ec412
! you would have to do ":!chmod +w %" and ":set noro".
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  When 'tildeop' has been set, "~" is an operator (must be followed by a
Karsten Hopp 8ec412
  movement command).
Karsten Hopp 8ec412
--- 540,546 ----
Karsten Hopp 8ec412
  Added :wnext command.  Same as ":write" followed by ":next".
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  The ":w!" command always writes, also when the file is write protected.  In Vi
Karsten Hopp 8ec412
! you would have to do ":!chmod +w %:S" and ":set noro".
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
  When 'tildeop' has been set, "~" is an operator (must be followed by a
Karsten Hopp 8ec412
  movement command).
Karsten Hopp 8ec412
*** ../vim-7.4.190/src/eval.c	2014-02-23 22:54:54.724764490 +0100
Karsten Hopp 8ec412
--- src/eval.c	2014-02-23 23:19:32.432762138 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 16950,16956 ****
Karsten Hopp 8ec412
      typval_T	*rettv;
Karsten Hopp 8ec412
  {
Karsten Hopp 8ec412
      rettv->vval.v_string = vim_strsave_shellescape(
Karsten Hopp 8ec412
! 		       get_tv_string(&argvars[0]), non_zero_arg(&argvars[1]));
Karsten Hopp 8ec412
      rettv->v_type = VAR_STRING;
Karsten Hopp 8ec412
  }
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
--- 16950,16956 ----
Karsten Hopp 8ec412
      typval_T	*rettv;
Karsten Hopp 8ec412
  {
Karsten Hopp 8ec412
      rettv->vval.v_string = vim_strsave_shellescape(
Karsten Hopp 8ec412
! 		get_tv_string(&argvars[0]), non_zero_arg(&argvars[1]), TRUE);
Karsten Hopp 8ec412
      rettv->v_type = VAR_STRING;
Karsten Hopp 8ec412
  }
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 24355,24360 ****
Karsten Hopp 8ec412
--- 24355,24371 ----
Karsten Hopp 8ec412
  	}
Karsten Hopp 8ec412
      }
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
+     if (src[*usedlen] == ':' && src[*usedlen + 1] == 'S')
Karsten Hopp 8ec412
+     {
Karsten Hopp 8ec412
+ 	p = vim_strsave_shellescape(*fnamep, FALSE, FALSE);
Karsten Hopp 8ec412
+ 	if (p == NULL)
Karsten Hopp 8ec412
+ 	    return -1;
Karsten Hopp 8ec412
+ 	vim_free(*bufp);
Karsten Hopp 8ec412
+ 	*bufp = *fnamep = p;
Karsten Hopp 8ec412
+ 	*fnamelen = (int)STRLEN(p);
Karsten Hopp 8ec412
+ 	*usedlen += 2;
Karsten Hopp 8ec412
+     }
Karsten Hopp 8ec412
+ 
Karsten Hopp 8ec412
      return valid;
Karsten Hopp 8ec412
  }
Karsten Hopp 8ec412
  
Karsten Hopp 8ec412
*** ../vim-7.4.190/src/misc2.c	2014-01-06 06:18:44.000000000 +0100
Karsten Hopp 8ec412
--- src/misc2.c	2014-02-23 23:25:44.168761546 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 1369,1380 ****
Karsten Hopp 8ec412
   * Escape a newline, depending on the 'shell' option.
Karsten Hopp 8ec412
   * When "do_special" is TRUE also replace "!", "%", "#" and things starting
Karsten Hopp 8ec412
   * with "<" like "<cfile>".
Karsten Hopp 8ec412
   * Returns the result in allocated memory, NULL if we have run out.
Karsten Hopp 8ec412
   */
Karsten Hopp 8ec412
      char_u *
Karsten Hopp 8ec412
! vim_strsave_shellescape(string, do_special)
Karsten Hopp 8ec412
      char_u	*string;
Karsten Hopp 8ec412
      int		do_special;
Karsten Hopp 8ec412
  {
Karsten Hopp 8ec412
      unsigned	length;
Karsten Hopp 8ec412
      char_u	*p;
Karsten Hopp 8ec412
--- 1369,1382 ----
Karsten Hopp 8ec412
   * Escape a newline, depending on the 'shell' option.
Karsten Hopp 8ec412
   * When "do_special" is TRUE also replace "!", "%", "#" and things starting
Karsten Hopp 8ec412
   * with "<" like "<cfile>".
Karsten Hopp 8ec412
+  * When "do_newline" is FALSE do not escape newline unless it is csh shell.
Karsten Hopp 8ec412
   * Returns the result in allocated memory, NULL if we have run out.
Karsten Hopp 8ec412
   */
Karsten Hopp 8ec412
      char_u *
Karsten Hopp 8ec412
! vim_strsave_shellescape(string, do_special, do_newline)
Karsten Hopp 8ec412
      char_u	*string;
Karsten Hopp 8ec412
      int		do_special;
Karsten Hopp 8ec412
+     int		do_newline;
Karsten Hopp 8ec412
  {
Karsten Hopp 8ec412
      unsigned	length;
Karsten Hopp 8ec412
      char_u	*p;
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 1403,1409 ****
Karsten Hopp 8ec412
  # endif
Karsten Hopp 8ec412
  	if (*p == '\'')
Karsten Hopp 8ec412
  	    length += 3;		/* ' => '\'' */
Karsten Hopp 8ec412
! 	if (*p == '\n' || (*p == '!' && (csh_like || do_special)))
Karsten Hopp 8ec412
  	{
Karsten Hopp 8ec412
  	    ++length;			/* insert backslash */
Karsten Hopp 8ec412
  	    if (csh_like && do_special)
Karsten Hopp 8ec412
--- 1405,1412 ----
Karsten Hopp 8ec412
  # endif
Karsten Hopp 8ec412
  	if (*p == '\'')
Karsten Hopp 8ec412
  	    length += 3;		/* ' => '\'' */
Karsten Hopp 8ec412
! 	if ((*p == '\n' && (csh_like || do_newline))
Karsten Hopp 8ec412
! 		|| (*p == '!' && (csh_like || do_special)))
Karsten Hopp 8ec412
  	{
Karsten Hopp 8ec412
  	    ++length;			/* insert backslash */
Karsten Hopp 8ec412
  	    if (csh_like && do_special)
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 1454,1460 ****
Karsten Hopp 8ec412
  		++p;
Karsten Hopp 8ec412
  		continue;
Karsten Hopp 8ec412
  	    }
Karsten Hopp 8ec412
! 	    if (*p == '\n' || (*p == '!' && (csh_like || do_special)))
Karsten Hopp 8ec412
  	    {
Karsten Hopp 8ec412
  		*d++ = '\\';
Karsten Hopp 8ec412
  		if (csh_like && do_special)
Karsten Hopp 8ec412
--- 1457,1464 ----
Karsten Hopp 8ec412
  		++p;
Karsten Hopp 8ec412
  		continue;
Karsten Hopp 8ec412
  	    }
Karsten Hopp 8ec412
! 	    if ((*p == '\n' && (csh_like || do_newline))
Karsten Hopp 8ec412
! 		    || (*p == '!' && (csh_like || do_special)))
Karsten Hopp 8ec412
  	    {
Karsten Hopp 8ec412
  		*d++ = '\\';
Karsten Hopp 8ec412
  		if (csh_like && do_special)
Karsten Hopp 8ec412
*** ../vim-7.4.190/src/normal.c	2014-02-22 23:49:30.268896843 +0100
Karsten Hopp 8ec412
--- src/normal.c	2014-02-23 23:19:32.436762138 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 5790,5796 ****
Karsten Hopp 8ec412
      {
Karsten Hopp 8ec412
  	/* Escape the argument properly for a shell command */
Karsten Hopp 8ec412
  	ptr = vim_strnsave(ptr, n);
Karsten Hopp 8ec412
! 	p = vim_strsave_shellescape(ptr, TRUE);
Karsten Hopp 8ec412
  	vim_free(ptr);
Karsten Hopp 8ec412
  	if (p == NULL)
Karsten Hopp 8ec412
  	{
Karsten Hopp 8ec412
--- 5790,5796 ----
Karsten Hopp 8ec412
      {
Karsten Hopp 8ec412
  	/* Escape the argument properly for a shell command */
Karsten Hopp 8ec412
  	ptr = vim_strnsave(ptr, n);
Karsten Hopp 8ec412
! 	p = vim_strsave_shellescape(ptr, TRUE, TRUE);
Karsten Hopp 8ec412
  	vim_free(ptr);
Karsten Hopp 8ec412
  	if (p == NULL)
Karsten Hopp 8ec412
  	{
Karsten Hopp 8ec412
*** ../vim-7.4.190/src/proto/misc2.pro	2013-08-10 13:37:20.000000000 +0200
Karsten Hopp 8ec412
--- src/proto/misc2.pro	2014-02-23 23:19:32.436762138 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 32,38 ****
Karsten Hopp 8ec412
  char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars));
Karsten Hopp 8ec412
  char_u *vim_strsave_escaped_ext __ARGS((char_u *string, char_u *esc_chars, int cc, int bsl));
Karsten Hopp 8ec412
  int csh_like_shell __ARGS((void));
Karsten Hopp 8ec412
! char_u *vim_strsave_shellescape __ARGS((char_u *string, int do_special));
Karsten Hopp 8ec412
  char_u *vim_strsave_up __ARGS((char_u *string));
Karsten Hopp 8ec412
  char_u *vim_strnsave_up __ARGS((char_u *string, int len));
Karsten Hopp 8ec412
  void vim_strup __ARGS((char_u *p));
Karsten Hopp 8ec412
--- 32,38 ----
Karsten Hopp 8ec412
  char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars));
Karsten Hopp 8ec412
  char_u *vim_strsave_escaped_ext __ARGS((char_u *string, char_u *esc_chars, int cc, int bsl));
Karsten Hopp 8ec412
  int csh_like_shell __ARGS((void));
Karsten Hopp 8ec412
! char_u *vim_strsave_shellescape __ARGS((char_u *string, int do_special, int do_newline));
Karsten Hopp 8ec412
  char_u *vim_strsave_up __ARGS((char_u *string));
Karsten Hopp 8ec412
  char_u *vim_strnsave_up __ARGS((char_u *string, int len));
Karsten Hopp 8ec412
  void vim_strup __ARGS((char_u *p));
Karsten Hopp 8ec412
*** ../vim-7.4.190/src/version.c	2014-02-23 22:58:12.072764176 +0100
Karsten Hopp 8ec412
--- src/version.c	2014-02-23 23:35:51.044760579 +0100
Karsten Hopp 8ec412
***************
Karsten Hopp 8ec412
*** 740,741 ****
Karsten Hopp 8ec412
--- 740,743 ----
Karsten Hopp 8ec412
  {   /* Add new patch number below this line */
Karsten Hopp 8ec412
+ /**/
Karsten Hopp 8ec412
+     191,
Karsten Hopp 8ec412
  /**/
Karsten Hopp 8ec412
Karsten Hopp 8ec412
-- 
Karsten Hopp 8ec412
Windows
Karsten Hopp 8ec412
M!uqoms
Karsten Hopp 8ec412
Karsten Hopp 8ec412
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 8ec412
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 8ec412
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 8ec412
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///