是否可以在Zsh中为部分完成结果的已完成部分着色?
Fish 默认执行此操作(至少在 Gentoo 中),如下图所示:
全尺寸图片: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}")'
Just change the 01 and 02 colors so it matches your taste, for example to match your screenshot:
zstyle -e ':completion:*:default' list-colors 'reply=("${PREFIX:+=(#bi)($PREFIX:t)(?)*==34=34}:${(s.:.)LS_COLORS}")';
(取自 reddit thread ,添加在这里是为了帮助人们搜索这个,就像我一样。)
关于shell - Zsh 颜色部分选项卡完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8300687/