Loading ...
Sorry, an error occurred while loading the content.

69215Re: Rgrep not working on vim 64-bit, win7

Expand Messages
  • Yegappan Lakshmanan
    Apr 23, 2013
    • 0 Attachment

      On Tue, Apr 23, 2013 at 6:58 AM, Dariusz Gadomski <dgadomski@...> wrote:
      > Hi
      > On Mon, Apr 15, 2013 at 6:07 PM, Yegappan Lakshmanan
      > <yegappanl@...> wrote:
      > >
      > >
      > > This problem is caused by the shell command line quote escape
      > > character in MS-Windows.
      > > I have a fix for this issue. I will update the grep plugin and release
      > > a new version.
      > >
      > > - Yegappan
      > I was trying to analyze this problem further and what I found out that
      > actually vim calls something like this underneath:
      > cmd /c (C:\msys\bin\find.exe C:\dev\<my-project> -type d ( -name .SVN ) -prune
      > -o -type f ( -name *.cpp ) -exec c:\msys\bin\grep.exe -s -n -- TODO {} ;)
      > When I tried to paste it directly to cmd.exe I got:
      > -prune was unexpected at this time.
      > So no std output was generated and the process terminated with an error
      > on stderr - hence no tmp file created.
      > I think those brackets around cmd /c call conflict with brackets that make
      > a part of find call itself. When I replace the outer brackets with quotation
      > marks:
      > cmd /c "C:\msys\bin\find.exe C:\dev\<my-project> -type d ( -name .SVN )
      > -prune -o -type f ( -name *.cpp ) -exec c:\msys\bin\grep.exe -s -n --
      > TODO {} ;"
      > I get no error and expected output is printed.
      > So my guess is either:
      > - a different method is needed in the find call to group the conditions
      > (does find even allow a different way of grouping?) or
      > - inner brackets need somehow be escaped in the call or
      > - vim system() call needs to be fixed to handle brackets in the argument string.
      > Maybe is there another way to fix it or at least provide a temporary
      > work-around?
      > I would appreciate any hints that would enable me to use Rgrep until this
      > problem gets fixed.

      The approach that works and used by the taglist plugin is to write the
      command line
      into a temporary .cmd file and execute it. The grep plugin also will use this

      - Yegappan

      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 vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 19 messages in this topic