Starship – Cross-shell prompt

GitHub Actions workflow status Crates.io version Packaging status
在 Discord 上聊天 All Contributors


網站 · 安裝 · 設定

English   日本語   繁體中文   Русский   Deutsch   简体中文   Español   Français

Starship 是一個可以用於任何 shell、極小、極快、可高度客製化的提示字元!
這個提示字元顯示你工作時需要的資訊,同時又順暢又不會打擾你。


Starship with iTerm2 and the Snazzy theme

## 🍬 特色 - 如果最近一個指令結束時回傳非零的代碼,提示字元將轉成紅色 - Current Elm version (`🌳`) - 現在的 Go 版本 (`🐹`) - Current Haskell version (`λ`) - 現在的 Java 版本 (`☕`) - 現在的 Node.js 版本 (`⬢`) - Current PHP version (`🐘`) - 現在的 Python 版本 (`🐍`) - 現在的 Ruby 版本 (`💎`) - 現在的 Rust 版本 (`🦀`) - Current .NET version (`•NET`) - Current Crystal version (`🔮`). - 現在資料夾中的組件 (package) 版本 (`📦`) - npm (Node.js) - cargo (Rust) - poetry (Python) - composer (PHP) - 現在的 Git branch 與豐富的程式庫 (repository) 狀態: - `=` — 修改衝突 - `⇡` — 超前遠端 (remote) branch - `⇣` — 落後遠端 (remote) branch - `⇕` — 修改發散 (diverge) - `?` — 修改未追蹤 - `$` — 隱藏的 (stashed) 修改 - `!` — 修改過的檔案 - `+` — 新增的檔案 - `»` — 重新命名的檔案 - `✘` — 刪除的檔案 - Current Mercurial branch - 現在的電池電量與狀態 - `⇡` – charging - `⇣` – discharging - `•` – fully charged - 標註背景執行的工作 (`✦`) - 現在的 Kubernetes 叢集以及名稱空間 (Namespace) (`☸`) - Current Amazon Web Services (AWS) profile (`☁️`) - Execution time of the last command - Custom environment variable value - 偵測 Nix-shell 的環境 - 會在使用者與登入的使用者不同時顯示使用者名稱 - Optional current time in 12/24hr format - Current Terraform Workspace and version (`💠`) - Current Conda environment (`C`) ## 🚀 安裝 ### 先決要求 - 一個已經安裝並在你的終端機內啟動的 [Powerline 字型](https://github.com/powerline/fonts) (例如,試試看 [Fira Code](https://github.com/tonsky/FiraCode))。 ### 入門 1. 安裝 **starship** 執行檔: #### Install Latest Version ##### From prebuilt binary, with Shell: ```sh curl -fsSL https://starship.rs/install.sh | bash ``` ##### From source on [crates.io](https://crates.io/): ```sh cargo install starship ``` #### Install via Package Manager ##### With [Homebrew](https://brew.sh/): ```sh brew install starship ``` ##### With [Scoop](https://scoop.sh): ```powershell scoop install starship ``` 1. 將初始化腳本 (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 將以下內容放到 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 的結尾 (或是在 -Nix 上的 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`): ```sh # ~\Documents\PowerShell\Profile.ps1 Invoke-Expression (&starship init powershell) ``` #### Ion Add the following to the end of `~/.config/ion/initrc`: ```sh # ~/.config/ion/initrc eval $(starship init ion) ``` ## 🔧 設定 關於如何設定 Starship,請看 [文件](https://starship.rs/zh-TW/config/) 。 ## 🤝 貢獻 我們歡迎具有**各式各樣能力**的貢獻者! 如果你正在尋找容易加入的方法,試試看標註為「[good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)」的 issue。 ### 高優先需求 - 👩‍💼 **專案管理員** - 我們有一個 GitHub 專案以及許多尚未整理/排序的功能,甚至還有點子尚未被製作成 issue。 Starship 需要有人掌管產品的方向! - 👩‍🎨 **設計師** - 喜歡製作吸睛的網站? 超讚! 我們正在想辦法建立一個漂亮的 landing page 來展示 Starship 的美妙。 幫助設計 Starship 的商標正好是一個試驗新點子的機會! - 👩‍💻 **Rust 開發者** - 當正在寫慣用的 Rust 程式碼、設計高效的 Rust 程式架構、效能優化、跨平台建置優化、以及其他很多東西時,可以在這裡看到_許多_唾手可得的東西! 我 ([@matchai](https://github.com/matchai)) 是一個 Rust 新手。 來為我們指出正確的方向吧! 如果你對貢獻 Starship 有興趣,請看我們的 [貢獻指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) 。 另外,請不用客氣加入我們的 [Discord 伺服器](https://discord.gg/8Jzqu3T) 並來問候一下。 👋 ### 貢獻者們 感謝這些優秀的人們 ([表情符號索引](https://allcontributors.org/docs/en/emoji-key)):

