1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-29 04:23:26 +00:00
starship/docs/zh-CN/guide
2021-12-20 16:05:59 -05:00
..
README.md docs(i18n): new Crowdin updates (#3218) 2021-12-20 16:05:59 -05:00

Starship – Cross-shell prompt

GitHub Actions workflow status Crates.io 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.

  1. 安装 starship 二进制文件:

    安装最新版本

    下载预构建的二进制文件,使用 Shell 命令:
    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 -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
    

    通过软件包管理器安装

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

    Bash

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

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

    Fish

    ~/.config/fish/config.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/init.nu",
     "source ~/.cache/starship/init.nu"
    ]
    prompt = "starship_prompt"
    

🤝 贡献

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

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.

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

💭该项目受以下项目启发

请参考这些曾经为 Starship 提供启发的工程。 🙏


Starship rocket icon

📝 License

Copyright © 2019-present, Starship Contributors.
This project is ISC licensed.