问题描述
我喜欢使用支持彩色输出UNIX / bash的命令。因此,我已经定义了一些别名,它自动启用,我知道支持此选项命令的彩色输出。不过,我敢肯定有数百个在那里的命令,支持彩色输出 - 我想知道他们是什么
I enjoy using UNIX/bash commands that support coloured output. Consequently, I have a few aliases defined which automatically enable coloured output of the commands that I know support this option. However, I'm sure there are hundreds of commands out there that support coloured output - I'd like to know what they are.
在我的〜/ .bash_aliases
文件的是:
ls --color=auto
grep --color
phpunit --ansi
还有什么?是否有支持彩色输出的所有命令的列表地方?或者更好的是,一些命令grepping我的本地手册页和采摘了相应的命令名称。
What else is there? Is there a list somewhere of all commands that support coloured output? Or better still, some command for grepping my local man pages and plucking out the appropriate command names.
推荐答案
为什么不试试:
man -K color
这是要在其中搜索所有的手册页的文字颜色(的内容,而不仅仅是标题)。
That should search for the word color in all your man pages (content, not just headings).
据要求,每个人页面,您是否要打开并查看该页面:
It asks, for each man page, whether you want to open and view the page:
$ man -K color
/usr/share/man/mann/Widget.n.gz? [ynq] y
/usr/share/man/mann/usual.n.gz? [ynq] y
/usr/share/man/mann/Toplevel.n.gz? [ynq] n
/usr/share/man/mann/itk.n.gz? [ynq] n
/usr/share/man/mann/Archetype.n.gz? [ynq] n
/usr/share/man/man8/squid.8.gz? [ynq] n
/usr/share/man/man7/Xprint.7.gz? [ynq]
/usr/share/man/man7/X.7.gz? [ynq]
/usr/share/man/man7/urxvt.7.gz? [ynq]
/usr/share/man/man7/term.7.gz? [ynq] q
$
在每一个个体的人页面,您可以使用正常的搜索方法(例如, /彩色<&ENTER GT;
)用于查找文本。当一个人做网页,只是退出,将继续搜索。
Inside each individual man page, you can use your normal search method (e.g., /color<ENTER>
) for finding the text. When done with a man page, just exit and it will continue searching.
这篇关于什么UNIX命令支持彩色输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!