【问题标题】:$fg[cyan]~$reset_color $(git_prompt_info) Mac Os terminal problem$fg[cyan]~$reset_color $(git_prompt_info) Mac OS 终端问题
【发布时间】:2021-07-20 17:32:13
【问题描述】:

我正在寻找有关我的终端 mac 中发生的问题的答案。我研究了很多答案,但没有一个能解决我的问题。

我在打开提示时收到此消息:

Last login: Tue Jul 20 14:17:28 on ttys001

➜  $fg[cyan]~$reset_color $(git_prompt_info)

我尝试过重新安装、更改 .zshrc 文件等。

这是我的 .oh-my-zsh/themes/robbyrussell.zsh-theme

PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"

PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'

ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"

ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "

ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"

ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"

抱歉我不好解释我是这个领域的品牌 谢谢大家!

【问题讨论】:

    标签: macos zsh oh-my-zsh


    【解决方案1】:

    线

    PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
    

    没有意义。您正在使用单引号,它禁止参数扩展。请改用双引号。

    【讨论】:

    • 你说得对,哈哈,我知道为什么会这样。非常感谢!
    猜你喜欢
    • 1970-01-01
    • 2017-01-21
    • 2011-06-04
    • 1970-01-01
    • 2017-05-25
    • 2021-06-05
    • 2010-10-29
    • 1970-01-01
    • 2020-09-10
    相关资源
    最近更新 更多