diff runtime/doc/eval.txt @ 5806:76863b4b48a3 v7.4.247

updated for version 7.4.247 Problem: When passing input to system() there is no way to keep NUL and NL characters separate. Solution: Optionally use a list for the system() input. (ZyX)
author Bram Moolenaar <bram@vim.org>
date Sat, 05 Apr 2014 18:55:46 +0200
parents 9f8fa56f1906
children e5f1f2ea0b4a
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -5964,10 +5964,17 @@ synstack({lnum}, {col})					*synstack()*
 
 system({expr} [, {input}])				*system()* *E677*
 		Get the output of the shell command {expr}.
-		When {input} is given, this string is written to a file and
-		passed as stdin to the command.  The string is written as-is,
-		you need to take care of using the correct line separators
-		yourself.  Pipes are not used.
+
+		When {input} is given and is a string this string is written 
+		to a file and passed as stdin to the command.  The string is 
+		written as-is, you need to take care of using the correct line 
+		separators yourself.
+		If {input} is given and is a |List| it is written to the file
+		in a way |writefile()| does with {binary} set to "b" (i.e.
+		with a newline between each list item with newlines inside
+		list items converted to NULs).  
+		Pipes are not used.
+
 		Note: Use |shellescape()| or |::S| with |expand()| or 
 		|fnamemodify()| to escape special characters in a command 
 		argument.  Newlines in {expr} may cause the command to fail.