Starship/zh: Difference between revisions
No edit summary |
Created page with "=== 进阶 ===" Tags: Mobile edit Mobile web edit |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
[https://starship.rs/ Starship] 是一个快速、可自定义且极简的 shell 提示符。它使用 Rust 编写,显示当前目录、Git 状态、运行时版本等相关信息,并以极简配置适应上下文。它支持多种 shell,包括 [[Special:MyLanguage/Bash|Bash]]、[https://wiki.nixos.org/wiki/Zsh Zsh]、[https://wiki.nixos.org/wiki/Fish Fish]、PowerShell 以及其他许多 shell,并且您的配置将在所有这些 shell 中保持一致,其设计旨在提高速度和效率。 | [https://starship.rs/ Starship] 是一个快速、可自定义且极简的 shell 提示符。它使用 Rust 编写,显示当前目录、Git 状态、运行时版本等相关信息,并以极简配置适应上下文。它支持多种 shell,包括 [[Special:MyLanguage/Bash|Bash]]、[https://wiki.nixos.org/wiki/Zsh Zsh]、[https://wiki.nixos.org/wiki/Fish Fish]、PowerShell 以及其他许多 shell,并且您的配置将在所有这些 shell 中保持一致,其设计旨在提高速度和效率。 | ||
< | <span id="Installation"></span> | ||
== | == 安装 == | ||
< | <span id="Using_nix-shell"></span> | ||
=== | === 使用 nix-shell === | ||
<syntaxhighlight lang="bash" start="3"> | <syntaxhighlight lang="bash" start="3"> | ||
| Line 14: | Line 12: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
< | <span id="Using_Global_Configuration"></span> | ||
=== | === 使用全局配置 === | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
| Line 24: | Line 21: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
修改配置后,运行以下命令应用更改: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
| Line 41: | Line 36: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
配置更新完成后,运行以下命令应用更改: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
| Line 49: | Line 42: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
< | <span id="Configuration"></span> | ||
== | == 配置 == | ||
< | <span id="Basic"></span> | ||
=== | === 基础 === | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
| Line 83: | Line 74: | ||
如果您使用我刚才提到的其他 shell,请前往此 [https://starship.rs/guide/#step-2-set-up-your-shell-to-use-starship 页面] | 如果您使用我刚才提到的其他 shell,请前往此 [https://starship.rs/guide/#step-2-set-up-your-shell-to-use-starship 页面] | ||
< | <span id="Advanced"></span> | ||
=== | === 进阶 === | ||
你可以使用 Nix 自定义 Starship(这里有一个代码片段以供理解) | 你可以使用 Nix 自定义 Starship(这里有一个代码片段以供理解) | ||