Re: Bug in 'shellcmdflag' and proposed patch
- Gary Johnson wrote:
> I've discovered a bug, or at least a limitation, in the behaviorThanks. I'll await some people trying this out.
> of the 'shellcmdflag' option: it does not allow for multiple flags
> separated by spaces.
> I encountered this problem when trying to set the option like this,
> :set shellcmdflag=-O\ extglob\ -c
> so that I could use :grep with bash's extended pattern matching
> operators like this:
> :grep pattern !(*Foo*)
> That fails because Vim hands the contents of 'shellcmdflag' to bash
> as a single argument instead of three.
> The attached patch fixes this problem for Unix but not for other
> operating systems because I have no way to test my changes in
> environments other than Linux and Cygwin.
> The patch is to Vim 7.3.189. I haven't updated that particular Vim
> installation because I'm also trying to track down a race condition
> in the handling of the termresponse and diff events and I don't want
> to disturb the timing of those events.
> Setting 'shellcmdflag' to "-ic" is not a satisfactory solution
> because having bash source my ~/.bashrc when it's not in an
> interactive environment causes other problems.
ARTHUR: Well, I can't just call you `Man'.
DENNIS: Well, you could say `Dennis'.
ARTHUR: Well, I didn't know you were called `Dennis.'
DENNIS: Well, you didn't bother to find out, did you?
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Bram@... -- 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