命令提示符中的字符'!1'和'!2'

问题描述 投票:0回答:1

我正在使用Mac,它使用iTerm2,OhMyZsh和Powerlevel10k主题。我已经直接从Powerlevel10k文档中安装了推荐的字体,并根据文档更新了Terminal,iTerm2和VS Code中的字体设置,并且大多数情况下都可以运行,除了提示末尾总会有一些意外字符(通常!1或!2)。到目前为止,我在文档,论坛搜索或互联网搜索中都找不到任何帮助。

screenshot of prompt

任何提示都可以帮助我解决这个问题,即使是正确的搜索词可以帮助我找到答案,也将不胜感激。

fonts character command-prompt iterm2 oh-my-zsh
1个回答
0
投票

Powerlevel10k FAQ

Q:Git状态中的不同符号是什么意思?

使用LeanClassicRainbow样式时,Git状态可能看起来像这样:

feature:master ⇣42⇡42 ⇠42⇢42 *42 merge ~42 +42 !42 ?42

传奇:

| Symbol    | Meaning                                                              | Source                                                 |
| --------- | -------------------------------------------------------------------- | ------------------------------------------------------ |
| `feature` | current branch; replaced with `#tag` or `@commit` if not on a branch | `git status --ignore-submodules=dirty`                 |
| `master`  | remote tracking branch; only shown if different from local branch    | `git rev-parse --abbrev-ref --symbolic-full-name @{u}` |
| `⇣42`     | this many commits behind the remote                                  | `git status --ignore-submodules=dirty`                 |
| `⇡42`     | this many commits ahead of the remote                                | `git status --ignore-submodules=dirty`                 |
| `⇠42`     | this many commits behind the push remote                             | `git rev-list --left-right --count HEAD...@{push}`     |
| `⇢42`     | this many commits ahead of the push remote                           | `git rev-list --left-right --count HEAD...@{push}`     |
| `*42`     | this many stashes                                                    | `git stash list`                                       |
| `merge`   | repository state                                                     | `git status --ignore-submodules=dirty`                 |
| `~42`     | this many merge conflicts                                            | `git status --ignore-submodules=dirty`                 |
| `+42`     | this many staged changes                                             | `git status --ignore-submodules=dirty`                 |
| `!42`     | this many unstaged changes                                           | `git status --ignore-submodules=dirty`                 |
| `?42`     | this many untracked files                                            | `git status --ignore-submodules=dirty`                 |
| `─`       | the number of staged, unstaged or untracked files is unknown         | `echo $POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY` or `git config --get bash.showDirtyState` |

另请参见:How do I change the format of Git status?

© www.soinside.com 2019 - 2024. All rights reserved.