修复ls中的颜色不匹配问题,并推荐使用omz。

huangapple go评论58阅读模式
英文:

Fixing colour unmatch in ls and recommendation with omz

问题

After installing the latest update, the recommendation colour changed to purple, which is challenging to see. Is there any way to change it to another colour, like red? I tried to change the font colour or ANSI colour, but it does not work.

谢谢你!

英文:

After installing the latest update, the recommendation colour changed to purple, which is challenging to see. Is there any way to change it to another colour, like red? I tried to change the font colour or ANSI colour, but it does not work.

修复ls中的颜色不匹配问题,并推荐使用omz。

Thank you so much!

答案1

得分: 0

以下是翻译好的部分:

解决方案 1:完全卸载 Oh my Zsh,然后重新安装(如果卸载 Oh my Zsh 不能解决问题)

rm -rf ~/.oh-my-zsh
rm ~/.zshrc
cp ~/.zshrc.pre-oh-my-zsh ~/.zshrc
source ~/.zshrc

感谢 @Steve McKinney
来源: https://stackoverflow.com/questions/9813983/troubles-uninstalling-oh-my-zsh

解决方案 2:在 zshrc 文件中添加一行

zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}

然后使用 https://geoff.greer.fm/lscolors/ 来选择你想要的颜色。

感谢 Marc Cornell
来源: https://github.com/ohmyzsh/ohmyzsh/discussions/11559

希望这对有相同问题的人有所帮助。

英文:

It seems to be a bug during the Update since the recommendation colour should be the same as the one that comes with ls. There are two ways to solve it.

Solution 1: Uninstalling Oh my Zsh completely and reinstall again (if uninstall_oh_my_zsh doesn't solve the problem)

rm -rf ~/.oh-my-zsh
rm ~/.zshrc
cp ~/.zshrc.pre-oh-my-zsh ~/.zshrc
source ~/.zshrc

Thanks to @Steve McKinney
Source: {https://stackoverflow.com/questions/9813983/troubles-uninstalling-oh-my-zsh}

Solution 2: Add a row in the zshrc file

zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} 

and use https://geoff.greer.fm/lscolors/ to pick the colours you want

Thanks to Marc Cornellà {Source: https://github.com/ohmyzsh/ohmyzsh/discussions/11559}

Hopes this help anyone with the same issue.

huangapple
  • 本文由 发表于 2023年3月12日 10:35:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/75710778.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定