Zsh color partial tab completions

风格不统一 提交于 2019-12-03 11:07:00

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}")';

(Taken from reddit thread, added here to help people searching for this, like I did.)

NgaNguyenDuy

I think [1] is thing you want. You need menu and select as @svlasov commented.

[1]. ZSH highlight on tab

I long time ago (2002) i wrote a experimental shell script to explain about control characters in shell. Check this out http://cltfc.sites.uol.com.br/ and you gonna see a lot of examples about how to color, make sounds and positioning of any char on your black screen. But this is for Bash and i do not know if they are compatible.

Anyway, for Zsh, check this page http://spiralofhope.wordpress.com/2009/04/23/zsh-ansi-prompt/ and you gonna see some examples of how to customize your prompt with colors. The same ANSI codes for colors and the same syntax should work when you use directly on the shell.

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