starship 安装

安装

  1. 安装

    # APT
    sudo apt install starship
    # Homebrew
    brew install starship
    # Pacman
    pacman -S starship
    # Cargo
    cargo install starship --locked
    # WinGet
    winget install --id Starship.Starship
    # Other
    curl -sS https://starship.rs/install.sh | sh
    
  2. 启动:

    # Bash
    eval "$(starship init bash)"
    # Zsh
    eval "$(starship init zsh)"
    # PowerShell ($PROFILE)
    Invoke-Expression (&starship init powershell)
    

参考:Starship

配置

vim ~/.config/starship.toml
# 根据配置模式获取编辑器自动补全
"$schema" = 'https://starship.rs/config-schema.json'

# 在 shell 提示符之间插入一个空行
add_newline = true

[character]
success_symbol = '[➜](bold green)'  # 将提示符中的“❯”替换为“➜”

[package]
disabled = true

参见:Presets

posted @ 2025-08-03 23:16  Undefined443  阅读(25)  评论(0)    收藏  举报