超级终端显示 ~% 而不是 $



重新启动在MacOS Catalina 10.15.3上运行的Mac后,Hyper显示

username@MacBook-Air ~ %

而不是常规的 $。为什么会这样,百分比符号是什么意思?

我也无法使用命令行检查我的 hyper 版本,请参见下文:

username@MacBook-空气~%超--版本

选项"版本"未知。以下是所有可用选项的列表:

用法: 超级 [选项] [命令]

命令:

<default>                    Launch Hyper
d, docs, h, home             Open the npm page of a plugin
help                         Display help
i, install                   Install a plugin
ls, list                     List installed plugins
lsr, list-remote, ls-remote  List plugins available on npm
s, search                    Search for plugins on npm
u, uninstall, rm, remove     Uninstall a plugin
version                      Show the version of hyper

选项:

-h, --help     Output usage information
-v, --verbose  Verbose mode (disabled by default)

谢谢!

百分号没有特定的含义

它与超级终端没有太大关系,但与您使用的shell(bash或zsh(有关。

通常 bash 使用$,而 zsh 使用%

看看: 谷歌: bash+zsh+prompt

在 medium.com 的文章"自定义 MacOS 终端"中找到了这个答案:

"截至2019年,macOS Catalina已采用Z Shell(简称zsh(作为默认登录shell。Z Shell是一个Unix shell,充当shell脚本的交互式登录shell和命令行解释器。

https://medium.com/dev-genius/customize-the-macos-terminal-zsh-4cb387e4f447

最新更新