1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-16 10:05:13 +00:00
starship/docs/zh-CN/guide/README.md

271 lines
9.2 KiB
Markdown
Raw Normal View History

<p align="center">
<img
width="400"
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
alt="Starship Cross-shell prompt" />
</p>
<p align="center">
<a href="https://github.com/starship/starship/actions"
><img
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
alt="GitHub Actions workflow status" /></a>
<a href="https://crates.io/crates/starship"
><img
src="https://img.shields.io/crates/v/starship?style=flat-square"
alt="Crates.io version" /></a>
<a href="https://repology.org/project/starship/versions"
><img
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
alt="Packaging status" /></a
><br />
<a href="https://discord.gg/8Jzqu3T"
><img
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
alt="加入 Discord" /></a>
<a href="https://twitter.com/StarshipPrompt"
><img
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Follow @StarshipPrompt on Twitter" /></a>
</p>
<p align="center">
<a href="https://starship.rs">网站</a>
·
<a href="#🚀-installation">安装</a>
·
<a href="https://starship.rs/config/">配置</a>
</p>
<p align="center">
<a href="https://github.com/starship/starship/blob/master/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
alt="English" /></a>
2019-12-06 22:07:57 +00:00
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
alt="日本語" /></a>
2019-12-06 22:07:57 +00:00
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
alt="繁體中文" /></a>
2019-12-06 22:07:57 +00:00
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
alt="Русский" /></a>
2020-01-21 16:15:25 +00:00
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
alt="Deutsch" /></a>
2020-01-23 16:27:26 +00:00
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
alt="简体中文" /></a>
2019-12-06 22:07:57 +00:00
&nbsp;
<a href="https://translate.starship.rs/project/starship-prompt/es"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
alt="Español" /></a>
&nbsp;
<a href="https://translate.starship.rs/project/starship-prompt/fr"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
alt="Français" /></a>
</p>
<h1></h1>
<img
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
alt="使用 iTerm 和 Snazz 主题的 Starship"
width="50%"
align="right" />
**The minimal, blazing-fast, and infinitely customizable prompt for any 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.
<p align="center">
<a href="https://starship.rs/config/"><strong>Explore the Starship docs&nbsp;&nbsp;</strong></a>
</p>
<a name="🚀-installation"></a>
## 🚀 安装
2020-02-04 17:11:36 +00:00
### 前置要求
- 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)).
2020-02-04 17:11:36 +00:00
### 开始安装
1. 安装 **starship** 二进制文件:
2020-02-04 17:11:36 +00:00
#### 安装最新版本
2020-02-04 17:11:36 +00:00
##### 下载预构建的二进制文件,使用 Shell 命令:
```sh
curl -fsSL https://starship.rs/install.sh | bash
```
2020-02-04 17:11:36 +00:00
##### 直接从 [crates.io](https://crates.io/) 获取源代码编译:
```sh
cargo install starship
```
2020-02-04 17:11:36 +00:00
#### 通过软件包管理器安装
2020-02-04 17:11:36 +00:00
##### 使用 [Homebrew](https://brew.sh/)
```sh
2019-12-06 22:07:57 +00:00
brew install starship
```
2020-02-04 17:11:36 +00:00
##### 使用 [Scoop](https://scoop.sh)
2019-12-06 22:07:57 +00:00
```powershell
scoop install starship
```
1. 将初始化脚本添加到您的 shell 的配置文件:
#### Bash
`~/.bashhrc` 的最后,添加以下内容:
```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)"
```
2019-12-24 21:54:29 +00:00
#### PowerShell
2020-02-04 17:11:36 +00:00
将以下内容添加到`~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (或`~/.config/powershell/Microsoft.PowerShell_profile.ps1`,对于 *nix 系统)
```sh
Invoke-Expression (&starship init powershell)
```
#### Ion
2020-02-04 17:11:36 +00:00
`~/.config/ion/initrc` 的最后,添加以下内容:
```sh
# ~/.config/ion/initrc
eval $(starship init ion)
```
## 🤝 贡献
我们一直在寻找贡献者!你都可以参与贡献 ** 不论你的技能如何 **。 如果您希望快速为项目作出贡献,请尝试解决 [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)。
如果您有兴趣贡献于 Starship请查看我们的[贡献指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)。 另外,你可以自由加入我们的 [Discord 服务器](https://discord.gg/8Jzqu3T) 。 👋
### Code Contributors
This project exists thanks to all the people who contribute. [[Contribute](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)].
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
#### Individuals
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
#### Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/2/website"><img src="https://opencollective.com/starship/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/3/website"><img src="https://opencollective.com/starship/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/4/website"><img src="https://opencollective.com/starship/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/5/website"><img src="https://opencollective.com/starship/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/6/website"><img src="https://opencollective.com/starship/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/7/website"><img src="https://opencollective.com/starship/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/8/website"><img src="https://opencollective.com/starship/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/starship/organization/9/website"><img src="https://opencollective.com/starship/organization/9/avatar.svg"></a>
## 💭该项目受以下项目启发
请参考这些曾经为 Starship 提供启发的工程。 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<br>
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
</p>
## 📝 License
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.