问题
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.
来源:https://stackoverflow.com/questions/22672484/using-ack-how-do-you-display-one-page-at-a-time