Andy Wokula wrote:

> Am 16.02.2012 05:54, schrieb Bram Moolenaar:
> > Ben Fritz wrote:
> >
> >> I think we should do the auto-escaping, with shellxquote=(, and
> >> additionally add a help note by :! and system() that "According to
> >> the Microsoft documentation for cmd.exe, you either need to escape
> >> (with a ^ character) any of these characters appearing literally in
> >> your command, or surround them in quotes ("):>  ( ) @ ^ |." Should we
> >> mention that Vim will escape them again, and also escape "?
> >
> > Yes, I think the user should escape&  and | when they appear in a
> > command.  I haven't verified, but I believe they are illegal in a file
> > name.
> 
> `|' is illegal in a file name, but `&' is not.

Weird.

> Characters with special meaning [1]:          " < > | & ( ) @ ^
> Characters that can't be used in file names:  " < > | * ?
> Characters to be escaped [2] in a file name:  Space & ( ) @ ^
> 
> [1] Vim should escape these with `^'
> [2] prepend `^' or enclose file name in quotes
> 
> 
> > Please try the patch below.  I currently do not have a Windows machine
> > to try this out.
> 
> Does the patch escape special characters?  I can't see code for it.
> Again, suggested settings are:
>      shellcmdflag: /c
>      shellxquote: (
>      escape special characters with `^'

I am against automatic escaping, because it makes it impossible to have
a & separate two commands.  The user should do the escaping.

Generally, Vim should do as little as possible.  We currently don't do
any of this ^ escaping, I am very hesitant to start this now.
Also because it is unclear to me where the un-escaping is done. The echo
example is confusing.

> IMHO  shellxquote = '"('  should not be supported, it was an
> intermediate solution with its own problems.

I thought the conclusion was this was the best solution overall.
What are the problems?

-- 
hundred-and-one symptoms of being an internet addict:
68. Your cat always puts viruses on your dogs homepage

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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