2019-10-04 08:57:43 +00:00
|
|
|
---
|
|
|
|
home: true
|
|
|
|
heroImage: /logo.svg
|
2020-02-03 00:51:45 +00:00
|
|
|
heroText: null
|
|
|
|
tagline: The cross-shell prompt for astronauts
|
2019-10-21 14:42:08 +00:00
|
|
|
actionText: 入门 →
|
2020-02-03 00:51:45 +00:00
|
|
|
actionLink: ./guide/
|
2019-10-04 08:57:43 +00:00
|
|
|
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
|
|
|
---
|
|
|
|
|
|
|
|
<div class="features">
|
|
|
|
<div class="feature">
|
2019-10-21 14:42:08 +00:00
|
|
|
<h2>注重兼容性</h2>
|
|
|
|
<p>能在各种常见的 Shell 上运行。 尝试着在各种地方使用它吧!</p>
|
2019-10-04 08:57:43 +00:00
|
|
|
</div>
|
|
|
|
<div class="feature">
|
2019-10-21 14:42:08 +00:00
|
|
|
<h2>Rust 制造</h2>
|
|
|
|
<p>具有 Rust 独树一帜的速度与安全性。</p>
|
2019-10-04 08:57:43 +00:00
|
|
|
</div>
|
|
|
|
<div class="feature">
|
2019-10-21 14:42:08 +00:00
|
|
|
<h2>可自定义</h2>
|
|
|
|
<p>每个小细节都可以按您喜欢的自定义,不论是最小化以求速度,还是最大化以获得最完善的功能。</p>
|
2019-10-04 08:57:43 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="center">
|
2019-12-14 23:46:45 +00:00
|
|
|
<video class="demo-video" muted autoplay loop playsinline>
|
2019-10-04 08:57:43 +00:00
|
|
|
<source src="/demo.webm" type="video/webm">
|
|
|
|
<source src="/demo.mp4" type="video/mp4">
|
|
|
|
</video>
|
|
|
|
</div>
|
|
|
|
|
2019-10-21 14:42:08 +00:00
|
|
|
### 快速安装
|
2019-10-04 08:57:43 +00:00
|
|
|
|
2019-10-21 14:42:08 +00:00
|
|
|
1. 安装 **starship** 二进制文件:
|
2019-10-04 08:57:43 +00:00
|
|
|
|
|
|
|
|
2019-12-24 21:54:29 +00:00
|
|
|
#### Install Latest Version
|
2019-10-04 08:57:43 +00:00
|
|
|
|
2019-12-24 21:54:29 +00:00
|
|
|
With Shell:
|
2019-10-04 08:57:43 +00:00
|
|
|
|
|
|
|
```sh
|
2019-12-24 21:54:29 +00:00
|
|
|
curl -fsSL https://starship.rs/install.sh | bash
|
2019-10-04 08:57:43 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2019-12-24 21:54:29 +00:00
|
|
|
#### Install via Package Manager
|
2019-10-04 08:57:43 +00:00
|
|
|
|
2019-12-24 21:54:29 +00:00
|
|
|
With [Homebrew](https://brew.sh/):
|
2019-10-04 08:57:43 +00:00
|
|
|
|
|
|
|
```sh
|
2019-12-24 21:54:29 +00:00
|
|
|
brew install starship
|
2019-10-04 08:57:43 +00:00
|
|
|
```
|
|
|
|
|
2019-12-24 21:54:29 +00:00
|
|
|
With [Scoop](https://scoop.sh):
|
2019-10-04 08:57:43 +00:00
|
|
|
|
2019-12-24 21:54:29 +00:00
|
|
|
```powershell
|
|
|
|
scoop install starship
|
2019-10-04 08:57:43 +00:00
|
|
|
```
|
|
|
|
|
2019-10-21 14:42:08 +00:00
|
|
|
1. 将初始化脚本添加到您的 shell 的配置文件:
|
2019-10-04 08:57:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
#### Bash
|
|
|
|
|
2019-10-21 14:42:08 +00:00
|
|
|
在 `~/.bashhrc` 的最后,添加以下内容:
|
2019-10-04 08:57:43 +00:00
|
|
|
|
|
|
|
```sh
|
|
|
|
# ~/.bashrc
|
|
|
|
|
|
|
|
eval "$(starship init bash)"
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
#### Fish
|
|
|
|
|
2019-10-21 14:42:08 +00:00
|
|
|
在 `~/.config/fish/config.fish` 的最后,添加以下内容:
|
2019-10-04 08:57:43 +00:00
|
|
|
|
|
|
|
```sh
|
|
|
|
# ~/.config/fish/config.fish
|
|
|
|
|
2019-10-29 03:48:45 +00:00
|
|
|
starship init fish | source
|
2019-10-04 08:57:43 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
#### Zsh
|
|
|
|
|
2019-10-21 14:42:08 +00:00
|
|
|
在 `~/.zshrc` 的最后,添加以下内容:
|
2019-10-04 08:57:43 +00:00
|
|
|
|
|
|
|
```sh
|
|
|
|
# ~/.zshrc
|
|
|
|
|
|
|
|
eval "$(starship init zsh)"
|
|
|
|
```
|
2019-10-21 14:42:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
#### Powershell
|
|
|
|
|
|
|
|
添加 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (或者`~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix)到:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
# ~\Documents\PowerShell\Profile.ps1
|
2019-12-24 21:54:29 +00:00
|
|
|
|
2019-10-21 14:42:08 +00:00
|
|
|
Invoke-Expression (&starship init powershell)
|
|
|
|
```
|
2019-12-24 21:54:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
#### Ion
|
|
|
|
|
|
|
|
Add the following to the end of `~/.config/ion/initrc`:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
# ~/.config/ion/initrc
|
|
|
|
|
|
|
|
eval $(starship init ion)
|
|
|
|
```
|