Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
5805:2db11543541a | 5806:76863b4b48a3 |
---|---|
5962 character in a line and the first column in an empty line are | 5962 character in a line and the first column in an empty line are |
5963 valid positions. | 5963 valid positions. |
5964 | 5964 |
5965 system({expr} [, {input}]) *system()* *E677* | 5965 system({expr} [, {input}]) *system()* *E677* |
5966 Get the output of the shell command {expr}. | 5966 Get the output of the shell command {expr}. |
5967 When {input} is given, this string is written to a file and | 5967 |
5968 passed as stdin to the command. The string is written as-is, | 5968 When {input} is given and is a string this string is written |
5969 you need to take care of using the correct line separators | 5969 to a file and passed as stdin to the command. The string is |
5970 yourself. Pipes are not used. | 5970 written as-is, you need to take care of using the correct line |
5971 separators yourself. | |
5972 If {input} is given and is a |List| it is written to the file | |
5973 in a way |writefile()| does with {binary} set to "b" (i.e. | |
5974 with a newline between each list item with newlines inside | |
5975 list items converted to NULs). | |
5976 Pipes are not used. | |
5977 | |
5971 Note: Use |shellescape()| or |::S| with |expand()| or | 5978 Note: Use |shellescape()| or |::S| with |expand()| or |
5972 |fnamemodify()| to escape special characters in a command | 5979 |fnamemodify()| to escape special characters in a command |
5973 argument. Newlines in {expr} may cause the command to fail. | 5980 argument. Newlines in {expr} may cause the command to fail. |
5974 The characters in 'shellquote' and 'shellxquote' may also | 5981 The characters in 'shellquote' and 'shellxquote' may also |
5975 cause trouble. | 5982 cause trouble. |