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

喜你入骨 提交于 2019-12-11 10:49:50

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!