兼容性优先
Starship 可以在常见的操作系统和 shell 上运行。 尝试着在各种地方使用它吧!
轻量、迅速、客制化的高颜值终端!
安装 starship 二进制文件:
使用 Shell 命令:
curl -sS https://starship.rs/install.sh | sh要更新 Starship ,运行上面的脚本 将会在不改动 Starship 配置文件的情况下升级版本
使用 Homebrew:
brew install starship使用 Winget:
winget install starship将初始化脚本添加到您的 shell 的配置文件中:
在 ~/.bashrc 的最后,添加以下内容:
# ~/.bashrc
eval "$(starship init bash)"在 ~/.config/fish/config.fish 的最后,添加以下内容:
# ~/.config/fish/config.fish
starship init fish | source在 ~/.zshrc 的最后,添加以下内容:
# ~/.zshrc
eval "$(starship init zsh)"将以下内容添加到 Microsoft.PowerShell_profile.ps1。 你可以在 PowerShell 通过 $PROFILE 变量来查询文件的位置。 对于 -Nix 来说,通常文件路径是 ~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 或 ~/.config/powershell/Microsoft.PowerShell_profile.ps1。
Invoke-Expression (&starship init powershell)在 ~/.config/ion/initrc 的最后,添加以下内容:
# ~/.config/ion/initrc
eval $(starship init ion)Only elvish v0.18 or higher is supported.
Add the following to the end of ~/.config/elvish/rc.elv (%AppData%\elvish\rc.elv on Windows):
# ~/.elvish/rc.elv
eval (starship init elvish)For elvish versions prior to v0.21.0 the config file might instead be ~/.elvish/rc.elv
在 ~/.tcshrc 的最后,添加以下内容:
# ~/.tcshrc
eval `starship init tcsh`This will change in the future. 仅支持 Nushell v0.96+。
将以下内容添加到你的 Nushell 配置文件的末尾(在 Nushell 中运行 $nu.config-path 可以找到该文件):
mkdir ($nu.data-dir | path join "vendor/autoload")
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")在 ~/.xonshrc 的最后,添加以下内容:
# ~/.xonshrc
execx($(starship init xonsh))您需要使用 Clink (v1.2.30+) 与 Cmd. 将以下文件添加到文件 starship.lua 中,并将此文件放置在 Clink脚本目录中:
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))()