Closed xh3b4sd closed 8 years ago
Thanks for the report.
It sounds to me like something weird in your shell. What shell are you running? When I run ack
like that I get:
$ ack Foo().Bar
-bash: syntax error near unexpected token `('
And it doesn't matter if it's ack
.
$ ls Foo().Bar
-bash: syntax error near unexpected token `('
$ tar Foo().Bar
-bash: syntax error near unexpected token `('
What happens when you quote the arguments, as in:
ack 'Foo().Bar'
Thanks for coming back that quickly. It is indeed weird. I am on zsh
and the issue is not ack-grep
as it looks like.
vagrant@xenial zsh --version
zsh 5.1.1 (x86_64-ubuntu-linux-gnu)
vagrant@xenial tar Foo().Bar
vagrant@xenial tar
tar:4: command not found: .Bar
I will check back with the z-shell folks.
That's actually what you said, a lack of quoting of parenthesis which are interpreted as defining a function. The solution then is quote everything: https://github.com/robbyrussell/oh-my-zsh/issues/5490#issuecomment-251251476. You can close this one.
I found a way to make
ack-grep
unusable.When reloading my terminal session
ack-grep
is back to normal again, but can be brought into the described unhealthy state again. The malicious expression is<A>().<B>
. ThusCat().Dog
causesack-grep
to fail as well. I am on a Vagrant box.