V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
yazoox
V2EX  ›  macOS

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

  •  
  •   yazoox · Apr 26, 2018 · 2490 views
    This topic created in 2935 days ago, the information mentioned may be changed or developed.

    为什么我的 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 ”那一列的颜色。

    Supplement 1  ·  Apr 27, 2018
    问题解决了,就是找到 "draw bold text in bright colors “
    Terminal 和 iTerm2 都有这样的设置,把这个勾掉,就能够用 normal 的颜色显示了

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2928 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 11:46 · PVG 19:46 · LAX 04:46 · JFK 07:46
    ♥ Do have faith in what you're doing.