ack results do not contain newlines in zsh

279 views Asked by At

I use zsh as my default shell

When I do a simple ack command like

$ ack a_string

it does not insert a newline between the lines that match. So they all get jumbled up like

a_string is on this linethis is another line a_string is onand a third a_string line

Bash displays the results correctly:

a_string is on this line
this is another line a_string is on
and a third a_string line
1

There are 1 answers

1
Francisco On BEST ANSWER

zsh does not alias ack. Perhaps oh-my-zsh does that...

[...]

the easiest way to debug something like this is to:

  1. See what is it that you are running as 'ack': which ack

  2. Run zsh without loading any config file of yours, executing 'ack': zsh -f -c 'cd test-dir && ack a_string'

You can also run which -a ack to see all "ack"s present in your path...