mileszs / ack.vim

Vim plugin for the Perl module / CLI script 'ack'
Other
3.08k stars 396 forks source link

Search with "|" blows up #14

Closed henrik closed 13 years ago

henrik commented 13 years ago
:Ack "hello|wello"

gives me

Searching ...
Error detected while processing function <SNR>20_Ack:
line   16:
E40: Can't open errorfile /var/folders/If/IfZlMN-8G3OpvJi2H-YbLk+++TI/-Tmp-/v56w6f0/5  

Whereas

ack hello|wello

on the command line works fine.

blueyed commented 13 years ago

I guess you've meant to use ack 'hello|wello' in a shell, aren't you? Otherwise you would be using ack hello only and have it piped to wello.

I have pushed a fix at https://github.com/blueyed/ack.vim/commit/a4948fa0a448e34e2f999e9a8013a5e862c1f2a6 to address this.

Please report back if that fixes it for you.

henrik commented 13 years ago

blueeyed: Oh yes, sorry.

And thank you! That fix makes :Ack "hello|wello" work.

Would be even nicer if :Ack hello|wello (and :Ack hello|wello some/dir) worked in the same way instead of trying to pipe to wello. I understand that it happens because this is a very thin command on top of the shell, but maybe it's an easy fix.

I might have a stab at if myself if no one else does - since filing this ticket I've gotten slightly more familiar with vimscript.

henrik commented 13 years ago

There, fixed to also work with e.g. unquoted :Ack hello|wello.

henrik/ack.vim@e7ade0becd54bab90166a6907264e673a56728e9

henrik commented 13 years ago

Closing the issue since I'm happy with this ;)