Website · Installation · Configuration
**適合任何 shell 的最小、極速、無限客製化的提示字元!** - **Fast:** it's fast – _really really_ fast! 🚀 - **Customizable:** configure every aspect of your prompt. - **Universal:** works on any shell, on any operating system. - **Intelligent:** shows relevant information at a glance. - **Feature rich:** support for all your favorite tools. - **Easy:** quick to install – start using it in minutes. ## 🚀 安裝 ### 先決要求 - A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). ### 入門 **Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/). 1. 安裝 **starship** 執行檔: #### 安裝最新版本 ##### From prebuilt binary, with Shell: ```sh sh -c "$(curl -fsSL https://starship.rs/install.sh)" ``` 如果想更新已安裝的 Starship,請重新執行上述指令。 指令只會更新 Starship 執行檔本身,不會影響到任何已撰寫的設定檔。 **Note** - The defaults of the install script can be overridden see the built-in help. ```sh sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help ``` #### 使用套件管理器安裝: ##### Example: [Homebrew](https://brew.sh/): ```sh brew install starship ``` ##### 使用 [Scoop](https://scoop.sh): ```powershell scoop install starship ``` 2. 將初始化腳本 (script) 加入你的 shell 的設定檔: #### Bash 將以下內容放到 `~/.bashrc` 的結尾: ```sh # ~/.bashrc eval "$(starship init bash)" ``` #### Fish 將以下內容放到 `~/.config/fish/config.fish` 的結尾: ```sh # ~/.config/fish/config.fish starship init fish | source ``` #### Zsh 將以下內容放到 `~/.zshrc` 的結尾: ```sh # ~/.zshrc eval "$(starship init zsh)" ``` #### PowerShell 將以下內容放到 `Microsoft.PowerShell_profile.ps1` 的結尾。 你可以藉由在 PowerShell 查詢 `$PROFILE` 變數以取得這個檔案的位置。 一般來說檔案會出現在 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 或是在 -Nix 上的話會在 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。 ```powershell Invoke-Expression (&starship init powershell) ``` #### Ion 將以下內容放到 `~/.config/ion/initrc` 的結尾: ```sh # ~/.config/ion/initrc eval $(starship init ion) ``` #### Elvish **注意** 只支援 elvish v0.15 以上的版本。 將以下內容放到 `~/.elvish/rc.elv` 的結尾: ```sh # ~/.elvish/rc.elv eval (starship init elvish) ``` #### Tcsh 將以下內容放到 `~/.tcshrc` 的結尾: ```sh # ~/.tcshrc eval `starship init tcsh` ``` #### Nushell **Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu. ```toml startup = [ "mkdir ~/.cache/starship", "starship init nu | save ~/.cache/starship/init.nu", "source ~/.cache/starship/init.nu" ] prompt = "starship_prompt" ``` ## 🤝 貢獻 我們歡迎具有**各式各樣能力**的貢獻者! 如果你正在尋找容易加入的方法,試試看標註為「[good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)」的 issue。 If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/). 如果你對貢獻 Starship 有興趣,請看我們的 [貢獻指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) 。 另外,請不用客氣加入我們的 [Discord 伺服器](https://discord.gg/8Jzqu3T) 並來問候一下。 👋 ### 專案貢獻者 This project exists thanks to all the people who contribute. [[我要貢獻](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)] ### 專案資助者 成為專案資助者,推動社群永續經營 [[Contribute](https://opencollective.com/starship/contribute)] #### 個人 #### 組織 以組織名義資助專案 這裏會產生一個能連向您組織網站的連結標誌。 [[Contribute](https://opencollective.com/starship/contribute)] ## 💭 發想來自 請看之前這些幫助我們創造 Starship 的前任作品。 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - 給太空人的 ZSH 提示。 - **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - 使用 Javascript 撰寫的跨 shell robbyrussell 主題。 - **[reujab/silver](https://github.com/reujab/silver)** - 一個跨 shell、可客製化、像 powerline 的圖案提示字元。