On Thu, Feb 16, 2012 at 4:52 PM, John Beckett <johnb.beck...@gmail.com> wrote:
> Edwin Steiner wrote:
> > I found it most reliable for testing to write a simple C
> > program that prints its argv[] array.
>
> I did that a few years ago, and in case anyone is interested,
> here is what I used.

I fought with all this shellquote nonsense long ago and am probably
partly responsible for the current tangle. I mostly use Macs and Linux
nowadays, so I'm no longer particularly invested in the Windows
version of Vim.

Python's subprocess package takes an interesting approach. You pass it
a list of arguments, which is easy if slightly tedious for the user to
get right, and there's no need to worry about quoting individual
arguments. At the last minute, it carefully concatenates the list into
a correctly quoted string before calling CreateProcess.

See the implementation at
http://hg.python.org/cpython/file/b8593ec7e8c5/Lib/subprocess.py
--
/George V. Reilly  geo...@reilly.org  Twitter: @georgevreilly
http://www.georgevreilly.com/blog  http://blogs.cozi.com/tech

-- 
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

Reply via email to