On Feb 19, 6:21 pm, mattn <[email protected]> wrote:
> I got an error after applying this patch.
>
> :echo system("cat | grep foo", "foo")
> grep: ): No such file or directory

Similar test, using Windows commands only:

:echo system('type mercurial.ini | findstr gvim')
FINDSTR: cannot open )

However,
:echo system('type mercurial.ini ^| findstr gvim')
editor = gvim
editor = gvim

As discussed in the thread responding to 7.3.443, both surrounding the
command in parentheses AND escaping the special characters are needed.

Otherwise, the shell invoking cmd.exe treats something like type file
| findstr as two commands, whereas escaping the | with ^ allows it to
invoke cmd.exe with the entire line as a command, which the invoked
cmd.exe then parses as two commands.

Probably a new option is needed telling the shell what to escape, and
maybe with what.

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui