V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yazoox
V2EX  ›  macOS

为什么我的 macos 下, terminal 或者 iterm2 中使用的 color theme 总是 bright 而不是 normal

  •  
  •   yazoox · 2018-04-26 17:44:00 +08:00 · 2041 次点击
    这是一个创建于 2185 天前的主题,其中的信息可能已经有所发展或是发生改变。

    为什么我的 macos 下,terminal 或者 iterm2 中使用的 color theme 总是 bright 而不是 normal

    这个是我的 oh-my-zsh 的 theme 设置

    PROMPT=$'
    %{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%I:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(__posh_git_echo)\
    %{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} '
    

    大家可以看到,

    计算机名称,应该是 fg_bold[green],即绿色,

    中间的日期,应该是 fg[blue],即蓝色

    可是,打我打开 iterm2 终端,发现,“计算机名称”显示大约是“浅灰色”,“日期”显示大约是“某灰色”,不是我想要的“绿色”和“蓝色”。

    然后,打开 iterm2 的设置界面(Preferences=>profiles),能够看到,其实使用的是颜色分类 ANSI colors 里面的 bright 那一类别的颜色。如果使用的是 Normal 的话,就应该正常了。但是我不知道怎么设置,让它使用“ Normal ”那一列的颜色。

    第 1 条附言  ·  2018-04-27 12:50:05 +08:00
    问题解决了,就是找到 "draw bold text in bright colors “
    Terminal 和 iTerm2 都有这样的设置,把这个勾掉,就能够用 normal 的颜色显示了

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2758 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 12:24 · PVG 20:24 · LAX 05:24 · JFK 08:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.