I don't suppose saving 2 characters is a justifiable reason. For
consistency, I suggest to follow the comment in ex_docmd.c which says
/* Need to escape white space et al. with a backslash.
* Don't do this for:
* ...
* - shell commands (may have to use quotes instead).
* ...
* ...
*/
also for other characters, not only spaces. I suggest the simple
attached patch. Let the users of bang escape what they want to escape,
and don't make guesses for them, please.
Best,
Zvi.
On 13/11/07 08:55, Ilya Sher wrote:
> Zvi Har'El wrote:
>
>> I don't think it is worth the trouble insisting to pass % to an external
>> command instead of passing "%".
>>
> The big plus here is much less typing:
> comparing :e %<CR> vs :e "%"<CR> gives
> 5 vs 7 characters to type.
>
> Maybe some modifier might be added to % to make
> it usable in "" or ''. I mean like in :he filename-modifiers .
>
>
--
Dr. Zvi Har'El mailto:[EMAIL PROTECTED] Department of Mathematics
tel:+972-54-4227607 Technion - Israel Institute of Technology
fax:+972-4-8293388 http://www.math.technion.ac.il/~rl/ Haifa 32000, ISRAEL
"If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
--- src/ex_docmd.c.~20071019180750~ 2007-10-19 20:07:50.000000000 +0200
+++ src/ex_docmd.c 2007-11-13 13:28:22.000000000 +0200
@@ -4309,7 +4309,7 @@
}
/* For a shell command a '!' must be escaped. */
- if ((eap->usefilter || eap->cmdidx == CMD_bang)
+ if ((eap->usefilter /*|| eap->cmdidx == CMD_bang*/)
&& vim_strpbrk(repl, (char_u *)"!&;()<>") != NULL)
{
char_u *l;