AsyncCommand icon indicating copy to clipboard operation
AsyncCommand copied to clipboard

AsyncGrep runs for ever on invalid input

Open idbrii opened this issue 12 years ago • 1 comments

On the latest (96d832a), AsyncGrep doesn't end when run on some invalid input.

For example, when not terminating your strings:

grep \\" %

Fails with an error like unexpected EOF while looking for matching '"'. The same search in AsyncGrep:

AsyncGrep \\" %

And you get no output, no quickfix opens, and grep is not running in the background. So grep terminated, but the vim_cmd to tell vim was never executed. It's probably because the quoting includes vim_cmd as part of the invalid grep command.

idbrii avatar Mar 10 '13 16:03 idbrii

I think I need to use shellescape() somewhere, but I'm not sure where/how. I need to figure out what doing so would look like in Async_Impl and whether that would be okay. Possibly, I need to use f-args instead of q-args for AsyncGrep and join the args myself and then shellescape them. (Do I also want that for cscope and make?)

idbrii avatar Mar 10 '13 16:03 idbrii