On Mar 17, 4:34 pm, epanda <callingel...@hotmail.fr> wrote:
> Hi,
>
> this command aims to launch a binary in background task but it fails:
>
> let cmd = '!start cmd /c binary.exe c:/temp/sources -a --enable=all --
> template gcc 1> infos.txt 2> cppcheck.out & vim --servername GVIM1 --
> remote-expr "GetAsyncText('infos.txt')" & pause '
>
> while binary.exe has not accomplished its job, GetAsyncText is not
> called
>

I think you need to quote the entire argument passed to the "cmd /c"
command, or it won't work. E.g. in your case,

let cmd = '!start cmd /c "binary.exe c:/temp/sources -a --enable=all --
template gcc 1> infos.txt 2> cppcheck.out & vim --servername GVIM1 --
remote-expr "GetAsyncText('infos.txt')" & pause "'

I would think the GetAsyncText command would be called anyway, just at
the wrong time by the wrong shell, but maybe this is not the case. I
worked through this a while ago creating an async Grep command, and
remember having trouble with the quoting as demonstrated, but I don't
remember the behavior the quoting avoided.

Don't worry about the nested quotes, cmd.exe is dumb enough to do the
right thing, not what you'd expect.

-- 
You received this message from the "vim_use" 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

Reply via email to