Starship/zh: Difference between revisions

Ardenet (talk | contribs)
Created page with "由于我们无法包含 Starship 上的每个选项,因此这里有一个 GitHub 链接 <noinclude> [https://gist.github.com/s-a-c/0e44dc7766922308924812d4c019b109#file-starship-nix/ 包含每个配置选项] </noinclude> 这里有官方文档来解释每个选项, [https://starship.rs/config/ Starship 配置指南]"
Ardenet (talk | contribs)
Created page with "[https://starship.rs/ Starship] 是一个快速、可自定义且极简的 shell 提示符。它使用 Rust 编写,显示当前目录、Git 状态、运行时版本等相关信息,并以极简配置适应上下文。它支持多种 shell,包括 Bash、[https://wiki.nixos.org/wiki/Zsh Zsh]、[https://wiki.nixos.org/wiki/Fish Fish]、PowerShell 以及其他许多 shell,并且您的配置将在所有这些 shell 中保持一致,其设..."
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>
<div lang="en" dir="ltr" class="mw-content-ltr">
[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] is a fast, customizable, and minimal prompt for any shell. It is written in Rust and displays relevant information like the current directory, Git status, runtime versions, and more, adapting to the context with minimal configuration. It supports multiple shells, including [[Bash]], [https://wiki.nixos.org/wiki/Zsh Zsh], [https://wiki.nixos.org/wiki/Fish Fish], PowerShell and a lot of other shells, and your configuration will stay persistent across all these shells and is designed for speed and efficiency.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Line 63: Line 61:
</syntaxhighlight>
</syntaxhighlight>


<div lang="en" dir="ltr" class="mw-content-ltr">
安装 Starship 后,你需要在 shell 中执行 source 命令
after you have installed Starship you need to source it in your shell
</div>


Bash:
Bash:
Line 91: Line 87:
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
你可以使用 Nix 自定义 Starship(这里有一个代码片段以供理解)
you can customize Starship with Nix (here's a snippet to understand)
<nowiki>:</nowiki>
<nowiki>:</nowiki>
</div>


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">