终端(或 iterm2)中 git 分支名称旁边带有特殊字符的数字
number with special character next to git branch name in terminal (or iterm2)
我是 Mac 用户并使用 Iterm2 和 zsh
当我打开 git 目录时
在我的分支名称旁边,有一个 特殊字符 和 数字
例如(我的终端)
~/projects/myProject | on git mybranch *1
~/projects/myProject | on git mybranch !1
(据我猜测,!1是我目录下的一个文件被修改了。)
我想知道*和!是什么意思以及数字的含义。
我在哪里可以找到关于这个特殊字符的信息?
我的提示:
${$((_p9k_on_expand()))+}${(e)_p9k_t[7]}${_p9k__1-${${:-${_p9k__d::=0}${_p9k__rprompt::=${_p9k__1r-${${:-${_p9k__bg::=NONE}${_p9k__i::=0}${_p9k__sss::=}}+}${${:-${P9K_CONTENT::=}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=8}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+10}}${_p9k__n:=11}${_p9k__v::="✔"}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1rstatus+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{236\}%F{070\}${${(M)_p9k__e:#11}:+ }$_p9k__v${${:-${_p9k__w::=%b%K{236\}%F{070\} %b%K{236\}%F{070\}}${_p9k__sss::=%b%K{236\}%F{070\} }${_p9k__i::=1}${_p9k__bg::=236}}+}}${${:-"${${(%):-%j}:#0}"}:+${${:-${P9K_CONTENT::=""}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=12}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+14}}${_p9k__n:=15}${_p9k__v::=}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1rbackground_jobs+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{236\}%F{037\}${${(M)_p9k__e:#11}:+ }$_p9k__v${${:-${_p9k__w::=%b%K{236\}%F{037\} %b%K{236\}%F{037\}}${_p9k__sss::=%b%K{236\}%F{037\} }${_p9k__i::=3}${_p9k__bg::=236}}+}}}${${:-"${${(%):-%#}:#\#}"}:+${${:-${P9K_CONTENT::=%n@%m}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=16}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+18}}${_p9k__n:=19}${_p9k__c::=}${_p9k__e::=${${_p9k__1rcontext+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}%246Fwith %b%K{236\}%F{180\}${_p9k__c}%b%K{236\}%F{180\}${${:-${_p9k__w::=%b%K{236\}%F{180\} %b%K{236\}%F{180\}}${_p9k__sss::=%b%K{236\}%F{180\} }${_p9k__i::=29}${_p9k__bg::=236}}+}}}${${:-"${${(%):-%#}:#\%}"}:+${${:-${P9K_CONTENT::=%B%n@%m}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=20}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+22}}${_p9k__n:=23}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1rcontext+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}%246Fwith %b%K{236\}%F{178\}${_p9k__c}%b%K{236\}%F{178\}${${:-${_p9k__w::=%b%K{236\}%F{178\} %b%K{236\}%F{178\}}${_p9k__sss::=%b%K{236\}%F{178\} }${_p9k__i::=29}${_p9k__bg::=236}}+}}}${${:-"${${:-$_p9k__keymap.$_p9k__zle_state}:#(vicmd.*|vivis.*|vivli.*|*.*insert*)}"}:+${${:-${P9K_CONTENT::=OVERTYPE}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=24}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+26}}${_p9k__n:=27}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{236\}%F{172\}${${:-${_p9k__w::=%b%K{236\}%F{172\} %b%K{236\}%F{172\}}${_p9k__sss::=%b%K{236\}%F{172\} }${_p9k__i::=36}${_p9k__bg::=236}}+}}}${${:-"${(M)${:-$_p9k__keymap$_p9k__region_active}:#vicmd0}"}:+${${:-${P9K_CONTENT::=NORMAL}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=28}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+30}}${_p9k__n:=31}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{236\}%F{106\}${${:-${_p9k__w::=%b%K{236\}%F{106\} %b%K{236\}%F{106\}}${_p9k__sss::=%b%K{236\}%F{106\} }${_p9k__i::=36}${_p9k__bg::=236}}+}}}${${:-"${(M)${:-$_p9k__keymap$_p9k__region_active}:#(vicmd1|vivis?|vivli?)}"}:+${${:-${P9K_CONTENT::=VISUAL}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=32}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+34}}${_p9k__n:=35}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{236\}%F{068\}${${:-${_p9k__w::=%b%K{236\}%F{068\} %b%K{236\}%F{068\}}${_p9k__sss::=%b%K{236\}%F{068\} }${_p9k__i::=36}${_p9k__bg::=236}}+}}}${${:-${P9K_CONTENT::=10:17:25}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=36}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+38}}${_p9k__n:=39}${_p9k__v::=}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1rtime+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}%246Fat %b%K{236\}%F{066\}${_p9k__c}%b%K{236\}%F{066\}${${(M)_p9k__e:#11}:+ }$_p9k__v${${:-${_p9k__w::=%b%K{236\}%F{066\} %b%K{236\}%F{066\}}${_p9k__sss::=%b%K{236\}%F{066\} }${_p9k__i::=40}${_p9k__bg::=236}}+}}$_p9k__sss%b%k%f}}${_p9k__lprompt::=${_p9k__1l-${${:-${_p9k__bg::=NONE}${_p9k__i::=0}${_p9k__sss::=%f}}+}${${:-${P9K_CONTENT::=}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=40}}${_p9k__n:=${${(M)${:-x236}:#x($_p9k__bg|${_p9k__bg:-0})}:+42}}${_p9k__n:=43}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1los_icon+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${${_p9k_t[$_p9k__n]/<_p9k__ss>/$_p9k__ss}/<_p9k__s>/$_p9k__s}${_p9k__c}%b%K{236\}%F{255\} ${${:-${_p9k__s::=%F{236\}}${_p9k__ss::=%244F│}${_p9k__sss::=%F{236\}}${_p9k__i::=1}${_p9k__bg::=236}}+}}${${:-${P9K_CONTENT::="%{d%}${:-"%B%F{039}"}${(Q)${:-"\~"}}${:-"%b%K{236}%F{031}"}/${${${_p9k__d:#-*}:+WebstormProjects}:-${:-"%F{103}"}W${:-"%b%K{236}%F{031}"}${$((_p9k__d+=15))+}}/${${${_p9k__d:#-*}:+_personal}:-${:-"%F{103}"}_p${:-"%b%K{236}%F{031}"}${$((_p9k__d+=7))+}}/${:-"%B%F{039}"}react-app-practice${:-"%b%K{236}%F{031}"}%{d%}"}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=68}}${_p9k__n:=${${(M)${:-x236}:#x($_p9k__bg|${_p9k__bg:-0})}:+70}}${_p9k__n:=71}${_p9k__v::=}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1ldir+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${${_p9k_t[$_p9k__n]/<_p9k__ss>/$_p9k__ss}/<_p9k__s>/$_p9k__s}${_p9k__v}${${(M)_p9k__e:#11}:+ }${_p9k__c}%b%K{236\}%F{031\} ${${:-${_p9k__s::=%F{236\}}${_p9k__ss::=%244F│}${_p9k__sss::=%F{236\}}${_p9k__i::=2}${_p9k__bg::=236}}+}}${(e)_p9k__vcs}%b%k$_p9k__sss%b%k%f${:-" %b%k%f"}}}}+}${(e)_p9k_t[6]}${${_p9k__h::=81.}+}${${_p9k__d::=$((_p9k__m-_p9k__h))}+}${_p9k__lprompt/\%\{d\%\}*\%\{d\%\}/${_p9k__1ldir-${:-"%B%F{039}"}${(Q)${:-"\~"}}${:-"%b%K{236}%F{031}"}/${${${_p9k__d:#-*}:+WebstormProjects}:-${:-"%F{103}"}W${:-"%b%K{236}%F{031}"}${$((_p9k__d+=15))+}}/${${${_p9k__d:#-*}:+_personal}:-${:-"%F{103}"}_p${:-"%b%K{236}%F{031}"}${$((_p9k__d+=7))+}}/${:-"%B%F{039}"}react-app-practice${:-"%b%K{236}%F{031}"}}}${${_p9k__m::=$((_p9k__d+_p9k__h))}+}}${${COLUMNS::=$_p9k__clm}+}
这是您的 shell 提示符(PS1 又名 PROMPT)。第一步是 echo "$PROMPT"
并查看它的设置。
搜索 zsh p9k
——我尝试过,因为你提到使用 zsh
并且你的提示设置充满了 p9k
次出现——结果是 https://github.com/Powerlevel9k/powerlevel9k, which in turn describes itself as obsoleted by https://github.com/romkatv/powerlevel10k. This has a very long description; scrolling approximately halfway down leads to the following (direct link here but this may be fragile over time):
What do different symbols in Git status mean?
When using Lean, Classic or Rainbow style, Git status may look like this:
feature:master ⇣42⇡42 ⇠42⇢42 *42 merge ~42 +42 !42 ?42
后跟所有可能符号的完整 table。您询问的两个星号 *
和感叹号 !
分别给出了 git stash
个条目和未暂存更改文件的计数。 table 还显示 where 这些 zsh 配置脚本 got 信息(来自 运行 git stash list
和 git status --ignore-submodules=dirty
, 分别).
(请注意,这与 iterm2 无关,仅与 Git 有关,因为各种 Git 命令是显示项目的来源。这个问题实际上是关于一些特定的zsh 脚本集。)
我是 Mac 用户并使用 Iterm2 和 zsh
当我打开 git 目录时
在我的分支名称旁边,有一个 特殊字符 和 数字
例如(我的终端)
~/projects/myProject | on git mybranch *1
~/projects/myProject | on git mybranch !1
(据我猜测,!1是我目录下的一个文件被修改了。)
我想知道*和!是什么意思以及数字的含义。
我在哪里可以找到关于这个特殊字符的信息?
我的提示:
${$((_p9k_on_expand()))+}${(e)_p9k_t[7]}${_p9k__1-${${:-${_p9k__d::=0}${_p9k__rprompt::=${_p9k__1r-${${:-${_p9k__bg::=NONE}${_p9k__i::=0}${_p9k__sss::=}}+}${${:-${P9K_CONTENT::=}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=8}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+10}}${_p9k__n:=11}${_p9k__v::="✔"}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1rstatus+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{236\}%F{070\}${${(M)_p9k__e:#11}:+ }$_p9k__v${${:-${_p9k__w::=%b%K{236\}%F{070\} %b%K{236\}%F{070\}}${_p9k__sss::=%b%K{236\}%F{070\} }${_p9k__i::=1}${_p9k__bg::=236}}+}}${${:-"${${(%):-%j}:#0}"}:+${${:-${P9K_CONTENT::=""}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=12}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+14}}${_p9k__n:=15}${_p9k__v::=}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1rbackground_jobs+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{236\}%F{037\}${${(M)_p9k__e:#11}:+ }$_p9k__v${${:-${_p9k__w::=%b%K{236\}%F{037\} %b%K{236\}%F{037\}}${_p9k__sss::=%b%K{236\}%F{037\} }${_p9k__i::=3}${_p9k__bg::=236}}+}}}${${:-"${${(%):-%#}:#\#}"}:+${${:-${P9K_CONTENT::=%n@%m}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=16}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+18}}${_p9k__n:=19}${_p9k__c::=}${_p9k__e::=${${_p9k__1rcontext+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}%246Fwith %b%K{236\}%F{180\}${_p9k__c}%b%K{236\}%F{180\}${${:-${_p9k__w::=%b%K{236\}%F{180\} %b%K{236\}%F{180\}}${_p9k__sss::=%b%K{236\}%F{180\} }${_p9k__i::=29}${_p9k__bg::=236}}+}}}${${:-"${${(%):-%#}:#\%}"}:+${${:-${P9K_CONTENT::=%B%n@%m}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=20}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+22}}${_p9k__n:=23}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1rcontext+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}%246Fwith %b%K{236\}%F{178\}${_p9k__c}%b%K{236\}%F{178\}${${:-${_p9k__w::=%b%K{236\}%F{178\} %b%K{236\}%F{178\}}${_p9k__sss::=%b%K{236\}%F{178\} }${_p9k__i::=29}${_p9k__bg::=236}}+}}}${${:-"${${:-$_p9k__keymap.$_p9k__zle_state}:#(vicmd.*|vivis.*|vivli.*|*.*insert*)}"}:+${${:-${P9K_CONTENT::=OVERTYPE}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=24}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+26}}${_p9k__n:=27}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{236\}%F{172\}${${:-${_p9k__w::=%b%K{236\}%F{172\} %b%K{236\}%F{172\}}${_p9k__sss::=%b%K{236\}%F{172\} }${_p9k__i::=36}${_p9k__bg::=236}}+}}}${${:-"${(M)${:-$_p9k__keymap$_p9k__region_active}:#vicmd0}"}:+${${:-${P9K_CONTENT::=NORMAL}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=28}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+30}}${_p9k__n:=31}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{236\}%F{106\}${${:-${_p9k__w::=%b%K{236\}%F{106\} %b%K{236\}%F{106\}}${_p9k__sss::=%b%K{236\}%F{106\} }${_p9k__i::=36}${_p9k__bg::=236}}+}}}${${:-"${(M)${:-$_p9k__keymap$_p9k__region_active}:#(vicmd1|vivis?|vivli?)}"}:+${${:-${P9K_CONTENT::=VISUAL}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=32}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+34}}${_p9k__n:=35}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{236\}%F{068\}${${:-${_p9k__w::=%b%K{236\}%F{068\} %b%K{236\}%F{068\}}${_p9k__sss::=%b%K{236\}%F{068\} }${_p9k__i::=36}${_p9k__bg::=236}}+}}}${${:-${P9K_CONTENT::=10:17:25}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=36}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(236|236)}:+38}}${_p9k__n:=39}${_p9k__v::=}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1rtime+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}%246Fat %b%K{236\}%F{066\}${_p9k__c}%b%K{236\}%F{066\}${${(M)_p9k__e:#11}:+ }$_p9k__v${${:-${_p9k__w::=%b%K{236\}%F{066\} %b%K{236\}%F{066\}}${_p9k__sss::=%b%K{236\}%F{066\} }${_p9k__i::=40}${_p9k__bg::=236}}+}}$_p9k__sss%b%k%f}}${_p9k__lprompt::=${_p9k__1l-${${:-${_p9k__bg::=NONE}${_p9k__i::=0}${_p9k__sss::=%f}}+}${${:-${P9K_CONTENT::=}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=40}}${_p9k__n:=${${(M)${:-x236}:#x($_p9k__bg|${_p9k__bg:-0})}:+42}}${_p9k__n:=43}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1los_icon+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${${_p9k_t[$_p9k__n]/<_p9k__ss>/$_p9k__ss}/<_p9k__s>/$_p9k__s}${_p9k__c}%b%K{236\}%F{255\} ${${:-${_p9k__s::=%F{236\}}${_p9k__ss::=%244F│}${_p9k__sss::=%F{236\}}${_p9k__i::=1}${_p9k__bg::=236}}+}}${${:-${P9K_CONTENT::="%{d%}${:-"%B%F{039}"}${(Q)${:-"\~"}}${:-"%b%K{236}%F{031}"}/${${${_p9k__d:#-*}:+WebstormProjects}:-${:-"%F{103}"}W${:-"%b%K{236}%F{031}"}${$((_p9k__d+=15))+}}/${${${_p9k__d:#-*}:+_personal}:-${:-"%F{103}"}_p${:-"%b%K{236}%F{031}"}${$((_p9k__d+=7))+}}/${:-"%B%F{039}"}react-app-practice${:-"%b%K{236}%F{031}"}%{d%}"}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=68}}${_p9k__n:=${${(M)${:-x236}:#x($_p9k__bg|${_p9k__bg:-0})}:+70}}${_p9k__n:=71}${_p9k__v::=}${_p9k__c::="${P9K_CONTENT}"}${_p9k__e::=${${_p9k__1ldir+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${${_p9k_t[$_p9k__n]/<_p9k__ss>/$_p9k__ss}/<_p9k__s>/$_p9k__s}${_p9k__v}${${(M)_p9k__e:#11}:+ }${_p9k__c}%b%K{236\}%F{031\} ${${:-${_p9k__s::=%F{236\}}${_p9k__ss::=%244F│}${_p9k__sss::=%F{236\}}${_p9k__i::=2}${_p9k__bg::=236}}+}}${(e)_p9k__vcs}%b%k$_p9k__sss%b%k%f${:-" %b%k%f"}}}}+}${(e)_p9k_t[6]}${${_p9k__h::=81.}+}${${_p9k__d::=$((_p9k__m-_p9k__h))}+}${_p9k__lprompt/\%\{d\%\}*\%\{d\%\}/${_p9k__1ldir-${:-"%B%F{039}"}${(Q)${:-"\~"}}${:-"%b%K{236}%F{031}"}/${${${_p9k__d:#-*}:+WebstormProjects}:-${:-"%F{103}"}W${:-"%b%K{236}%F{031}"}${$((_p9k__d+=15))+}}/${${${_p9k__d:#-*}:+_personal}:-${:-"%F{103}"}_p${:-"%b%K{236}%F{031}"}${$((_p9k__d+=7))+}}/${:-"%B%F{039}"}react-app-practice${:-"%b%K{236}%F{031}"}}}${${_p9k__m::=$((_p9k__d+_p9k__h))}+}}${${COLUMNS::=$_p9k__clm}+}
这是您的 shell 提示符(PS1 又名 PROMPT)。第一步是 echo "$PROMPT"
并查看它的设置。
搜索 zsh p9k
——我尝试过,因为你提到使用 zsh
并且你的提示设置充满了 p9k
次出现——结果是 https://github.com/Powerlevel9k/powerlevel9k, which in turn describes itself as obsoleted by https://github.com/romkatv/powerlevel10k. This has a very long description; scrolling approximately halfway down leads to the following (direct link here but this may be fragile over time):
What do different symbols in Git status mean?
When using Lean, Classic or Rainbow style, Git status may look like this:
feature:master ⇣42⇡42 ⇠42⇢42 *42 merge ~42 +42 !42 ?42
后跟所有可能符号的完整 table。您询问的两个星号 *
和感叹号 !
分别给出了 git stash
个条目和未暂存更改文件的计数。 table 还显示 where 这些 zsh 配置脚本 got 信息(来自 运行 git stash list
和 git status --ignore-submodules=dirty
, 分别).
(请注意,这与 iterm2 无关,仅与 Git 有关,因为各种 Git 命令是显示项目的来源。这个问题实际上是关于一些特定的zsh 脚本集。)