On Feb 20, 10:57 am, h_east <[email protected]> wrote:
> I think mattn is right.
>
> Talk of 'shellxquote' option. (Default: ')' in cmd.exe)
> Enclosed in parentheses is to grouping. It same as that of the Bash.
> And be enclosed in quotation marks is a different meaning.
>

Yes, parentheses are intended to be for grouping in cmd.exe. However,
they also work for single commands, and cmd.exe's quote handling is so
broken that common use-cases break no matter how we use them. See the
7.3.443 thread:

http://groups.google.com/group/vim_dev/browse_thread/thread/bd53b29c5e5f2a50

I don't care that we're using parentheses as a hack. It's a hack
that's needed to workaround broken cmd.exe behavior. Namely, cmd.exe
will automatically strip the first quote character and the last quote
character, even if these are not paired together, so that "abc def"
"ghi jkl" becomes abc def" "jkl. With 7.3.443, we added another pair
of quotes, but this broke any commands which have special characters
like & or | in their arguments, because then these characters do not
get included in a quote pair and get interpreted by the invoking shell
rather than the invoked shell. The final solution proposed in the
above thread was to surround in (...) and escape ALL special
characters within the (...) in order to pass everything to the invoked
shell.

> Talk of 'shellredir' and 'shellpipe' option . (Default: '2> & 1' in cmd.exe)
> This option is used to obtain the results of the entire command.

I'm with you so far.

> So, it is not have to resort to take the entire command.
> In other words, it should not ever put inside the parentheses.

You've lost me. I don't see why it is a problem to put the redirect
inside of parentheses. The redirect still applies to the command
executed by the invoked shell. Outside the paretheses, it will apply
to the result of invoking the shell. Are you saying we should use
'shellquote' rather than 'shellxquote'? I'm not certain which is
better in this case. Either seems like it ought to work. What are
scenarios where shellxquote will cause problems? Or is this a
conceptual argument?

> However, it is put inside of parentheses in Vim 7.3.445. Yes, This is BAD
> point.
> So that, additional processing of this option should be changed after
> 'shellxquote' process.
>

What option? What additional processing?

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