哪里可以找到可与ack(-grep)一起使用的所有颜色组合的列表?我发现通过ack-grep传递的日志对于检测错误,警告或各种其他条件(尤其是着色)可能是非常有帮助的,但是我还没有找到可以使用组合的权威列表等.
tail -f development.log \ | ack-grep --flush --passthru --color --color-match=yellow "^.*warning.*"
我已经看到了诸如标准颜色的选项:红,蓝,黄,绿等
而且我看到你可以使用“white on_green”
但还有什么?
ack使用Perl的Term :: ANSIColor模块,因此您可以通过以下方式检查可用的内容:
perldoc Term::ANSIColor
以下是相关摘录.
The recognized normal foreground color attributes (colors 0 to 7) are: black red green yellow blue magenta cyan white The corresponding bright foreground color attributes (colors 8 to 15) are: bright_black bright_red bright_green bright_yellow bright_blue bright_magenta bright_cyan bright_white The recognized normal background color attributes (colors 0 to 7) are: on_black on_red on_green on_yellow on_blue on_magenta on_cyan on_white The recognized bright background color attributes (colors 8 to 15) are: on_bright_black on_bright_red on_bright_green on_bright_yellow on_bright_blue on_bright_magenta on_bright_cyan on_bright_white For any of the above listed attributes,case is not significant.
我也很高兴看到你使用–passthru.
我们欢迎你在ack-users mailing list