Starship
轻量、迅速、可无限定制提示的高颜值终端!
<img src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif" alt="使用 iTerm 和 Snazz 主题的 Starship" width="50%" align="right" />
轻量、迅速、可无限定制的高颜值终端!
从下面的列表中选择您的操作系统以查看安装指令:
使用下列软件包管理器安装Starship:
发行版 | 软件包来源 | 指令 |
---|---|---|
任意发行版 | crates.io | cargo install starship --locked |
FreeBSD | FreshPorts | pkg install starship |
NetBSD | pkgsrc | pkgin install starship |
安装最新版本:
curl -sS https://starship.rs/install.sh | sh
或者,使用以下任一软件包管理器安装Starship:
发行版 | 软件包来源 | 指令 |
---|---|---|
任意发行版 | crates.io | cargo install starship --locked |
任意发行版 | conda-forge | conda install -c conda-forge starship |
任意发行版 | Linuxbrew | brew install starship |
任意发行版 | Snapcraft | snap install starship |
Alpine Linux 3.13+ | Alpine Linux Packages | apk add starship |
Arch Linux | Arch Linux Community | pacman -S starship |
CentOS 7+ | Copr | dnf copr enable atim/starship dnf install starship |
Fedora 31+ | Fedora Packages | dnf install starship |
Gentoo | Gentoo Packages | emerge app-shells/starship |
Manjaro | pacman -S starship |
|
NixOS | nixpkgs | nix-env -iA nixpkgs.starship |
Void Linux | Void Linux Packages | xbps-install -S starship |
安装最新版本:
curl -sS https://starship.rs/install.sh | sh
或者,使用以下任一软件包管理器安装Starship:
软件包来源 | 指令 |
---|---|
crates.io | cargo install starship --locked |
conda-forge | conda install -c conda-forge starship |
Homebrew | brew install starship |
MacPorts | port install starship |
在 发布页 下载 MSI 包来安装最新版。
使用下列软件包管理器安装Starship:
软件包来源 | 指令 |
---|---|
crates.io | cargo install starship --locked |
Chocolatey | choco install starship |
conda-forge | conda install -c conda-forge starship |
Scoop | scoop install starship |
winget | winget install --id Starship.Starship |
配置你的终端来初始化 starship。 请从下面列表选择你的终端:
在 ~/.bashhrc
的最后,添加以下内容:
eval "$(starship init bash)"
您需要使用 Clink (v1.2.30+) 与 Cmd. 在路径 %LocalAppData%\clink\starship.lua
下创建文件,输入以下内容
load(io.popen('starship init cmd'):read("*a"))()
在 ~/.config/fish/rc.elv
的最后,添加以下内容:
eval (starship init elvish)
注意:仅支持 v0.18 及以上版本的 Elvish
在 ~/.config/fish/config.fish
的最后,添加以下内容:
starship init fish | source
在 ~/.config/ion/initrc
的最后,添加以下内容:
eval $(starship init ion)
在您的 Nushell 环境文件的最后(使用 $nu.env-path
来获取它的路径),添加以下内容:
mkdir ~/.cache/starship
starship init nu | save ~/.cache/starship/init.nu
然后在您的 Nushell 配置文件的最后(使用 $nu.config-path
来获取它的路径),添加以下内容:
source ~/.cache/starship/init.nu
注意:仅支持 Nushell v0.61+
将以下内容添加到您 PowerShell 配置文件的末尾(通过运行 $PROFILE
来获取配置文件的路径)
Invoke-Expression (&starship init powershell)
在 ~/.bashhrc
的最后,添加以下内容:
eval `starship init tcsh`
在 ~/.bashhrc
的最后,添加以下内容:
execx($(starship init xonsh))
在 ~/.zshrc
的最后,添加以下内容:
eval "$(starship init zsh)"
打开一个新的 Shell 实例,你应该就能看到漂亮的 Shell 新提示符了。 如果你对默认配置感到满意,就可以开始享用了!
如果你想进一步配置 Starship,查阅下列内容:
我们一直在寻找贡献者!不论你的技能如何你都可以参与贡献 。 如果您希望快速为项目作出贡献,请尝试解决 good first issue。
如果你能流利地使用非英语语种,我们非常感谢你帮助翻译我们的文件并将其更新到其他语言。 如果您想要帮助,可以在 Starship Crowdin 上贡献翻译。
如果您有兴趣贡献于 Starship,请查看我们的贡献指南。 另外,你可以自由加入我们的 Discord 服务器 。 👋
请参考这些曾经为 Starship 提供启发的工程。 🙏
版权所有 © 2019 至今, Starship 贡献者.
此项目使用 ISC 许可.