Zsh颜色部分标签完成 [英] Zsh color partial tab completions
问题描述
是否可以在Zsh中对部分完成结果的已完成部分着色?
Is it possible to color the completed part of the partial completion results in Zsh?
Fish在默认情况下(至少在Gentoo中)执行此操作,如图所示
Fish does this by default (in Gentoo at least) as shown in the image below:
>
全尺寸图片: http://i.imgur。 com / tN6w3.png
推荐答案
是的,您可以使用
Yes, you can do it with things like that:
zstyle -e':completion:*:default'list-colors'reply =($ {PREFIX:+ = bi)($ PREFIX:t)(?)* == 02 = 01}:$ {(s。:。)LS_COLORS})'
只需更改01和02颜色,使其符合您的口味,例如匹配您的屏幕截图:
Just change the 01 and 02 colors so it matches your taste, for example to match your screenshot:
zstyle -e'完成:*:default'list-colors'reply =($ {PREFIX:+ =(#bi)($ PREFIX:t)(?)* == 34 = 34}:$ {(s.:.)LS_COLORS })';
(摘自 reddit线程,添加到此处以帮助人们搜索此内容,就像我一样。)
(Taken from reddit thread, added here to help people searching for this, like I did.)
这篇关于Zsh颜色部分标签完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!