Using ack, how do you display one page at a time?

2019-07-30 22:17发布

问题:

I would like to use ack and have the results shown one page at a time.

I've already tried to pipe it to |more, but this removes the color formatting. I would like to keep the colors intact.

回答1:

if you read man page of ack, you will see there is an option --pager for your needs. for example:

ack --color --pager=more ....


回答2:

Add --color to your call to ack.



标签: linux ack