summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt15
1 files changed, 11 insertions, 4 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 3e839fb3e..a4bb1f40e 100644
--- 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.