Starship – Cross-shell prompt

GitHub Actions workflow status Crates.io version Packaging status
加入 Discord Follow @StarshipPrompt on Twitter

网站 · 安装 · 配置

English   日本語   繁體中文   Русский   Deutsch   简体中文   Español   Français   Tiếng Việt

使用 iTerm 和 Snazz 主题的 Starship **轻量级、反应迅速,可定制的高颜值终端!** - **快:** 很快 —— 真的真的非常快! 🚀 - **定制化:** 可定制各种各样的提示符。 - **通用:** 适用于任何 Shell、任何操作系统。 - **智能:** 一目了然地显示相关信息。 - **功能丰富:** 支持所有你喜欢的工具。 - **易用:** 安装快速 —— 几分钟就可上手。

Explore the Starship docs  ▶

## 🚀 安装 ### 前置要求 - 安装一个 [Nerd Font](https://www.nerdfonts.com/) 的字体,并在终端启用(例如,可以尝试使用 [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads) 字体)。 ### 开始安装 **Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/). 1. 安装 **starship** 二进制文件: #### 安装最新版本 ##### 下载预构建的二进制文件,使用 Shell 命令: ```sh sh -c "$(curl -fsSL https://starship.rs/install.sh)" ``` To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration. **Note** - The defaults of the install script can be overridden see the built-in help. ```sh sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help ``` #### 通过软件包管理器安装 ##### Example: [Homebrew](https://brew.sh/): ```sh brew install starship ``` ##### 使用 [Scoop](https://scoop.sh): ```powershell scoop install starship ``` 2. 将初始化脚本添加到您的 shell 的配置文件: #### Bash 在 `~/.bashhrc` 的最后,添加以下内容: ```sh # ~/.bashrc eval "$(starship init bash)" ``` #### Fish 在 `~/.config/fish/config.fish` 的最后,添加以下内容: ```sh # ~/.config/fish/config.fish starship init fish | source ``` #### Zsh 在 `~/.zshrc` 的最后,添加以下内容: ```sh # ~/.zshrc eval "$(starship init zsh)" ``` #### PowerShell 将以下内容添加到 `Microsoft.PowerShell_profile.ps1`。 你可以在 PowerShell 通过 `$PROFILE` 变量来查询文件的位置。 对于 -Nix 来说,通常文件路径是 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 或 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。 ```powershell Invoke-Expression (&starship init powershell) ``` #### Ion 在 `~/.config/ion/initrc` 的最后,添加以下内容: ```sh # ~/.config/ion/initrc eval $(starship init ion) ``` #### Elvish **Warning** Only elvish v0.15 or higher is supported. Add the following to the end of `~/.elvish/rc.elv`: ```sh # ~/.elvish/rc.elv eval (starship init elvish) ``` #### Tcsh Add the following to the end of `~/.tcshrc`: ```sh # ~/.tcshrc eval `starship init tcsh` ``` #### Xonsh Add the following to the end of `~/.xonshrc`: ```sh # ~/.xonshrc execx($(starship init xonsh)) ``` #### Nushell **Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu. ```toml startup = [ "mkdir ~/.cache/starship", "starship init nu | save ~/.cache/starship/init.nu", "source ~/.cache/starship/init.nu" ] prompt = "starship_prompt" ``` ## 🤝 贡献 我们一直在寻找贡献者!你都可以参与贡献 ** 不论你的技能如何 **。 如果您希望快速为项目作出贡献,请尝试解决 [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)。 If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/). 如果您有兴趣贡献于 Starship,请查看我们的[贡献指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)。 另外,你可以自由加入我们的 [Discord 服务器](https://discord.gg/8Jzqu3T) 。 👋 ### 代码贡献者 这个项目的存在要感谢所有贡献者。 [[贡献说明](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)] ### 项目资助者 成为项目资助者,并帮助我们维持我们的社区。 [[成为项目资助者](https://opencollective.com/starship/contribute)] #### 资助人 #### 资助组织 与您的组织一起支持该项目。 您的组织的徽标将显示在此处,并带有指向您的组织的网站的链接。 [[成为项目资助者](https://opencollective.com/starship/contribute)] ## 💭该项目受以下项目启发 请参考这些曾经为 Starship 提供启发的工程。 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. - **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript. - **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons.


Starship rocket icon

## 📝 License Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.