Matan Kushner

💻 🎨 🤔 🚇 🚧 👀 ⚠️

John Letey

💻 🤔 👀 ⚠️

Tim Mulqueen

💻 🤔 👀 ⚠️

Tiffany Le-Nguyen

🤔 🚧 👀 📖

​Snuggle

🎨 🤔 🚧 👀

Ryan Leckey

👀

Youssef Habri

💻 📖 ⚠️

Kevin Song

🐛 💻 📖 ⚠️

Andrew Dassonville

🐛 💻

MaT1g3R

💻 📖 ⚠️

André Zanellato

💻 📖 ⚠️

Saghm Rossi

💻 📖 ⚠️

Shu Kutsuzawa

💻 📖 ⚠️ 🌍

Saurav Sharma

💻 📖

Thomas O'Donnell

💻 ⚠️ 📖 👀

Bruno Bigras

💻 👀

Neil Kistner

💻 ⚠️ 👀

Quinn Strahl

💻 ⚠️

Titouan Vervack

💻 ⚠️

Francisco Lopes

💻

Andrew Houts

💻 📖 ⚠️

Nick Young

💻 📖 ⚠️ 👀

Gabriel de Perthuis

💻

Hofer-Julian

📖

Yuji Ueki

🖋 🌍

谢祯晖

💻 📖 🌍 👀

Kutsuzawa Ryo

👀 💻 ⚠️ 🌍

hdevalke

🤔

Kuba Clark

💻 📖 ⚠️

Gimbar

💻 ⚠️ 📖

Tom Hotston

💻 📖

Bijan Chokoufe Nejad

💻 ⚠️ 👀

yuri

💻 📖 ⚠️

TsubasaKawajiri

🌍

Ryo Yamashita

💻

Thomas Lee

💻

(´⌣`ʃƪ)

💻

Barnaby Keene

💻

Keith Wade

💻 ⚠️

LukeAI

📖

Zach Mertes

💻 📖 ⚠️

David Knaack

💻 📖 ⚠️

Carl Summers

📖

Yushan Lin

🌍

Weihang Lo

🌍

pinshan

🌍

Brian Low

💻 📖 ⚠️

Matias Kotlik

💻

marblenix

🚇 💻 ⚠️

Raidou

💻 ⚠️

Luca Greco

💻 📖 ⚠️

Luca Rinaldi

💻

Stephen Ball

💻 ⚠️ 📖

Qingping Hou

💻 📖 ⚠️

Dan Wendorf

💻 ⚠️

Alan Pope

🚇

BuggStream

💻 📖

Jon Grythe Stødle

💻 ⚠️

Jason Etcovitch

🐛

Etienne Mabille

💻

AppleTheGolden

💻 📖

Mike Sampson

💻 📖 ⚠️

Dominik Braun

💻

David Hewson

💻

Gennady Koshkin

🌍

Oleksii Filonenko

🌍

Artem Ivanov

🌍

Peter Bull

💻 ⚠️

Andrew Prokhorenkov

💻 📖 ⚠️

chirsz

🌍
這個專案遵守 [all-contributors](https://github.com/all-contributors/all-contributors) 規範。 歡迎任何種類的貢獻者! ## 💭 發想來自 請看之前這些幫助我們創造 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 的圖案提示字元。


Starship rocket icon

## 📝 許可 Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
這個專案使用 [ISC](https://github.com/starship/starship/blob/master/LICENSE) 許可。