On Wednesday, September 11, 2013 8:47:33 AM UTC-5, Jan Stocker wrote: > > :r! cmd /c echo B(la)h > > > > is broken. It is neither executed nor a piped outline file is created, so > VIm can't read the output and throws a read error on temp file. This is > working under 7.3 without problems. > > > > Anyone an idea where to start bug hunting? > > > > :verbose set shellcmdflag? shellxquote? shellxescape? shell? > > Halfway through Vim 7.3 patches, the 'shellxescape' option was added and > defaults for the others modified so that Windows shell commands succeeded > more often. But they still fail with some special characters, because cmd.exe > quoting is "special". > > For once I'm posting from a Linux system and can't test at the moment. Try > with these options at their default value. If these options are still at > their defaults, I think you can try shellxquote as "( > > > > > > > > shellcmdflag=/c > shellxquote=( > shellxescape="&|<>()@^ > shell=C:\Windows\system32\cmd.exe > > > > > For Win32 the default for shellxquote is ( so the shellxescape characters > will be escaped by ^. The help file and implementation is correct, but > cmd.exe does not understand the escaped ^( > > > > :!echo b(l)ah > > > > C:\Windows\system32\cmd.exe /c (echo b^(l^)ah) > "ah)" kann syntaktisch an dieser Stelle nicht verarbeitet werden. > shell returned 1 > Hit any key to close this window... > > > Using "( works, no escape characters will be used. But I do not understand > > > > a) the goal of this implementation > > b) the non working default setting for Win32 > > > > Of course I do not want to run an "echo" but "c:\program Files (x86)\...." > and this behaviour will break many plugins... > >
The intent of the implementation was to make this work by default: :!"C:\Program Files\something\app.exe" "C:\Documents and Settings\user1\blah.txt" The old defaults would make this fail by stripping off the first and last parenthesis. The current defaults were the best we could come up with in a series of patches: 7.3.443, 7.3.445-7.3.448, and 7.3.450. Your problem looks very similar to this: https://groups.google.com/d/topic/vim_dev/Uxx5KcB7ktA/discussion But in that case, escaping with ^ seemed to work. I do think your use case was why the "( support was added. I think I remember that "echo" is special and doesn't work the same as calling an actual application, as well. By the way, changing the command to: :!cmd /c "echo b(l)ah" also works, with default option values. This works around the special-ness of "echo" if that's actually the case. -- -- 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
