1

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
scottmrogowski
  • 2,063
  • 4
  • 23
  • 32
  • On my machine (Ubuntu 14.04, ack 2.12, zsh 5.0.5) it seems to work without issue. Which versions of `ack` and `zsh` are you using? And does the same thing happen in a *zsh* started with `zsh -f`? – Adaephon Dec 03 '14 at 06:21
  • `zsh` is known to alias `ack`. Check `which ack`. – Aleksei Matiushkin Dec 03 '14 at 07:50

1 Answers1

2

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...

Francisco
  • 3,980
  • 1
  • 23
  • 27
  • 1
    Thanks! I did have an alias to ack that I didn't know about previously. Your suggestion to `which -a ack` helped me to solve that issue – scottmrogowski Dec 04 '14 at 00:56