Starship – Cross-shell prompt

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

网站 · 安装 · 配置

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

使用 iTerm 和 Snazz 主题的 Starship


  • 快: 很快 —— 真的真的非常快! 🚀
  • 定制化: 可定制各种各样的提示符。
  • 通用: 适用于任何 Shell、任何操作系统。
  • 智能: 一目了然地显示相关信息。
  • 功能丰富: 支持所有你喜欢的工具。
  • 易用: 安装快速 —— 几分钟就可上手。

Explore the Starship docs  ▶

# 🚀 安装

# 前置要求

# 开始安装

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 (opens new window).

  1. 安装 starship 二进制文件:

    # 安装最新版本

    # 下载预构建的二进制文件,使用 Shell 命令:
    sh -c "$(curl -fsSL"

    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 -c "$(curl -fsSL" -- --help

    # 通过软件包管理器安装

    # 使用 Homebrew (opens new window)
    brew install starship
    # 使用 Scoop (opens new window)
    scoop install starship
  2. 将初始化脚本添加到您的 shell 的配置文件:

    # Bash

    ~/.bashhrc 的最后,添加以下内容:

    # ~/.bashrc
    eval "$(starship init bash)"

    # Fish

    ~/.config/fish/ 的最后,添加以下内容:

    # ~/.config/fish/
    starship init fish | source

    # Zsh

    ~/.zshrc 的最后,添加以下内容:

    # ~/.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

    Invoke-Expression (&starship init powershell)

    # Ion

    ~/.config/ion/initrc 的最后,添加以下内容:

    # ~/.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:

    # ~/.elvish/rc.elv
    eval (starship init elvish)

    # Tcsh

    Add the following to the end of ~/.tcshrc:

    # ~/.tcshrc
    eval `starship init tcsh`

    # Xonsh

    Add the following to the end of ~/.xonshrc:

    # ~/.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.

    startup = [
     "mkdir ~/.cache/starship",
     "starship init nu | save ~/.cache/starship/",
     "source ~/.cache/starship/"
    prompt = "starship_prompt"

# 🤝 贡献

我们一直在寻找贡献者!你都可以参与贡献 ** 不论你的技能如何 **。 如果您希望快速为项目作出贡献,请尝试解决 good first issue (opens new window)

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 (opens new window).

如果您有兴趣贡献于 Starship,请查看我们的贡献指南 (opens new window)。 另外,你可以自由加入我们的 Discord 服务器 (opens new window) 。 👋

# 💭该项目受以下项目启发

Please check out these previous works that helped inspire the creation of starship. 🙏

Starship rocket icon

# 📝 License

Copyright © 2019-present, Starship Contributors (opens new window).
This project is ISC (opens new window) licensed.