[ci skip]
layout, hero, features, footer, metaTitle, description
| layout | hero | features | footer | metaTitle | description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| home |
|
|
Cấp phép bởi ISC | Bản quyền © 2019-nay Starship Contributors | Starship: Cross-Shell Prompt | Starship là prompt nhỏ, cực nhanh, và khả năng tuỳ biến mạnh mẽ cho bất kì shell nào! Hiển thị thông tin bạn cần, trong khi vẫn giữ cho đẹp và nhỏ gọn. Hỗ trợ cài đặt nhanh cho Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, và PowerShell. |
Yêu cầu
- Đã cài đặt một Nerd Font và được kích hoạt trong terminal của bạn.
Cài đặt nhanh chóng
-
Cài đặt starship nhị phân:
Cài đặt phiên bản cuối cùng
Với Shell:
curl -sS https://starship.rs/install.sh | shĐể cập nhật chính Starship, hãy chạy lại đoạn script bên trên. Nó sẽ thay thế phiên bản hiện tại mà không hề thay đổi gì những cài đặt của Starship trước đó.
Cài đặt thông qua Trình quản lí gói
Với Homebrew:
brew install starshipVới Winget:
winget install starship -
Thêm đoạn mã khởi tạo vào tệp tin cấu hình shell của bạn:
Bash
Thêm đoạn sau vào cuối tệp tin
~/.bashrc:# ~/.bashrc eval "$(starship init bash)"Fish
Thêm đoạn sau vào cuối tệp tin
~/.config/fish/config.fish:# ~/.config/fish/config.fish starship init fish | sourceZsh
Thêm đoạn sau vào cuối tệp tin
~/.zshrc:# ~/.zshrc eval "$(starship init zsh)"PowerShell
Add the following to the end of
Microsoft.PowerShell_profile.ps1. You can check the location of this file by querying the$PROFILEvariable in PowerShell. Typically the path is~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1or~/.config/powershell/Microsoft.PowerShell_profile.ps1on -Nix.Invoke-Expression (&starship init powershell)Ion
Thêm đoạn sau vào cuối tệp tin
~/.config/ion/initrc:# ~/.config/ion/initrc eval $(starship init ion)Elvish
[!CẢNH BÁO] Chỉ elvish v0.18 hoặc cao hơn được hỗ trợ.
Thêm các dòng sau vào cuối tệp
~/.config/elvish/rc.elv(%AppData%\elvish\rc.elvtrên Windows):# ~/.elvish/rc.elv eval (starship init elvish)Đối với các phiên bản elvish trước v0.21.0 tệp cấu hình có thể là
~/.elvish/rc.elvTcsh
Thêm đoạn sau vào cuối tệp tin
~/.tcshrc:# ~/.tcshrc eval `starship init tcsh`Nushell
[!WARNING]> This will change in the future.
Only Nushell v0.96+ is supported.
Thêm những dòng sau vào cuối tệp cấu hình Nushell (tìm bằng cách chạy
$nu.config-pathtrong Nushell):mkdir ($nu.data-dir | path join "vendor/autoload") starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")Xonsh
Thêm dòng này vào cuối của file
~/.xonshrc:# ~/.xonshrc execx($(starship init xonsh))Cmd
You need to use Clink (v1.2.30+) with Cmd. Add the following to a file
starship.luaand place this file in Clink scripts directory:-- starship.lua load(io.popen('starship init cmd'):read("*a"))()