7

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

username@MacBook-Air ~ %

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

我也无法使用命令行检查我的超级版本,见下文:

用户名@MacBook-Air ~ % hyper --version

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

用法:hyper [选项] [命令]

命令:

<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)

谢谢!

4

2 回答 2

7

百分号没有特定的含义

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

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

看看:谷歌:bash+zsh+prompt

于 2020-06-27T12:17:50.133 回答
2

在 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

于 2021-02-14T16:14:04.437 回答