shell - Zsh 颜色部分选项卡完成

标签 shell colors zsh tab-completion fish

是否可以在Zsh中为部分完成结果的已完成部分着色?

Fish 默认执行此操作(至少在 Gentoo 中),如下图所示:

enter image description here

全尺寸图片: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/

相关文章:

java - 为什么 Java Scene Builder 在程序运行时没有显示确切的背景颜色

android - Android SDK 的推荐 .zshrc 设置

linux - 在 Linux 中获取日期的 Shell 脚本

linux - 如何剪切文件中包含三位数字的单词 (100) - shell 脚本

linux - 使用 awk 拆分具有位置值条件的文件

java Swing 。如何将颜色强度从黑色更改为白色?

linux - 在 expect 脚本中执行 shell 命令时无法读取此类变量

colors - ICC 文件的不同部分如何协同工作?

zsh - 在 tmux 中的 zsh 中,如何使页面向上/向下滚动向上/向下

shell - 删除字符串中的换行符