1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-26 03:27:30 +00:00
starship/docs/zh-CN/installing
2021-05-01 14:20:08 -04:00
..
README.md docs(i18n): new Crowdin updates (#2634) 2021-05-01 14:20:08 -04:00

🚀 高级安装

安装Starship有以下两个步骤

  1. 下载 starship 的可执行文件
  2. 修改 shell 的初始化脚本,让 starship 显示命令提示符

大部分用户按照主页上的步骤安装即可, 但有一些特殊系统上的安装步骤不同。

There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!

Chocolatey

前置要求

按照 Chocolatey 安装页面上的步骤安装 Chocolatey。

安装

choco install starship

termux

前置要求

pkg install getconf

安装

sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin

Nix

Getting the Binary

Imperatively

nix-env -iA nixos.starship

Declarative, single user, via home-manager

Enable the programs.starship module in your home.nix file, and add your settings

{
  programs.starship = {
    enable = true;
    enableZshIntegration = true;
    # Configuration written to ~/.config/starship.toml
    settings = {
      # add_newline = false;

      # character = {
      #   success_symbol = "[➜](bold green)";
      #   error_symbol = "[➜](bold red)";
      # };

      # package.disabled = true;
    };
  };
}

then run

home-manager switch

Declarative, system-wide, with NixOS

Add pkgs.starship to environment.systemPackages in your configuration.nix, then run

sudo nixos-rebuild switch