mirror of
https://github.com/starship/starship.git
synced 2024-11-07 08:54:50 +01:00
docs(i18n): new Crowdin updates (#3085)
* New translations README.md (French) * New translations README.md (Korean) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Arabic) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Russian) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Turkish) * New translations README.md (Arabic) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Traditional) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Indonesian) * New translations README.md (German) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (German) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Japanese) * New translations README.md (German) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (German) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Spanish) * New translations README.md (Arabic) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Portuguese) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Russian) * New translations README.md (Turkish) * New translations README.md (Chinese Simplified) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Indonesian) * New translations README.md (French) * New translations README.md (Russian) * New translations README.md (Indonesian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Korean) * New translations README.md (French) * New translations README.md (Japanese) * New translations README.md (Spanish) * New translations README.md (Arabic) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Chinese Traditional) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Russian) * New translations README.md (Turkish) * New translations README.md (Chinese Simplified) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Indonesian) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Indonesian) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (Japanese)
This commit is contained in:
parent
b3fe17caf4
commit
7526e20eb4
@ -3,17 +3,17 @@ home: true
|
||||
heroImage: /logo.svg
|
||||
heroText:
|
||||
tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell!
|
||||
actionText: Get Started →
|
||||
actionText: البدء مع Starship ←
|
||||
actionLink: ./guide/
|
||||
features:
|
||||
-
|
||||
title: Compatibility First
|
||||
details: Works on the most common shells on the most common operating systems. Use it everywhere!
|
||||
title: التوافق أولاً
|
||||
details: يعمل على أكثر موجهات الأوامر شيوعاً في أكثر نظم التشغيل شيوعاً. استخدمه في كل مكان!
|
||||
-
|
||||
title: Rust-Powered
|
||||
details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible.
|
||||
-
|
||||
title: Customizable
|
||||
title: قابل للتخصيص
|
||||
details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be.
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
@ -28,45 +28,45 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
</video>
|
||||
</div>
|
||||
|
||||
### Prerequisites
|
||||
### المتطلبات الأساسية
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
- تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في موجه الأوامر الخاصة بك.
|
||||
|
||||
### Quick Install
|
||||
### تثبيت سريع
|
||||
|
||||
1. Install the **starship** binary:
|
||||
1. تثبيت **starship**:
|
||||
|
||||
|
||||
#### Install Latest Version
|
||||
#### تثبيت أحدث إصدار
|
||||
|
||||
With Shell:
|
||||
بإستخدام Shell:
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
لتحديث Starship نفسه، أعد تشغيل البرنامج النصي أعلاه. سيتم استبدال الإصدار الحالي بدون لمس تكوين Starship.
|
||||
|
||||
|
||||
#### Install via Package Manager
|
||||
#### التثبيت عبر مدير الحزم
|
||||
|
||||
With [Homebrew](https://brew.sh/):
|
||||
بإستخدام [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
|
||||
With [Scoop](https://scoop.sh):
|
||||
بإستخدام [Scoop](https://scoop.sh):
|
||||
|
||||
```powershell
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
1. Add the init script to your shell's config file:
|
||||
1. أضف البرنامج النصي إلى ملف تهيئة موجه الأوامر:
|
||||
|
||||
|
||||
#### Bash
|
||||
|
||||
Add the following to the end of `~/.bashrc`:
|
||||
أضف ما يلي إلى نهاية `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
@ -77,7 +77,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Fish
|
||||
|
||||
Add the following to the end of `~/.config/fish/config.fish`:
|
||||
أضف ما يلي إلى نهاية `~/.config/fish/config.fish`:
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
@ -88,7 +88,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Zsh
|
||||
|
||||
Add the following to the end of `~/.zshrc`:
|
||||
أضف ما يلي إلى نهاية `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
@ -108,7 +108,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Ion
|
||||
|
||||
Add the following to the end of `~/.config/ion/initrc`:
|
||||
أضف ما يلي إلى نهاية `~/.config/ion/initrc`:
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
@ -119,9 +119,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning Only elvish v0.15 or higher is supported. :::
|
||||
::: تحذير يدعم فقط elvish v0.15 أو أعلى. :::
|
||||
|
||||
Add the following to the end of `~/.elvish/rc.elv`:
|
||||
أضف ما يلي إلى نهاية `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
@ -132,7 +132,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
أضف ما يلي إلى نهاية `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
@ -143,7 +143,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### 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.
|
||||
::: تحذير هذا سوف يتغير في المستقبل. فقط إصدار nu v0.33 أو أعلى مدعوم. ::: أضف ما يلي إلى ملف تكوين nu الخاص بك. يمكنك التحقق من موقع هذا الملف عن طريق تشغيل `config path` في nu.
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
@ -157,7 +157,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
أضف ما يلي إلى نهاية `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship.
|
||||
|
||||
::: warning
|
||||
::: تحذير
|
||||
|
||||
The configurations in this section are subject to change in future releases of Starship.
|
||||
|
||||
@ -31,6 +31,18 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
@ -68,6 +80,17 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
@ -76,7 +99,7 @@ Note: The right prompt is a single line following the input location. To right a
|
||||
|
||||
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||
|
||||
### Example
|
||||
### مثال
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -56,10 +56,36 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
@ -15,7 +15,7 @@
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io version"
|
||||
alt="إصدار Crates.io"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
@ -25,21 +25,21 @@
|
||||
<a href="https://discord.gg/starship"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="Chat on Discord"
|
||||
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"
|
||||
alt="تابع @StarshipPrompt على تويتر"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs">Website</a>
|
||||
<a href="https://starship.rs">الموقع</a>
|
||||
·
|
||||
<a href="#🚀-installation">Installation</a>
|
||||
<a href="#🚀-installation">التثبيت</a>
|
||||
·
|
||||
<a href="https://starship.rs/config/">Configuration</a>
|
||||
<a href="https://starship.rs/config/">الإعدادات</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -134,33 +134,33 @@
|
||||
|
||||
**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 ▶</strong></a>
|
||||
<a href="https://starship.rs/config/"><strong>تصفّح مستندات Starship ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
||||
## 🚀 Installation
|
||||
## 🚀 التثبيت
|
||||
|
||||
### Prerequisites
|
||||
### المتطلبات الأساسية
|
||||
|
||||
- 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)).
|
||||
- تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في موجه الأوامر الخاصة بك (على سبيل المثال، جرب [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
|
||||
|
||||
### Getting Started
|
||||
### البدء مع Starship
|
||||
|
||||
**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. Install the **starship** binary:
|
||||
|
||||
|
||||
#### Install Latest Version
|
||||
#### تثبيت أحدث إصدار
|
||||
|
||||
|
||||
##### From prebuilt binary, with Shell:
|
||||
@ -169,37 +169,37 @@
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
لتحديث 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
|
||||
```
|
||||
|
||||
|
||||
#### Install via Package Manager
|
||||
#### التثبيت عبر مدير الحزم
|
||||
|
||||
|
||||
##### Example: [Homebrew](https://brew.sh/):
|
||||
##### بإستخدام [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
|
||||
|
||||
##### With [Scoop](https://scoop.sh):
|
||||
##### بإستخدام [Scoop](https://scoop.sh):
|
||||
|
||||
```powershell
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
2. Add the init script to your shell's config file:
|
||||
2. أضف ما يلي إلى ملف تكوين موجه الأوامر الخاص بك:
|
||||
|
||||
|
||||
#### Bash
|
||||
|
||||
Add the following to the end of `~/.bashrc`:
|
||||
أضف ما يلي إلى نهاية `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
@ -210,7 +210,7 @@
|
||||
|
||||
#### Fish
|
||||
|
||||
Add the following to the end of `~/.config/fish/config.fish`:
|
||||
أضف ما يلي إلى نهاية `~/.config/fish/config.fish`:
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
@ -221,7 +221,7 @@
|
||||
|
||||
#### Zsh
|
||||
|
||||
Add the following to the end of `~/.zshrc`:
|
||||
أضف ما يلي إلى نهاية `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
@ -241,7 +241,7 @@
|
||||
|
||||
#### Ion
|
||||
|
||||
Add the following to the end of `~/.config/ion/initrc`:
|
||||
أضف ما يلي إلى نهاية `~/.config/ion/initrc`:
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
@ -252,7 +252,7 @@
|
||||
|
||||
#### Elvish
|
||||
|
||||
**Warning** Only elvish v0.15 or higher is supported. Add the following to the end of `~/.elvish/rc.elv`:
|
||||
**تحذير** يدعم فقط v0.15 أو أعلى. أضف ما يلي إلى نهاية `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
@ -263,7 +263,7 @@
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
أضف ما يلي إلى نهاية `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
@ -274,7 +274,7 @@
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
أضف ما يلي إلى نهاية `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
@ -285,7 +285,7 @@
|
||||
|
||||
#### 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.
|
||||
**تحذير** هذا سوف يتغير في المستقبل. فقط إصدار nu v0.33 أو أعلى مدعوم. أضف ما يلي إلى ملف تكوين nu الخاص بك. يمكنك التحقق من موقع هذا الملف عن طريق تشغيل `config path` في nu.
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
@ -296,43 +296,15 @@
|
||||
prompt = "starship_prompt"
|
||||
```
|
||||
|
||||
## 🤝 Contributing
|
||||
## 🤝 المساهمة
|
||||
|
||||
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
|
||||
نبحث دائماً عن مساهمين من **جميع المستويات**! إذا كنت تتطلع إلى تسهيل طريقك إلى المشروع، جرب [إنشاء اول مشكلة](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
|
||||
|
||||
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 Crowdin](https://translate.starship.rs/).
|
||||
|
||||
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
|
||||
إذا كنت مهتما بالمساهمة في 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>
|
||||
|
||||
## 💭 Inspired By
|
||||
## 💭 مستوحاة من قبل
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
||||
@ -347,6 +319,6 @@ Please check out these previous works that helped inspire the creation of starsh
|
||||
<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.
|
||||
|
@ -1,4 +1,4 @@
|
||||
# 🚀 Advanced Installation
|
||||
# 🚀 التثبيت المتقدم
|
||||
|
||||
To install starship, you need to do two things:
|
||||
|
||||
@ -11,7 +11,7 @@ There are so many platforms out there that they didn't fit into the main README.
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Prerequisites
|
||||
### المتطلبات الأساسية
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
@ -23,7 +23,7 @@ choco install starship
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Prerequisites
|
||||
### المتطلبات الأساسية
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
@ -35,6 +35,16 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Installation
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
|
@ -8,7 +8,7 @@ This preset doesn't change anything except for the symbols used for each module.
|
||||
|
||||
![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png)
|
||||
|
||||
### Prerequisites
|
||||
### المتطلبات الأساسية
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
||||
|
||||
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
![Screenshot of Pure preset](/presets/pure-prompt.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -1,16 +1,16 @@
|
||||
# ڕێکخستنی پێشکەوتوو
|
||||
|
||||
While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship.
|
||||
لەگەڵ ئەوەی Starship شێڵێکە بەکارهێنانی زۆرە، هەندێک جار دەسکاری کردنی `starship.toml` بەس نییە بۆ ئەوەی وای لێبکەی هەندێک شتی دیاریکراو ئەنجام بدات. ئەم پەڕەیە ووردەکاری زیاتر ئەدات لەسەر هەندێک لە شێوازە ڕێکخستنە پێشکەوتووترەکان کە لە Starshipـدا بەکارهاتووە.
|
||||
|
||||
::: warning
|
||||
::: ئاگادارکردنەوە
|
||||
|
||||
The configurations in this section are subject to change in future releases of Starship.
|
||||
ڕێکخستنەکانی ئەم بەشە شایەنی گۆڕانن لە وەشانەکانی داهاتووی Starshipدا.
|
||||
|
||||
:::
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Bash
|
||||
## فرمانە کڕیاڕخوازەکانی pre-prompt و pre-execution لە Bashـدا
|
||||
|
||||
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
بەپێچەوانەی شێلەکانی دیکە Bash هیچ چوارچێوەیەکی فەرمی preexec/precmdـی نییە. لەبەر ئەوە، دابین کردنی قولابە تەواو کڕیارخوازکراوەکان ئاسان نییە لە `Bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
|
||||
|
||||
@ -31,6 +31,18 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
@ -68,6 +80,17 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
@ -76,7 +99,7 @@ Note: The right prompt is a single line following the input location. To right a
|
||||
|
||||
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||
|
||||
### Example
|
||||
### نموونە
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
@ -99,15 +122,15 @@ Produces a prompt like the following:
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `تۆخ`
|
||||
- `لار`
|
||||
- `بنهێڵ`
|
||||
- `کاڵ کراو`
|
||||
- `پێچەوانە کراو`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
- `هیچ`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
# Configuration
|
||||
# ڕێکخستن
|
||||
|
||||
To get started configuring starship, create the following file: `~/.config/starship.toml`.
|
||||
بۆ دەسکردن بە ڕێکخستنی Starship، پەڕگەیەک دروست بکە بەم جۆرە: `~/.config/starship.toml`.
|
||||
|
||||
```sh
|
||||
mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
```
|
||||
|
||||
All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
|
||||
هەموو ڕێکخستنەکان بۆ Starship ئەنجام ئەدرێن لەم پەڕگەی [TOML](https://github.com/toml-lang/toml)ـەدا:
|
||||
|
||||
```toml
|
||||
# Inserts a blank line between shell prompts
|
||||
@ -59,17 +59,17 @@ By convention, most modules have a prefix of default terminal color (e.g. `via`
|
||||
|
||||
Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string.
|
||||
|
||||
#### Variable
|
||||
#### گۆڕاو
|
||||
|
||||
A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`.
|
||||
|
||||
For example:
|
||||
بۆ نموونە:
|
||||
|
||||
- `$version` is a format string with a variable named `version`.
|
||||
- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`.
|
||||
- `$git_branch $git_commit` has the two variables separated with a space.
|
||||
|
||||
#### Text Group
|
||||
#### کۆمەڵە نووسین
|
||||
|
||||
A text group is made up of two different parts.
|
||||
|
||||
@ -77,7 +77,7 @@ The first part, which is enclosed in a `[]`, is a [format string](#format-string
|
||||
|
||||
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part.
|
||||
|
||||
For example:
|
||||
بۆ نموونە:
|
||||
|
||||
- `[on](red bold)` will print a string `on` with bold text colored red.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
@ -100,7 +100,7 @@ Note that what styling looks like will be controlled by your terminal emulator.
|
||||
|
||||
A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty.
|
||||
|
||||
For example:
|
||||
بۆ نموونە:
|
||||
|
||||
- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region.
|
||||
- `(some text)` will always show nothing since there are no variables wrapped in the braces.
|
||||
@ -212,6 +212,7 @@ $nodejs\
|
||||
$ocaml\
|
||||
$perl\
|
||||
$php\
|
||||
$pulumi\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
@ -385,7 +386,7 @@ style = "bold red"
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
discharging_symbol = "💦"
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
@ -402,13 +403,13 @@ The character will tell you whether the last command was successful or not. It c
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning
|
||||
::: ئاگادارکردنەوە
|
||||
|
||||
`error_symbol` is not supported on elvish and nu shell.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
::: ئاگادارکردنەوە
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
@ -788,7 +789,7 @@ truncation_symbol = "…/"
|
||||
|
||||
## Docker Context
|
||||
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
|
||||
### Options
|
||||
|
||||
@ -983,7 +984,7 @@ default = "unknown user"
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | | The symbol used before displaying the variable value. |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
@ -1065,10 +1066,11 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | The style for the module. |
|
||||
| Option | Default | Description |
|
||||
| ---------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `fill` module |
|
||||
|
||||
### Example
|
||||
|
||||
@ -1558,13 +1560,13 @@ The default functionality is:
|
||||
- 1 job -> `symbol` is shown.
|
||||
- 2 jobs or more -> `symbol` + `number` are shown.
|
||||
|
||||
::: warning
|
||||
::: ئاگادارکردنەوە
|
||||
|
||||
This module is not supported on tcsh and nu.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
::: ئاگادارکردنەوە
|
||||
|
||||
The `threshold` option is deprecated, but if you want to use it, the module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
@ -2110,7 +2112,7 @@ symbol = "☁️ "
|
||||
|
||||
## Package Version
|
||||
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages.
|
||||
|
||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||
- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||
- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||
- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present
|
||||
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
||||
|
||||
> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager.
|
||||
@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
|
||||
format = "via [🔹 $version](147 bold) "
|
||||
```
|
||||
|
||||
## Pulumi
|
||||
|
||||
The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version.
|
||||
|
||||
::: tip
|
||||
|
||||
By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version).
|
||||
|
||||
:::
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
|
||||
| `style` | `"bold 5"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `pulumi` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | ---------- | ------------------------------------ |
|
||||
| version | `v0.12.24` | The version of `pulumi` |
|
||||
| stack | `dev` | The current Pulumi stack |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Example
|
||||
|
||||
#### With Pulumi Version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[pulumi]
|
||||
format = "[🛥 ($version )$stack]($style) "
|
||||
```
|
||||
|
||||
#### Without Pulumi version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
[pulumi]
|
||||
symbol = "🛥 "
|
||||
format = "[$symbol$stack]($style) "
|
||||
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met:
|
||||
@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ------------ | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `"[$indicator]($style) "` | The format for the module. |
|
||||
| `style` | `"white bold"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Default | Description |
|
||||
| --------- | ------- | ---------------------------------------------------------- |
|
||||
| indicator | | Mirrors the value of `indicator` for currently used shell. |
|
||||
| style\* | | Mirrors the value of option `style`. |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Examples
|
||||
|
||||
@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
fish_indicator = ""
|
||||
powershell_indicator = "_"
|
||||
unknown_indicator = "mystery shell"
|
||||
style = "cyan bold"
|
||||
disabled = false
|
||||
```
|
||||
|
||||
@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.terraform` folder
|
||||
- Current directory contains a file with the `.tf` or `.hcl` extensions
|
||||
- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions
|
||||
|
||||
### Options
|
||||
|
||||
@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💠"` | A format string shown before the terraform workspace. |
|
||||
| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold 105"` | The style for the module. |
|
||||
@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
:::
|
||||
|
||||
::: warning Command output is printed unescaped to the prompt
|
||||
|
||||
Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell.
|
||||
|
||||
Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html).
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
files = ["foo"] # can specify filters but wildcards are not supported
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
format = " transcending [$output]($style)"
|
||||
|
||||
[custom.time]
|
||||
command = "time /T"
|
||||
files = ["*.pst"]
|
||||
extensions = ["pst"] # filters *.pst files
|
||||
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
|
||||
```
|
||||
|
@ -56,10 +56,36 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
@ -83,7 +83,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||
alt="Português do Brasil"
|
||||
alt="پورتوگالیی بەڕازیل"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@ -177,7 +177,7 @@
|
||||
#### دابمەزرێنە لەڕێگەی بەڕێوبەری گورزەوە
|
||||
|
||||
|
||||
##### نموونە: [Homebrew](https://brew.sh/):
|
||||
##### لەگەڵ [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -270,7 +270,7 @@
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
ئەمەی دێت زیادبکە بۆ کۆتایی پەڕگەی `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
@ -281,7 +281,7 @@
|
||||
|
||||
#### 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.
|
||||
**ئاگادارکردنەوە** ئەمە لە داهاتوودا دەگۆڕێت. تەنها وەشانی v0.33 یان بەرزتری nu پشتگیریکراوە. ئەمەی خوارەوە زیادبکە بۆ پەڕگەی ڕێکخستنی nuـەکەت. ئەتوانی شوێنی ئەم پەڕگەیە بپشکنی بە جێبەجێکردنی `config path` لە nu دا.
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
@ -300,37 +300,9 @@
|
||||
|
||||
ئەگەر حەزئەکەیت یارمەتی بدەیت بە بەژداریکردن لە starship، تکایە سەیری [ڕێبەری بەژداریکردن](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)ـەکەمان بکە. هەروەها، شەرم مەکە وەرە نێوە [ڕاژەی Discord](https://discord.gg/8Jzqu3T)ـەکەمانەوە و سڵاوێک بکە. 👋
|
||||
|
||||
### بەژداریکردن بە کۆد
|
||||
|
||||
سوپاس بۆ هەموو ئەو کەسانەی کە بەژدارییان کردووە تا ئەم پڕۆژەیە هەبێت. [[بەژداربە](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>
|
||||
|
||||
### بەژداریکەرە داراییەکان
|
||||
|
||||
ببە بەژداریکەرێکی دارایی و یارمەتیمان بدە بەردەوامبین لە کۆمەڵگەکەماندا. [[بەژداربە](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### تاکە کەسەکان
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### ڕێکخراوەکان
|
||||
|
||||
پشتگیری ئەم پڕۆژەیە بکە لەڕێی ڕێکخراوەکەتەوە. لۆگۆکەت لێرە دەردەکەوێ لەگەڵ بەستەرێک بۆ ماڵپەڕەکەت. [[بەژداربە](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 دا. 🙏
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - یەکێ لە promptـەکانی ZSH بۆ ئاسمانەوانان.
|
||||
|
||||
@ -340,9 +312,9 @@
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="ئایکۆنی مووشەکی Starship">
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
</p>
|
||||
|
||||
## 📝 مۆڵەتنامە
|
||||
|
||||
هەموو مافێکی پارێزراوە © 2019-ئێستا، [بەژداریکەرانی Starship](https://github.com/starship/starship/graphs/contributors). <br />ئەم پڕۆژەیە لە ژێر مۆڵەتنامەی [ISC](https://github.com/starship/starship/blob/master/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.
|
||||
|
@ -35,6 +35,16 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Installation
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
|
@ -1,18 +1,18 @@
|
||||
# Presets
|
||||
# پێش ڕێکخستنەکان
|
||||
|
||||
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
|
||||
ئەمە کۆکراوەیەکە لەو پێش ڕێکخستنانەی کە لەلایەن کۆمەڵگاوە نێردراون بۆ Starship. ئەگەر پێش ڕێکخستنێکت هەیە بۆ هاوبەشکردن، تکایە [PRـێک بنێرە](https://github.com/starship/starship/edit/master/docs/presets/README.md) کە ئەم پەڕگەیە نوێبکاتەوە! 😊
|
||||
|
||||
## Nerd Font Symbols
|
||||
## هێماکانی Nerd Font
|
||||
|
||||
This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye!
|
||||
ئەم پێش ڕێکخستنە هیچ شتێک ناگۆڕێت جگە لە هێماکان کە بەکارهاتوون بۆ هەر moduleـێک. ئەگەر ئیمۆجیەکان ئەو شتە نین تۆ حەزت لێیە، ئەمە ڕەنگە سەرنجت ڕاکێشێت!
|
||||
|
||||
![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png)
|
||||
![ڕوونماوێنەیەکی پێش ڕێکخستنی هێماکانی فۆنتی Nerd](/presets/nerd-font-symbols.png)
|
||||
|
||||
### پێشمەرجەکان
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
||||
- [Nerd Font](https://www.nerdfonts.com/)ـێک دامەزرێنراوە و چالاککراوە لە تێرمیناڵەکەتدا (بۆ نموونە Fira Code Nerd Font بەکاردەهێنێ)
|
||||
|
||||
### Configuration
|
||||
### ڕێکخستن
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
@ -88,19 +88,19 @@ symbol = " "
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
## پارچە کەوانەکراوەکان
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
پێشتر:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
![ڕوونماوێنەی ڕێکخستنی بنەڕەتی Starship](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
دواتر:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
![ڕوونماوێنەی پێشڕێکخستنی Bracketed Segments](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Configuration
|
||||
### ڕێکخستن
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -242,19 +245,19 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
## هێما نووسینەکییە ئاساییەکان
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
ئەم پێش ڕێکخستنە هێماکان دەگۆڕێت بۆ نووسینی ئاسایی. ئەگەر تێرمیناڵ/فۆنتەکەت ناتوانێ NerdFonts/ئیمۆجییەکان دەربخات، لەوانەیە پیویست بکا ئەم پێش ڕێکخستنە بەکاربهێنیت!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
پێشتر (ڕێکخستنی بنەڕەتی لەگەڵ فۆنتی Fixedsys):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
دواتر (هێما نووسینەکییە ئاساییەکان):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Configuration
|
||||
### ڕێکخستن
|
||||
|
||||
```toml
|
||||
[character]
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -369,13 +375,13 @@ symbol = "scala "
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
## Hide Runtime Versions
|
||||
## شاردنەوەی وەشانەکانی کاتی جێبەجێکردن
|
||||
|
||||
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
||||
ئەم پێش ڕێکخستنە وەشانی کاتی جێبەجێکردنی زمانەکان دەشارێتەوە. ئەگەر کاردەکەیت لەگەڵ containerو ژینگە خەیاڵییەکان، ئەمە بۆ تۆیە!
|
||||
|
||||
![Screenshot of Hide Runtime Versions preset](/presets/hide-runtime-versions.png)
|
||||
|
||||
### Configuration
|
||||
### ڕێکخستن
|
||||
|
||||
```toml
|
||||
[cmake]
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## بێخەوش
|
||||
|
||||
ئەم پێش ڕێکخستنە لاسایی شێواز و ڕەفتاری [Pure](https://github.com/sindresorhus/pure) دەکاتەوە.
|
||||
|
||||
![Screenshot of Pure preset](/presets/pure-prompt.png)
|
||||
|
||||
### ڕێکخستن
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -143,7 +143,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
|
||||
|
||||
#### 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.
|
||||
::: warning Dies wird sich in der Zukunft ändern. Es wird nur nu Version v0.33 oder höher unterstützt. ::: Füge Folgendes zu deiner nu Konfigurationsdatei hinzu. Du kannst den Speicherort dieser Datei überprüfen, indem du `config path` in nu ausführst.
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
@ -157,7 +157,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
Füge folgendes an das Ende von `~/.xonshrc` hinzu:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
@ -21,7 +21,7 @@ function blastoff(){
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Allerdings **muss** das DEBUG Signal *vor* der Initialisierung von Starship getrapped werden! Starship kann den Wert der DEBUG-trap speichern. Wenn der Wert der DEBUG-trap überschrieben wird nachdem Starship gestartet ist kann es zu Fehlern im Bezug auf die verwendete DEBUG-trap kommen.
|
||||
- Um eine benutzerdefinierte Funktion direkt vor der Ausführung eines Befehls auszulösen, kann man den [`DEBUG` trap](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/) Mechanismus verwenden. Allerdings **muss** das DEBUG Signal *vor* der Initialisierung von Starship getrapped werden! Starship kann den Wert der DEBUG-trap speichern. Wenn der Wert der DEBUG-trap überschrieben wird nachdem Starship gestartet ist kann es zu Fehlern im Bezug auf die verwendete DEBUG-trap kommen.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
@ -31,27 +31,39 @@ trap blastoff DEBUG # DEBUG-Trap *bevor* Starship läuft
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Fenstertitel anpassen
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish ist standardmäßig so konfiguriert. Starship ändert standardmäßig den Fenstertitel nicht, aber es ist sehr einfach die Funktion zu `bash` oder `zsh` hinzuzufügen.
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Starship bietet daher die begrenzte Möglichkeit, eigene Funktionen in das prompt rendering Verfahren einzufügen:
|
||||
|
||||
Zuerst wird eine Funktion definiert um den Fenstertitel zu ändern ( für bash und zsh ist die Funktion identisch):
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; DEIN_FENSTERTITEL_HIER \007"
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
Sie können Variablen verwenden, um diesen Titel anzupassen (`$USER`, `$HOSTNAME`, `$PWD`).
|
||||
## Change Window Title
|
||||
|
||||
Für `bash` muss die Funktion als "precmd starship"-Funktion gesetzt werden:
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
|
||||
}
|
||||
```
|
||||
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
Füge dies in `Zsh` zum `precmd_functions`-Array hinzu:
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
|
||||
```bash
|
||||
precmd_functions+=(set_win_title)
|
||||
@ -59,7 +71,7 @@ precmd_functions+=(set_win_title)
|
||||
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
Zum Beispiel, wenn sie ihr aktuelles Verzeichnis als Terminal Title anzeigen wollen, fügen Sie folgenden Code-Schnipsel zu ihrer `~/.bashrc` oder `~/.zshrc` hinzu:
|
||||
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -68,6 +80,17 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,7 @@ Ja, beide können benutzt werden, um Module in der Prompt zu deaktivieren. Wenn
|
||||
- Disabling modules is more explicit than omitting them from the top level `format`
|
||||
- Mit der Aktualisierung von Starship werden neu erstellte Module an die Eingabezeile angefügt
|
||||
|
||||
## The docs say Starship is cross-shell. Why isn't my preferred shell supported?
|
||||
## Die Dokumentation sagt, dass die Starship interkompatibel ist. Warum wird meine bevorzugte Shell nicht unterstützt?
|
||||
|
||||
Starship ist auf so eine Weise gebaut, das die Unterstützung so gut wie jeder Shell möglch sein sollte. Die Starship Binärdatei läuft völlig unabhängig von der Shell, und sollte auf jeder benutzt werden können, die eine Anpassung des Stils erlaubt.
|
||||
|
||||
@ -56,15 +56,41 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
||||
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
|
||||
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. Wenn `LC_ALL` kein UTF-8-Wert ist, [müssen Sie ihn ändern](https://www.tecmint.com/set-system-locales-in-linux/).
|
||||
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
|
||||
- You are using a [Nerd Font](https://www.nerdfonts.com/).
|
||||
|
||||
@ -79,18 +105,18 @@ The first line should produce a [snake emoji](https://emojipedia.org/snake/), wh
|
||||
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## Wie deinstalliere ich Starship?
|
||||
## How do I uninstall Starship?
|
||||
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
|
||||
1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship.
|
||||
1. Delete the Starship binary.
|
||||
1. Löschen Sie die Starship-Binary.
|
||||
|
||||
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
|
||||
|
||||
Wenn Starship mit Hilfe des Installationsscripts installiert wurde, entfernt der folgende Befehl Starship:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Starship binary suchen und löschen
|
||||
# Locate and delete the starship binary
|
||||
sh -c 'rm "$(which starship)"'
|
||||
```
|
||||
|
@ -87,7 +87,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||
alt="Português do Brasil"
|
||||
alt="Portugiesisch (Brasilien)"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@ -95,7 +95,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский"
|
||||
alt="Russisch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@ -103,7 +103,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt"
|
||||
alt="Vietnamesisch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@ -132,17 +132,17 @@
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**Der minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!**
|
||||
**Der minimalistische, super schnelle und unendlich anpassbare Prompt für jede 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.
|
||||
- **Schnell:** sie ist schnell – _sehr, sehr_ schnell! 🚀
|
||||
- **Konfigurierbar:** konfiguriere jedes Detail der Prompt.
|
||||
- **Universal:** funktioniert mit jeder Shell, auf jedem Betriebssystem.
|
||||
- **Intelligent:** zeigt relevante Informationen auf einen Blick.
|
||||
- **Funktionsreich:** unterstützt alle deine Lieblingswerkzeuge.
|
||||
- **Einfach:** schnell zu installieren – Betriebsbereit in nur wenigen Minuten.
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/config/"><strong>Explore the Starship docs ▶</strong></a>
|
||||
<a href="https://starship.rs/config/"><strong>Schau dir die Starship-Dokumentation an ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
@ -171,7 +171,7 @@
|
||||
|
||||
Um Starship selbst zu aktualisieren, lasse das Skript oben nochmal laufen. Es wird die vorhandene Version ersetzen, ohne die Konfiguration von Starship zu berühren.
|
||||
|
||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||
**Hinweis** - Die Standardwerte des Installationsskripts können überschrieben werden, sehen Sie die integrierte Hilfe.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
@ -181,7 +181,7 @@
|
||||
#### Installation mithilfe eines Paket-Managers
|
||||
|
||||
|
||||
##### Beispiel: [Homebrew](https://brew.sh/):
|
||||
##### Mit [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -252,7 +252,7 @@
|
||||
|
||||
#### Elvish
|
||||
|
||||
**Warning** Only elvish v0.15 or higher is supported. Trage folgendes am Ende von `~/.config/fish/rc.elv` ein:
|
||||
**Warnung** Nur elvish v0.15 oder höher wird unterstützt. Trage folgendes am Ende von `~/.config/fish/rc.elv` ein:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
@ -274,7 +274,7 @@
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
Füge folgendes an das Ende von `~/.xonshrc` hinzu:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
@ -285,7 +285,7 @@
|
||||
|
||||
#### 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.
|
||||
**Warnung** Dies wird sich in Zukunft ändern. Es wird nur nu Version v0.33 oder höher unterstützt. Füge folgendes zu deiner nu Konfigurationsdatei hinzu. Du kannst den Speicherort dieser Datei überprüfen, indem du `config path` in nu ausführst.
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
@ -304,37 +304,9 @@ Wenn du eine andere Sprache flüssig sprichts, würden wir uns sehr freuen wenn
|
||||
|
||||
Falls du an Starship mitwirken willst, wirf bitte einen Blick auf den [Leitfaden zum Mitwirken](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Schau auch gerne auf unserem [Discord-Server](https://discord.gg/8Jzqu3T) vorbei. 👋
|
||||
|
||||
### Mitwirkenden
|
||||
|
||||
Das Projekt existiert dank aller der, die Mitwirken. [[Mitmachen](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>
|
||||
|
||||
### Finanzielle Unterstützung
|
||||
|
||||
Become a financial contributor and help us sustain our community. [[Mitmachen](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### Individuals
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### Organisationen
|
||||
|
||||
Support this project with your organization. Your logo will show up here with a link to your website. [[Mitmachen](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>
|
||||
|
||||
## 💭 Inspiriert durch
|
||||
|
||||
Bitte schaue dir diese früheren Projekte an, die dazu beigetragen haben, Starship zu kreieren. 🙏
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Ein ZSH-Prompt für Astronauten.
|
||||
|
||||
@ -344,9 +316,9 @@ Bitte schaue dir diese früheren Projekte an, die dazu beigetragen haben, Starsh
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship Raketen-Symbol">
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
</p>
|
||||
|
||||
## 📝 Lizenz
|
||||
|
||||
Copyright © 2019-heute [Starship-Mitwirkende](https://github.com/starship/starship/graphs/contributors).<br /> Dieses Projekt ist [ISC](https://github.com/starship/starship/blob/master/LICENSE) lizenziert.
|
||||
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.
|
||||
|
@ -35,9 +35,19 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Installation
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Das Binary holen
|
||||
### Getting the Binary
|
||||
|
||||
#### Imperativ
|
||||
|
||||
@ -47,7 +57,7 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Deklarativ, Einzel-Benutzer, über [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Aktivieren Sie das Modul `programs.starship` in Ihrer `home.nix`-Datei und fügen Sie Ihre Einstellungen hinzu
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
@ -69,7 +79,7 @@ Aktivieren Sie das Modul `programs.starship` in Ihrer `home.nix`-Datei und füge
|
||||
}
|
||||
```
|
||||
|
||||
und führen Sie dann folgendes aus
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -77,7 +87,7 @@ home-manager switch
|
||||
|
||||
#### Deklarativ, systemweit, mit NixOS
|
||||
|
||||
Fügen Sie `pkgs.starship` zu `environment.systemPackages` in Ihrer `configuration.nix` hinzu, und führen Sie folgendes aus
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
|
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
![Screenshot of Pure preset](/presets/pure-prompt.png)
|
||||
|
||||
### Konfiguration
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -31,6 +31,18 @@ trap blastoff DEBUG # Trampa DEBUG *antes* de la ejecución de Starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Comandos pre-prompt y pre-ejecución personalizados en PowerShell
|
||||
|
||||
Powershell no posee un framework oficial de preexec/precmd como la mayoría de los demás intérpretes de comandos. Debido a esto, es difícil proporcionar "hooks" totalmente personalizables en `Powershell`. Sin embargo, Starship te da la posibilidad de insertar de forma limitada tus propias funciones en el proceso de renderizado del prompt:
|
||||
|
||||
Crea una función llamada `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Cambiar el Título de la Ventana
|
||||
|
||||
Algunos intérpretes de comandos van a cambiar automáticamente el título de la ventana por ti (p. ej., para mostrar tu directorio actual). Fish incluso lo hace por defecto. Starship no hace esto, pero es bastante sencillo añadir esta funcionalidad a `Bash` o `zsh`.
|
||||
@ -39,7 +51,7 @@ Primero, define una función para el cambio de título de la ventana (idéntico
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; TU_TÍTULO_DE_VENTANA_AQUÍ \007"
|
||||
echo -ne "\033]0; TU_TITULO_DE_VENTANA_AQUI \007"
|
||||
}
|
||||
```
|
||||
|
||||
@ -68,9 +80,20 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
## Gabilitar Prompt Derecho
|
||||
También puede establecer una salida similar con PowerShell creando una función llamada `Invoke-Starship-PreCommand`.
|
||||
|
||||
Algunos intérpretes de órdenes soportan un prompt derecho que se renderiza en la misma línea que la entrada. Starship puede establecer el contenido del prompt correcto usando la opción `right_format`. Cualquier módulo que pueda ser usado en `format` también es soportado en `right_format`. La variable `$all` solo contendrá módulos no utilizados explícitamente en `format` o `right_format`.
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Habilitar Prompt a la Derecha
|
||||
|
||||
Algunos intérpretes de comandos soportan un prompt derecho que se renderiza en la misma línea que la entrada. Starship puede establecer el contenido del prompt derecho usando la opción `right_format`. Cualquier módulo que pueda ser usado en `format` también es soportado en `right_format`. La variable `$all` solo contendrá módulos no utilizados explícitamente en `format` o `right_format`.
|
||||
|
||||
Nota: El prompt derecho es una sola línea siguiendo la ubicación de entrada. Para alinear módulos arriba de la línea de entrada en un prompt multi-línea, vea el [módulo fill](/config/#fill).
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -56,41 +56,67 @@ Si obtienes un error como "_version 'GLIBC_2.18' not found (required by starship
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Veo símbolos que no entiendo ni espero, ¿qué significan?
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Si ves símbolos que no reconoces, puedes usar `starship explain` para explicar los módulos que se muestran actualmente.
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## ¿Por qué no veo un símbolo de glifo en mi prompt?
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
La causa más común de esto es la mala configuración del sistema. Algunas distribuciones de Linux en particular no vienen con soporte de fuentes listos para usarse. Tienes que garantizar que:
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
reporte de error starship
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
||||
- Tu configuración regional está establecida con un valor UTF-8, como `de_DE.UTF-8` o `ja_JP.UTF-8`. Si `LC_ALL` no es un valor UTF-8, [necesitarás cambiarlo](https://www.tecmint.com/set-system-locales-in-linux/).
|
||||
- Tienes una fuente emoji instalada. La mayoría de los sistemas vienen con una fuente emoji por defecto, pero algunos (notablemente Arch Linux) no. Generalmente puedes instalar uno a través del gestor de paquetes del sistema --[noto emoji](https://www.google.com/get/noto/help/emoji/) es una elección popular.
|
||||
- Estás usando un [Nerd Font](https://www.nerdfonts.com/).
|
||||
|
||||
Para probar tu sistema, ejecua los siguientes comandos en un terminal:
|
||||
To test your system, run the following commands in a terminal:
|
||||
|
||||
```sh
|
||||
echo -e "\xf0\x9f\x90\x8d"
|
||||
echo -e "\xee\x82\xa0"
|
||||
```
|
||||
|
||||
La primera línea debe producir un [emoji snake](https://emojipedia.org/snake/), mientras que la segunda debe producir un [símbolo de rama de Powerline(e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
|
||||
Si cualquiera de los dos símbolos no se puede mostrar correctamente, su sistema todavía está mal configurado. Desafortunadamente, obtener la configuración correcta de las fuentes es a veces difícil. Los usuarios en el Discord pueden ayudar. Si ambos símbolos se muestran correctamente, pero todavía no los ves en Starship, [¡envía un informe de error!](https://github.com/starship/starship/issues/new/choose)
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## ¿Cómo puedo desinstalar Starship?
|
||||
## How do I uninstall Starship?
|
||||
|
||||
Starship es tan fácil de desinstalar como de instalar en primer lugar.
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
|
||||
1. Elimina cualquier línea de tu configuración de intérprete de comandos (por ejemplo, `~/.bashrc`) usada para inicializar Starship.
|
||||
1. Elimina el binario de Starship.
|
||||
|
||||
Si Starship fue instalado usando un gestor de paquetes, por favor refiérete a sus documentos para instrucciones de desinstalación.
|
||||
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
|
||||
|
||||
Si Starship fue instalado usando el guión de instalación, el siguiente comando eliminará el binario:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Localiza y elimina el binario de starship
|
||||
# Locate and delete the starship binary
|
||||
sh -c 'rm "$(which starship)"'
|
||||
```
|
||||
|
@ -181,7 +181,7 @@
|
||||
#### Instalar con un gestor de paquetes
|
||||
|
||||
|
||||
##### Ejemplo: [Homebrew](https://brew.sh/):
|
||||
##### Con [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -304,37 +304,9 @@ Si hablas con fluidez en un idioma que no sea inglés, agradecemos mucho cualqui
|
||||
|
||||
Si quieres ayudar a colaborar a Starship, por favor mira nuestra [Guía de Colaboradores](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Además, siéntete libre de entrar en nuestro [servidor de Discord](https://discord.gg/8Jzqu3T) y di "¡Hola!". 👋
|
||||
|
||||
### Desarrolladores
|
||||
|
||||
Este proyecto existe gracias a todas las personas que han ayudado. [[Contribuir](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>
|
||||
|
||||
### Financiadores
|
||||
|
||||
Conviértete en un financiador y ayúdanos a mantener nuestra comunidad. [[Contribuir](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### Personas
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### Organizaciones
|
||||
|
||||
Apoya este proyecto con tu organización. Su logo se mostrará aquí con un enlace a su sitio web. [[Contribuir](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>
|
||||
|
||||
## 💭 Inspirado por
|
||||
|
||||
Por favor, revisa estos trabajos previos que ayudaron a inspirar la creación de starship. 🙏
|
||||
Por favor, revisa estos proyectos previos que inspiraron la creación de Starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un prompt ZSH para astronautas.
|
||||
|
||||
@ -344,9 +316,9 @@ Por favor, revisa estos trabajos previos que ayudaron a inspirar la creación de
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Icono de cohete de Starship">
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Icono de Starship">
|
||||
</p>
|
||||
|
||||
## 📝 Licencia
|
||||
|
||||
Derechos de autor © 2019-presente, [Colaboradores de Starship](https://github.com/starship/starship/graphs/contributors).<br />Este proyecto está bajo una licencia [ISC](https://github.com/starship/starship/blob/master/LICENSE).
|
||||
Derechos de autor © 2019-presente, [Colaboradores de Starship](https://github.com/starship/starship/graphs/contributors).<br /> Este proyecto está bajo una licencia [ISC](https://github.com/starship/starship/blob/master/LICENSE).
|
||||
|
@ -35,6 +35,16 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Instalación
|
||||
|
||||
En Funtoo Linux, Starship puede instalarse desde [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) a través de Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Obtener el binario
|
||||
@ -47,14 +57,14 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarativo, usuario único, a través de [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Activa el módulo `programs.starship` en tu archivo `home.nix` y añade tus ajustes
|
||||
Habilita el módulo `programs.starship` en tu archivo `home.nix` y añade tus configuraciones
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
# Configuración escrita en ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
@ -69,7 +79,7 @@ Activa el módulo `programs.starship` en tu archivo `home.nix` y añade tus ajus
|
||||
}
|
||||
```
|
||||
|
||||
luego ejecutar
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
|
@ -1,12 +1,12 @@
|
||||
# Ajustes por defecto
|
||||
# Preajustes
|
||||
|
||||
Aquí hay una colección de ajustes por defecto creados por la comunidad de Starship. ¡Si quieres compartir un ajuste por defecto, por favor, [envía un PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) actualizando este archivo! 😊
|
||||
Aqui tienes una colección de preajustes creados por la comunidad de Starship. ¡Si quieres compartir un preajuste, por favor, [envía un PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) actualizando este archivo! 😊
|
||||
|
||||
## Símbolos de Nerd Font
|
||||
|
||||
Este ajuste por defecto no modifica nada excepto los símbolos usados para cada módulo. Si los emojis no son lo tuyo, ¡esto podría llamar tu atención!
|
||||
Este preajuste no modifica nada excepto los símbolos usados para cada módulo. Si los emojis no son lo tuyo, ¡esto podría llamar tu atención!
|
||||
|
||||
![Captura de pantalla de los ajustes por defecto de los Símbolos de Nerd Font](/presets/nerd-font-symbols.png)
|
||||
![Captura de pantalla del preajuste de los Símbolos de Nerd Font](/presets/nerd-font-symbols.png)
|
||||
|
||||
### Prerequisitos
|
||||
|
||||
@ -90,7 +90,7 @@ symbol = "ﯣ "
|
||||
|
||||
## Segmentos entre Corchetes
|
||||
|
||||
Este ajuste cambia el formato de todos los módulos incorporados para mostrar su segmento entre corchetes en lugar de usar la redacción predeterminada de Starship ("via", "on", etc.).
|
||||
Este preajuste cambia el formato de todos los módulos incorporados para mostrar su segmento entre corchetes en lugar de usar la redacción por defecto de Starship ("via", "on", etc.).
|
||||
|
||||
Antes:
|
||||
|
||||
@ -98,7 +98,7 @@ Antes:
|
||||
|
||||
Después:
|
||||
|
||||
![Captura de pantalla de los ajustes predeterminados de los Segmentos entre Corchetes](/presets/bracketed-segments-after.png)
|
||||
![Captura de pantalla del preajuste de los Segmentos entre Corchetes](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Configuración
|
||||
|
||||
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -244,7 +247,7 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
## Símbolos de texto sin formato
|
||||
|
||||
Este ajuste preestablecido cambia los símbolos a texto sin formato. Si tu terminal/fuente no pudo renderizar el NerdFonts/emojis, ¡tal vez podría probar este ajuste preestablecido!
|
||||
Este preajuste cambia los símbolos a texto sin formato. Si tu terminal/fuente no pudo renderizar el NerdFonts/emojis, ¡tal vez podría probar este preajuste!
|
||||
|
||||
Antes (configuración por defecto con Fuente Fixedsys):
|
||||
|
||||
@ -252,7 +255,7 @@ Antes (configuración por defecto con Fuente Fixedsys):
|
||||
|
||||
Después (Símbolos de texto sin formato):
|
||||
|
||||
![Captura de pantalla de los ajustes predeterminados de los Símbolos de Nerd Font](/presets/plain-text-symbols-after.png)
|
||||
![Captura de pantalla del ajuste de los Símbolos de Texto Plano](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Configuración
|
||||
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -371,9 +377,9 @@ symbol = "swift "
|
||||
|
||||
## Ocultar versiones en tiempo de ejecución
|
||||
|
||||
Esta configuración predeterminada oculta la versión de los tiempos de ejecución del idioma. Si trabajas en contenedores o entornos virtualizados, ¡ésto es para ti!
|
||||
Este preajuste oculta la versión de los tiempos de ejecución del idioma. Si trabajas en contenedores o entornos virtualizados, ¡ésto es para ti!
|
||||
|
||||
![Captura de pantalla ajustes de Ocultar versiones de tiempo de ejecución](/presets/hide-runtime-versions.png)
|
||||
![Captura de pantalla del preajuste de Ocultar de versiones de tiempo de ejecución](/presets/hide-runtime-versions.png)
|
||||
|
||||
### Configuración
|
||||
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
|
||||
Esta preajuste emula la apariencia y el comportamiento de [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
![Captura de pantalla del ajuste de Pure](/presets/pure-prompt.png)
|
||||
|
||||
### Configuración
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -31,35 +31,47 @@ trap blastoff DEBUG # Pièger DEBUG *avant* l'initialisation de starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Modifier le titre des fenêtres
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
Certaines commandes du shell changeront automatiquement le titre de la fenêtre (par exemple, pour refléter votre répertoire de travail). Fish le fait même par défaut. Starship ne le fait pas, mais il est assez simple d'ajouter cette fonctionnalité à `bash` ou `zsh`.
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Cependant, Starship vous permet dans une certaine mesure d'insérer vos propres fonctions dans la procédure de rendu du prompt :
|
||||
|
||||
Tout d'abord, définissez une fonction de changement de titre de fenêtre (identique en bash et zsh) :
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```bash
|
||||
function set_titre_fenetre(){
|
||||
echo -ne "\033]0; VOTRE_TITRE_ICI\007"
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
Vous pouvez utiliser des variables pour personnaliser ce titre (`$USER`, `$HOSTNAME`, et `$PWD` sont des choix populaires).
|
||||
## Change Window Title
|
||||
|
||||
Dans `bash`, définissez cette fonction comme la fonction précommande Starship :
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_titre_fenetre"
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
|
||||
}
|
||||
```
|
||||
|
||||
Dans `zsh`, ajoutez ceci au tableau `precmd_functions` :
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
|
||||
```bash
|
||||
precmd_functions+=(set_titre_fenetre)
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
Si vous aimez le résultat, ajoutez ces lignes à votre fichier de configuration shell (`~/.bashrc` ou `~/.zshrc`) pour le rendre permanent.
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
|
||||
Par exemple, si vous voulez afficher votre répertoire actuel dans le titre de l'onglet de votre terminal, ajoutez le code suivant à votre `~/.bashrc` ou `~/.zshrc`:
|
||||
```bash
|
||||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -68,6 +80,17 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -56,41 +56,67 @@ Si vous obtenez une erreur du type "_version 'GLIBC_2.18' not found (required by
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Je vois des symboles que je ne comprends pas et auxquels je ne m'attendais pas, que signifient-t-ils ?
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Si vous voyez des symboles que vous ne reconnaissez pas, vous pouvez utiliser `starship explain` pour obtenir des explications concernant les modules actuellement affichés.
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## Pourquoi ne vois-je pas de glyphe dans mon invite?
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
La cause la plus commune est la mauvaise configuration du système. Certaines distributions Linux ne sont pas équipées du support de police 'out of the box'. Vous devez vous assurer que:
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
||||
- Votre locale est définie à une valeur UTF-8, comme `de_DE.UTF-8` ou `ja_JP.UTF-8`. Si `LC_ALL` n'est pas une valeur UTF-8, [vous aurez besoin de la modifier](https://www.tecmint.com/set-system-locales-in-linux/).
|
||||
- Vous avez une police emoji installée. La plupart des systèmes sont fournis avec une police emoji par défaut, mais certains (notamment Arch Linux) ne le font pas. Vous pouvez habituellement en installer un par le biais du gestionnaire de paquets de votre système -[noto emoji](https://www.google.com/get/noto/help/emoji/) est un choix populaire.
|
||||
- Vous utilisez une police [Nerd Font](https://www.nerdfonts.com/).
|
||||
|
||||
Pour tester votre système, exécutez les commandes suivantes dans un terminal :
|
||||
To test your system, run the following commands in a terminal:
|
||||
|
||||
```sh
|
||||
echo -e "\xf0\x9f\x90\x8d"
|
||||
echo -e "\xee\x82\xa0"
|
||||
```
|
||||
|
||||
La première ligne doit produire un emoji [serpent](https://emojipedia.org/snake/), tandis que la seconde doit produire un symbole [de branche powerline (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
|
||||
Si l'un ou l'autre des symboles ne parvient pas à s'afficher correctement, votre système est toujours mal configuré. Malheureusement, il est parfois difficile d'obtenir une configuration correcte. Les utilisateurs sur Discord peuvent être en mesure d'aider. Si les deux symboles s'affichent correctement, mais vous ne les voyez toujours pas dans starship, [soumettez un rapport de bogue !](https://github.com/starship/starship/issues/new/choose)
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## Comment désinstaller Starship ?
|
||||
## How do I uninstall Starship?
|
||||
|
||||
Starship est tout aussi facile à désinstaller qu'à installer.
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
|
||||
1. Supprimez les lignes de la configuration de votre shell (par exemple `~/.bashrc`) utilisées pour initialiser Starship.
|
||||
1. Supprimez l'exécutable de Starship.
|
||||
|
||||
Si Starship a été installé à l'aide d'un gestionnaire de paquets, veuillez vous référer à leur documentation pour les instructions de désinstallation.
|
||||
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
|
||||
|
||||
Si Starship a été installé en utilisant le script d'installation, la commande suivante supprimera l'exécutable :
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Trouver et supprimer l'exécutable starship
|
||||
# Locate and delete the starship binary
|
||||
sh -c 'rm "$(which starship)"'
|
||||
```
|
||||
|
@ -63,7 +63,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español"
|
||||
alt="Espagnol"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@ -181,7 +181,7 @@
|
||||
#### Installer via le gestionnaire de paquets
|
||||
|
||||
|
||||
##### Exemple: [Homebrew](https://brew.sh/):
|
||||
##### Avec [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -304,37 +304,9 @@ Si vous parlez couramment une langue autre que l'anglais, nous apprécions grand
|
||||
|
||||
Si vous êtes intéressé pour aider et contribuer à Starship, veuillez jeter un coup d'œil à notre [Guide de contribution](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Aussi, n'hésitez pas à vous rendre sur notre [serveur Discord](https://discord.gg/8Jzqu3T) pour dire bonjour. 👋
|
||||
|
||||
### Contributeurs
|
||||
|
||||
Ce projet existe grâce à toutes les personnes qui y contribuent. [[Contribuer](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>
|
||||
|
||||
### Contributeurs financiers
|
||||
|
||||
Devenez un contributeur financier et aidez-nous à soutenir notre communauté. [[Contribuer](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### Particuliers
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### Organisations
|
||||
|
||||
Soutenez ce projet avec votre organisation. Votre logo apparaîtra ici avec un lien vers votre site Web. [[Contribuer](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>
|
||||
|
||||
## 💭Inspiré par
|
||||
|
||||
Voyez ces travaux précédents qui ont contribué à inspirer la création de Starship. 🙏
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Une invite de commande ZSH pour les astronautes.
|
||||
|
||||
@ -344,9 +316,9 @@ Voyez ces travaux précédents qui ont contribué à inspirer la création de St
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Icône de fusée de Starship">
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
</p>
|
||||
|
||||
## 📝 License
|
||||
|
||||
Copyright © 2019-présent, [Contributeurs Starship](https://github.com/starship/starship/graphs/contributors).<br /> Ce projet est sous licence[ISC](https://github.com/starship/starship/blob/master/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.
|
||||
|
@ -35,9 +35,19 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Installation
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Obtention du binaire
|
||||
### Getting the Binary
|
||||
|
||||
#### Impératif
|
||||
|
||||
@ -47,14 +57,14 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Déclaration, utilisateur unique, via [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Activez le module `programs.starship` dans votre fichier `home.nix`, et ajoutez vos paramètres
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration écrite dans ~/.config/starship.toml
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
@ -69,7 +79,7 @@ Activez le module `programs.starship` dans votre fichier `home.nix`, et ajoutez
|
||||
}
|
||||
```
|
||||
|
||||
puis lancez
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -77,7 +87,7 @@ home-manager switch
|
||||
|
||||
#### Déclaration, au niveau du système, avec NixOS
|
||||
|
||||
Ajoutez `pkgs.starship` à `environment.systemPackages` dans votre `configuration.nix`, puis exécutez
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
|
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
![Screenshot of Pure preset](/presets/pure-prompt.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -31,35 +31,47 @@ trap blastoff DEBUG # Trap DEBUG *sebelum* menjalankan starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Mengubah Judul Window
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
Beberapa prompt shell dengan otomatis akan mengubah judul window-nya untukmu (mis. untuk merefleksikan direktori kerjamu). Fish bahkan mengaturnya sebagai bawaan. Starship tidak, tapi mudah saja untuk menambahkan fungsi tersebut ke dalam `bash` ataupun `zsh`.
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Namun, Starship memberikan beberapa cara supaya kamu bisa memasukkan fungsimu sendiri ke dalam prosedur prompt-rendering:
|
||||
|
||||
Pertama, buatlah fungsi untuk mengubah judul window (bekerja pada bash dan zsh):
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; JUDUL_WINDOW_MU \007"
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
Kamu bisa menggunakan variabel untuk mengkustomisasi judulnya (`$USER`, `$HOSTNAME`, dan `$PWD` adalah opsi yang populer).
|
||||
## Change Window Title
|
||||
|
||||
Di dalam `bash`, atur fungsi berikut menjadi fungsi precmd untuk starship:
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
|
||||
}
|
||||
```
|
||||
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
Dalam `zsh`, pada array `precmd_functions`, tambahkan:
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
|
||||
```bash
|
||||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
Kalau kamu suka hasilnya, tambahkan baris (`~/.bashrc` or `~/.zshrc`) ke dalam file konfigurasi shell milikmu untuk membuatnya permanen.
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
Sebagai contoh, kalau kamu mau menampilkan lokasi direktori pada judul label terminalmu, tambahkan bagian berikut ke dalam `~/.bashrc` atau `~/.zshrc`:
|
||||
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -68,13 +80,24 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
|
||||
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||
|
||||
`right_format` saat ini hanya tersedia pada shell: elvish, fish, zsh.
|
||||
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||
|
||||
### Contoh
|
||||
|
||||
@ -88,7 +111,7 @@ format = """$character"""
|
||||
right_format = """$all"""
|
||||
```
|
||||
|
||||
Menghasilkan prompt seperti berikut:
|
||||
Produces a prompt like the following:
|
||||
|
||||
```
|
||||
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||
@ -97,7 +120,7 @@ Menghasilkan prompt seperti berikut:
|
||||
|
||||
## Menata String
|
||||
|
||||
Style strings are a list of words, separated by whitespace. Kumpulan katanya tidak bersifat case sensitive (mis. `tebal` dan `TeBaL` dianggap sebagai string yang sama). Tiap-tiap kata berikut adalah opsinya:
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
@ -109,14 +132,14 @@ Style strings are a list of words, separated by whitespace. Kumpulan katanya tid
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
yang mana `<color>` merupakan sebuah penentu warna (dibahas di bawah). `fg:<color>` dan `<color>` untuk saat ini memiliki fungsi yang sama, meskipun bisa berubah di kemudian hari. `inverted` menggantikan warna pada latar depan dan belakang. Urutan kata pada string tidak jadi masalah.
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
`none` bisa menimpa nilai token lainnya di dalam string jika Ia tidak termaksud dalam penentu warna pada `bg:` sebagai contoh, `fg:red none fg:blue` akan tetap menjadi string yang tidak memiliki penataan. `bg:none` menjadikan warna pada latar belakang sebagai warna bawaan. Jadi, nilai `fg:red bg:none` sama dengan `red` atau `fg:red` dan nilai `bg:green fg:red bg:none` juga sama dengan `fg:red` ataupun `red`. Mungkin akan jadi masalah untuk menggunakan `none` dengan token lainnya di kemudian hari.
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
Penentuan warna bisa dilakukan dengan salah satu cara berikut:
|
||||
A color specifier can be one of the following:
|
||||
|
||||
- Warna terminal pada umumnya terdiri dari: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Untuk memperoleh varian warna yang lebih cerah, kamu dapat menggunakan token `bright-` (mis. `bright-white`).
|
||||
- Menuliskannya dengan menggunakan `#` dan diikuti oleh enam digit angka hexadesimal. Spesifikasi [kode heksadesimal pada warna RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- Menggunakan bilangan antara 0-255. Spesifikasi [8-bit Kode Warna ANSI](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
Jika warna yang dipakai pada latar depan/latar belakang banyak, maka warna yang terbaru pada string yang akan diprioritaskan.
|
||||
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -56,10 +56,36 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
@ -181,7 +181,7 @@
|
||||
#### Pasang Melalui Package Manager
|
||||
|
||||
|
||||
##### Example: [Homebrew](https://brew.sh/):
|
||||
##### Dengan [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -304,34 +304,6 @@ If you are fluent in a non-English language, we greatly appreciate any help keep
|
||||
|
||||
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
|
||||
|
||||
### 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>
|
||||
|
||||
## 💭 Inspired By
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
@ -35,6 +35,16 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Installation
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
|
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
![Screenshot of Pure preset](/presets/pure-prompt.png)
|
||||
|
||||
### Konfigurasi
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -31,35 +31,47 @@ trap blastoff DEBUG # Trap DEBUG *prima* di eseguire starship
|
||||
eval $(starship bash)
|
||||
```
|
||||
|
||||
## Cambia il titolo della finestra
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
Alcune shell prompt cambieranno automaticamente il titolo della finestra (ad esempio per riflettere la directory di lavoro). Fish lo fa per impostazione predefinita. Starship non lo fa, ma è abbastanza semplice aggiungere questa funzionalità a `bash` o `zsh`.
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Tuttavia, Starship dà la limitata possibilità di inserire le tue funzioni nella procedura prompt-rendering:
|
||||
|
||||
Innanzitutto, bisogna definire una funzione per il cambio del titolo della finestra (identica sia per bash che zsh):
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; IL_TUO_TITOLO_QUI \007"
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
Puoi usare delle variabili per personalizzare questo titolo (`$USER`, `$HOSTNAME`, e `$PWD` sono le scelte più popolari).
|
||||
## Change Window Title
|
||||
|
||||
In `bash`, impostare questa funzione per essere la precmd Starship function:
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
|
||||
}
|
||||
```
|
||||
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
In `zsh`, aggiungi questo `precmd_functions` all'array:
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
|
||||
```bash
|
||||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
Se ti piace il risultato, aggiungi queste righe al tuo file shell di configurazione (`~/.bashrc` o `~/.zshrc`) per renderlo permanente.
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
Ad esempio, se desideri visualizzare la directory corrente nel titolo della scheda del terminale, aggiungi la seguente snippet al tuo `~/.bashrc` or `~/.zshrc`:
|
||||
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -68,6 +80,17 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
@ -76,7 +99,7 @@ Note: The right prompt is a single line following the input location. To right a
|
||||
|
||||
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||
|
||||
### Example
|
||||
### Esempio
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -56,41 +56,67 @@ Se si ottiene un errore come "_versione 'GLIBC_2. 8' non trovato (richiesta da S
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Vedo simboli che non capisco o mi aspetto, cosa significano?
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Se vedi simboli che non riconosci puoi usare `starship explain` per la spiegazione dei moduli correntemente mostrato.
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## Perché non vedo un simbolo di glifo nel mio prompt?
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
La causa più comune è la configurazione errata del sistema. Alcune distribuzioni Linux in particolare non vengono fornite con il supporto dei font come impostazione predefinita. È necessario assicurarsi che:
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
||||
- In locale sia impostato un valore UTF-8, come `de_DE.UTF-8` o `ja_JP.UTF-8`. Se `LC_ALL` non è un valore UTF-8, [dovrai cambiarlo](https://www.tecmint.com/set-system-locales-in-linux/).
|
||||
- Hai un font emoji installato. La maggior parte dei sistemi ha un font emoji per impostazione predefinita, ma alcuni (in particolare Arch Linux) non lo fanno. Di solito puoi installarne uno attraverso il gestore dei pacchetti del tuo sistema-[noto emoji](https://www.google.com/get/noto/help/emoji/) è uno dei popolari.
|
||||
- Stai usando un [font Nerd](https://www.nerdfonts.com/).
|
||||
|
||||
Per testare il sistema, eseguire i seguenti comandi in un terminale:
|
||||
To test your system, run the following commands in a terminal:
|
||||
|
||||
```sh
|
||||
echo -e "\xf0\x9f\x90\x8d"
|
||||
echo -e "\xee\x82\xa0"
|
||||
```
|
||||
|
||||
La prima riga dovrebbe riprodurre una [emoji di un serpente](https://emojipedia.org/snake/), mentre la seconda dovrebbe riprodurre il [simbolo powerline di ramo (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
|
||||
Se uno dei due simboli non viene visualizzato correttamente, il sistema è ancora mal configurato. Sfortunatamente, ottenere la configurazione dei caratteri corretta a volte è difficile. Gli utenti su Discord potrebbero essere in grado di aiutarti. Se entrambi i simboli vengono visualizzati correttamente, ma non li vedi ancora in starship, [segnala un bug!](https://github.com/starship/starship/issues/new/choose)
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## Come posso disinstallare Starship?
|
||||
## How do I uninstall Starship?
|
||||
|
||||
Starship è altrettanto facile da disinstallare come lo è da installare.
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
|
||||
1. Rimuovi qualsiasi riga utilizzata per inizializzare Starship nella configurazione della tua shell (ad es. `~/.bashrc`).
|
||||
1. Elimina il binario di Starship.
|
||||
|
||||
Se Starship è stato installato utilizzando un gestore di pacchetti, fai riferimento alla documentazione per le istruzioni di disinstallazione.
|
||||
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
|
||||
|
||||
Se Starship è stato installato utilizzando lo script di installazione, il seguente comando eliminerà il file binario:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Individua ed elimina il binario di starship
|
||||
# Locate and delete the starship binary
|
||||
sh -c 'rm "$(which starship)"'
|
||||
```
|
||||
|
@ -181,7 +181,7 @@
|
||||
#### Installa via Package Manager
|
||||
|
||||
|
||||
##### Esempio: [Homebrew](https://brew.sh/):
|
||||
##### Con [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -304,37 +304,9 @@ Se parli correntemente una lingua diversa dall'inglese, apprezziamo molto qualsi
|
||||
|
||||
Se sei interessato ad aiutare a contribuire a Starship, dai un'occhiata alla nostra [Guida al Contributo](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Inoltre, sentiti libero di entrare nel nostro [server Discord](https://discord.gg/8Jzqu3T) e dire ciao. 👋
|
||||
|
||||
### Contributori di codice
|
||||
|
||||
Questi progetto esiste grazie a tutte le persone che contribuiscono. [[Contributo](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>
|
||||
|
||||
### Contributori Finanziari
|
||||
|
||||
Diventa un contributore finanziario e aiutaci a sostenere la nostra comunità. [[Contribuisci](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### Privati
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### Organizzazioni
|
||||
|
||||
Supporta questo progetto con la tua organizzazione. Il tuo logo apparirà qui con un link al tuo sito web. [[Contribuisci](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>
|
||||
|
||||
## 💭 Ispirato Da
|
||||
|
||||
Ti invito di controllare questi lavori precedenti che hanno contribuito a ispirare la creazione di Starship. 🙏
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un prompt ZSH per astronauti.
|
||||
|
||||
@ -349,4 +321,4 @@ Ti invito di controllare questi lavori precedenti che hanno contribuito a ispira
|
||||
|
||||
## 📝 Licenza
|
||||
|
||||
Copyright © 2019-presente, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> Questo progetto è sotto licenza [ISC](https://github.com/starship/starship/blob/master/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.
|
||||
|
@ -35,9 +35,19 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Installazione
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Ottenere il Binario
|
||||
### Getting the Binary
|
||||
|
||||
#### Imperativo
|
||||
|
||||
@ -47,7 +57,7 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Dichiarativo, singolo utente, tramite [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Abilita il modulo `programs.starship` nel tuo file `home.nix` e aggiungi le tue impostazioni
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
@ -69,7 +79,7 @@ Abilita il modulo `programs.starship` nel tuo file `home.nix` e aggiungi le tue
|
||||
}
|
||||
```
|
||||
|
||||
poi eseguire
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -77,7 +87,7 @@ home-manager switch
|
||||
|
||||
#### Dichiarativa, di sistema, con NixOS
|
||||
|
||||
Aggiungi `pkgs.starship` a `environment.systemPackages` in `configuration.nix`, poi esegui
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
|
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
![Screenshot of Pure preset](/presets/pure-prompt.png)
|
||||
|
||||
### Configurazione
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -143,7 +143,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
|
||||
|
||||
#### 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.
|
||||
::: warning This will change in the future. nu バージョン 0.33 以降のみサポートされます。 ::: Add the following to your nu config file. nu で`config path`を実行することで、設定ファイルの場所を確認できます。
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
@ -157,7 +157,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
`~/.xonshrc` の最後に以下を追加してください:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
@ -31,11 +31,23 @@ trap blastoff DEBUG # starshipを起動する前にDEBUGをトラップす
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## ウィンドウのタイトルの変更
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
いくつかのシェルプロンプトはあなたのためにウィンドウのタイトルを自動的に変更します(例えば、カレントディレクトリを反映するために)。 特に Fish はデフォルトで変更を行います。 Starship はこれをしませんが、この機能を `bash` や `zsh` に追加することは簡単にできます。
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. ただし、Starship はプロンプトを描画する一連の流れに、限定的に独自の関数を挿入することができます。
|
||||
|
||||
まず、ウィンドウのタイトルを変更する関数を定義してください( bash も zsh も同様に)
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -43,23 +55,23 @@ function set_win_title(){
|
||||
}
|
||||
```
|
||||
|
||||
タイトルをカスタマイズするために変数を利用することができます (`$USER` 、 `$HOSTNAME`、 `$PWD` が一般的です)。
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
|
||||
`bash` では関数を starship の precmd 関数としてセットしてください。
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
`zsh`では関数を `precmd_functions` の配列に追加してください。
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
|
||||
```bash
|
||||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
もし結果に満足したら、永続化のためそれぞれの行をシェルの設定ファイル (`~/.bashrc` もしくは `~/.zshrc`) に追加してください。
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
たとえば、現在のディレクトリをターミナルタブのタイトルに表示したい場合は、 `~/.bashrc`または`~/.zshrc`に以下のスニペットを追加します。
|
||||
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -68,13 +80,24 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
`right_format` is currently supported for the following shells: elvish, fish, zsh.
|
||||
## 右プロンプトの有効化
|
||||
|
||||
シェルによっては、入力と同じ行にレンダリングされる右プロンプトをサポートしています。 Starship では `right_format` オプションを使って右プロンプトの内容を設定できます。 `format`で使用できるモジュールはすべて`right_format`でも使用できます。 変数`$all`には、`format`や`right_format`で明示的に使用されていないモジュールのみが格納されます。
|
||||
|
||||
注意: 右プロンプトは入力の場所に続く単一の行です。 複数行のプロンプトで入力行の上を右寄せにするには、[fillモジュール](/config/#fill)を参照してください。
|
||||
|
||||
`right_format` は現在、次のシェルでサポートされています: elvish, fish, zsh
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -88,7 +111,7 @@ format = """$character"""
|
||||
right_format = """$all"""
|
||||
```
|
||||
|
||||
Produces a prompt like the following:
|
||||
次のようなプロンプトが生成されます:
|
||||
|
||||
```
|
||||
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -56,41 +56,67 @@ CentOS6や7などで事前にビルドされたバイナリを使用していて
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## よくわからない記号を見つけました。これはどういった意味ですか?
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
不明な記号に遭遇した場合、`starship explain` を使用することで、現在表示しているモジュールの説明を見ることができます。
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## 私のプロンプトで記号のグリフがないのはなぜですか?
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
よくある原因はシステム上での設定ミスです。 いくつかのLinuxディストリビューションの初期設定にフォントサポートがありません。 次のことを確認してください。
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
||||
- ロケールが、`de_DE.UTF-8`や` ja_JP.UTF-8`などのUTF-8に設定されている。 `LC_ALL`がUTF-8でない場合、[変更する必要があります](https://www.tecmint.com/set-system-locales-in-linux/)。
|
||||
- 絵文字フォントがインストールされている。 ほとんどのシステムにはデフォルトで絵文字フォントが付属していますが、 一部 (特にArch Linux) はそうではありません。 通常、システムの パッケージマネージャーからインストールすることができます。--[noto emoji](https://www.google.com/get/noto/help/emoji/)は一般的な選択肢です。
|
||||
- [Nerd Font](https://www.nerdfonts.com/)を使用している。
|
||||
|
||||
ターミナルで以下のコマンドを実行することでテストできます。
|
||||
To test your system, run the following commands in a terminal:
|
||||
|
||||
```sh
|
||||
echo -e "\xf0\x9f\x90\x8d"
|
||||
echo -e "\xee\x82\xa0"
|
||||
```
|
||||
|
||||
一行目は[蛇の絵文字](https://emojipedia.org/snake/)、二行目は[powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs)が表示されるはずです。
|
||||
The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
|
||||
もし、どちらの記号とも正しく表示されない場合は、システムの設定が間違っています。 不幸にも、正しくフォントを設定するのは難しいものです。 Discordのユーザーが助けてくれるかもしれません! もし記号が正しく表示されているのにもかかわらず、Starshipが正しく表示されていない場合は、[バグの報告](https://github.com/starship/starship/issues/new/choose)をお願いします。
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## Starshipをアンインストールしたい
|
||||
## How do I uninstall Starship?
|
||||
|
||||
Starshipのアンインストールはインストールと同じぐらい簡単です。
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
|
||||
1. Starshipを初期化するために使用した、シェルの設定行を削除します (例:`~/.bashrc`)。
|
||||
1. Starshipのバイナリを削除します。
|
||||
|
||||
パッケージマネージャーを使用してStarshipをインストールした場合は、パッケージマネージャーのアンインストールガイドを参照してください。
|
||||
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
|
||||
|
||||
Starship をインストールスクリプトを使用してインストールした場合、次のコマンドでバイナリが削除されます。
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# starshipバイナリを見つけて削除
|
||||
sh -c 'rm "$(which starship)"''
|
||||
# Locate and delete the starship binary
|
||||
sh -c 'rm "$(which starship)"'
|
||||
```
|
||||
|
@ -181,7 +181,7 @@
|
||||
#### パッケージマネージャー経由でインストール
|
||||
|
||||
|
||||
##### 例: [Homebrew の場合](https://brew.sh/):
|
||||
##### [ Homebrew ](https://brew.sh/)の場合:
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -304,37 +304,9 @@
|
||||
|
||||
もしあなたが Starship への貢献に興味がある場合は、我々の[貢献ガイド](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)をご覧ください。 また、気軽に我々の[Discord サーバー](https://discord.gg/8Jzqu3T)へ顔を出してください。 👋
|
||||
|
||||
### コードに貢献していただいた方々
|
||||
|
||||
このプロジェクトは、貢献したすべての人々のおかげで存在します。 [[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>
|
||||
|
||||
### 財政的な貢献をしていただいた方々
|
||||
|
||||
財政的な貢献者になって、私たちのコミュニティを維持するのを助けていただけると嬉しいです。 [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### 個人
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### 組織
|
||||
|
||||
あなたの組織でこのプロジェクトをサポートします。 あなたのロゴはあなたのウェブサイトへのリンクとここに表示されます。 [[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 の作成に影響を与えた、これまでのプロジェクトをチェックしてください 🙏
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - 宇宙飛行士のための ZSH プロンプト。
|
||||
|
||||
@ -349,4 +321,4 @@
|
||||
|
||||
## 📝 ライセンス
|
||||
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> このプロジェクトは [ISC](https://github.com/starship/starship/blob/master/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.
|
||||
|
@ -35,9 +35,19 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### インストール
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### バイナリの取得
|
||||
### Getting the Binary
|
||||
|
||||
#### Imperatively
|
||||
|
||||
@ -47,14 +57,14 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarative, single user, via [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
`home.nix`ファイルで`programs.starship`を有効にして、設定を追加してください。
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# ~/.config/starship.toml に書き込まれる設定
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
@ -69,7 +79,7 @@ nix-env -iA nixos.starship
|
||||
}
|
||||
```
|
||||
|
||||
そして、次を実行してください
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -77,7 +87,7 @@ home-manager switch
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
`configuration.nix`で`environment.systemPackages`に`pkgs.starship`を追加して、次を実行してください
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
|
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
![Screenshot of Pure preset](/presets/pure-prompt.png)
|
||||
|
||||
### 設定
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -31,6 +31,18 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
@ -68,6 +80,17 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
|
@ -212,6 +212,7 @@ $nodejs\
|
||||
$ocaml\
|
||||
$perl\
|
||||
$php\
|
||||
$pulumi\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
@ -385,7 +386,7 @@ style = "bold red"
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
discharging_symbol = "💦"
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
@ -788,7 +789,7 @@ truncation_symbol = "…/"
|
||||
|
||||
## Docker Context
|
||||
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
|
||||
### Options
|
||||
|
||||
@ -983,7 +984,7 @@ default = "unknown user"
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | | The symbol used before displaying the variable value. |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
@ -1065,10 +1066,11 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | The style for the module. |
|
||||
| Option | Default | Description |
|
||||
| ---------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `fill` module |
|
||||
|
||||
### Example
|
||||
|
||||
@ -2110,7 +2112,7 @@ symbol = "☁️ "
|
||||
|
||||
## Package Version
|
||||
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages.
|
||||
|
||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||
- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||
- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||
- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present
|
||||
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
||||
|
||||
> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager.
|
||||
@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
|
||||
format = "via [🔹 $version](147 bold) "
|
||||
```
|
||||
|
||||
## Pulumi
|
||||
|
||||
The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version.
|
||||
|
||||
::: tip
|
||||
|
||||
By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version).
|
||||
|
||||
:::
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
|
||||
| `style` | `"bold 5"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `pulumi` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | ---------- | ------------------------------------ |
|
||||
| version | `v0.12.24` | The version of `pulumi` |
|
||||
| stack | `dev` | The current Pulumi stack |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Example
|
||||
|
||||
#### With Pulumi Version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[pulumi]
|
||||
format = "[🛥 ($version )$stack]($style) "
|
||||
```
|
||||
|
||||
#### Without Pulumi version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
[pulumi]
|
||||
symbol = "🛥 "
|
||||
format = "[$symbol$stack]($style) "
|
||||
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met:
|
||||
@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ------------ | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `"[$indicator]($style) "` | The format for the module. |
|
||||
| `style` | `"white bold"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Default | Description |
|
||||
| --------- | ------- | ---------------------------------------------------------- |
|
||||
| indicator | | Mirrors the value of `indicator` for currently used shell. |
|
||||
| style\* | | Mirrors the value of option `style`. |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Examples
|
||||
|
||||
@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
fish_indicator = ""
|
||||
powershell_indicator = "_"
|
||||
unknown_indicator = "mystery shell"
|
||||
style = "cyan bold"
|
||||
disabled = false
|
||||
```
|
||||
|
||||
@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.terraform` folder
|
||||
- Current directory contains a file with the `.tf` or `.hcl` extensions
|
||||
- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions
|
||||
|
||||
### Options
|
||||
|
||||
@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💠"` | A format string shown before the terraform workspace. |
|
||||
| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold 105"` | The style for the module. |
|
||||
@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
:::
|
||||
|
||||
::: warning Command output is printed unescaped to the prompt
|
||||
|
||||
Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell.
|
||||
|
||||
Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html).
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
files = ["foo"] # can specify filters but wildcards are not supported
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
format = " transcending [$output]($style)"
|
||||
|
||||
[custom.time]
|
||||
command = "time /T"
|
||||
files = ["*.pst"]
|
||||
extensions = ["pst"] # filters *.pst files
|
||||
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
|
||||
```
|
||||
|
@ -56,10 +56,36 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
@ -181,7 +181,7 @@
|
||||
#### 패키지 매니저를 이용한 설치
|
||||
|
||||
|
||||
##### 예제: [Homebrew](https://brew.sh/):
|
||||
##### [Homebrew](https://brew.sh/)를 통한 설치:
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -304,34 +304,6 @@ If you are fluent in a non-English language, we greatly appreciate any help keep
|
||||
|
||||
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
|
||||
|
||||
### 코드 기여
|
||||
|
||||
This project exists thanks to all the people who 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. [[기여](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### Individuals
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### 조직
|
||||
|
||||
Support this project with your organization. Your logo will show up here with a link to your website. [[기여](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>
|
||||
|
||||
## 💭 Inspired By
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
@ -344,7 +316,7 @@ Please check out these previous works that helped inspire the creation of starsh
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship 로켓 아이콘">
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
</p>
|
||||
|
||||
## 📝라이선스
|
||||
|
@ -35,6 +35,16 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Installation
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
|
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
![Screenshot of Pure preset](/presets/pure-prompt.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -143,7 +143,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### 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.
|
||||
::: warning This will change in the future. ::: Add the following to your nu config file. De locatie van hiervan kunt u vinden door `config path` uit te voeren in nushell.
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
|
@ -31,6 +31,18 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
@ -68,6 +80,17 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
|
@ -212,6 +212,7 @@ $nodejs\
|
||||
$ocaml\
|
||||
$perl\
|
||||
$php\
|
||||
$pulumi\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
@ -385,7 +386,7 @@ style = "bold red"
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
discharging_symbol = "💦"
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
@ -788,7 +789,7 @@ truncation_symbol = "…/"
|
||||
|
||||
## Docker Context
|
||||
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
|
||||
### Options
|
||||
|
||||
@ -983,7 +984,7 @@ default = "unknown user"
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | | The symbol used before displaying the variable value. |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
@ -1065,10 +1066,11 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | The style for the module. |
|
||||
| Option | Default | Description |
|
||||
| ---------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `fill` module |
|
||||
|
||||
### Example
|
||||
|
||||
@ -2110,7 +2112,7 @@ symbol = "☁️ "
|
||||
|
||||
## Package Version
|
||||
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages.
|
||||
|
||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||
- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||
- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||
- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present
|
||||
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
||||
|
||||
> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager.
|
||||
@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
|
||||
format = "via [🔹 $version](147 bold) "
|
||||
```
|
||||
|
||||
## Pulumi
|
||||
|
||||
The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version.
|
||||
|
||||
::: tip
|
||||
|
||||
By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version).
|
||||
|
||||
:::
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
|
||||
| `style` | `"bold 5"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `pulumi` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | ---------- | ------------------------------------ |
|
||||
| version | `v0.12.24` | The version of `pulumi` |
|
||||
| stack | `dev` | The current Pulumi stack |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Example
|
||||
|
||||
#### With Pulumi Version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[pulumi]
|
||||
format = "[🛥 ($version )$stack]($style) "
|
||||
```
|
||||
|
||||
#### Without Pulumi version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
[pulumi]
|
||||
symbol = "🛥 "
|
||||
format = "[$symbol$stack]($style) "
|
||||
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met:
|
||||
@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ------------ | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `"[$indicator]($style) "` | The format for the module. |
|
||||
| `style` | `"white bold"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Default | Description |
|
||||
| --------- | ------- | ---------------------------------------------------------- |
|
||||
| indicator | | Mirrors the value of `indicator` for currently used shell. |
|
||||
| style\* | | Mirrors the value of option `style`. |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Examples
|
||||
|
||||
@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
fish_indicator = ""
|
||||
powershell_indicator = "_"
|
||||
unknown_indicator = "mystery shell"
|
||||
style = "cyan bold"
|
||||
disabled = false
|
||||
```
|
||||
|
||||
@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.terraform` folder
|
||||
- Current directory contains a file with the `.tf` or `.hcl` extensions
|
||||
- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions
|
||||
|
||||
### Options
|
||||
|
||||
@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💠"` | A format string shown before the terraform workspace. |
|
||||
| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold 105"` | The style for the module. |
|
||||
@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
:::
|
||||
|
||||
::: warning Command output is printed unescaped to the prompt
|
||||
|
||||
Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell.
|
||||
|
||||
Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html).
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
files = ["foo"] # can specify filters but wildcards are not supported
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
format = " transcending [$output]($style)"
|
||||
|
||||
[custom.time]
|
||||
command = "time /T"
|
||||
files = ["*.pst"]
|
||||
extensions = ["pst"] # filters *.pst files
|
||||
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
|
||||
```
|
||||
|
@ -56,10 +56,36 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
@ -179,7 +179,7 @@
|
||||
#### Installeren via pakketbeheerder
|
||||
|
||||
|
||||
##### Voorbeeld: [Homebrew](https://brew.sh/):
|
||||
##### With [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -302,34 +302,6 @@ If you are fluent in a non-English language, we greatly appreciate any help keep
|
||||
|
||||
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
|
||||
|
||||
### 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>
|
||||
|
||||
## 💭 Inspired By
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
@ -35,6 +35,16 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Installation
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
|
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
![Screenshot of Pure preset](/presets/pure-prompt.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -99,7 +99,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Powershell
|
||||
|
||||
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Zazwyczaj jest to `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` lub `~/.config/powershell/Microsoft.PowerShell_profile.ps1` na -Nixie.
|
||||
Dodaj na koniec pliku `Microsoft.PowerShell_profile.ps1`. Możesz sprawdzić lokalizację tego pliku odczytując zmienną środowiskową `$PROFILE` w PowerShell. Zazwyczaj jest to `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` lub `~/.config/powershell/Microsoft.PowerShell_profile.ps1` na -Nixie.
|
||||
|
||||
```sh
|
||||
Invoke-Expression (&starship init powershell)
|
||||
@ -143,7 +143,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### 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.
|
||||
::: warning This will change in the future. Działa tylko dla wersji powłoki nu v0.33 lub wyższej. ::: Add the following to your nu config file. Możesz sprawdzić lokalizację tego pliku wywołując polecenie `config path` w powłoce nu.
|
||||
|
||||
```toml
|
||||
startup = [
|
||||
@ -157,7 +157,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
Dodaj na koniec pliku `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
@ -31,6 +31,18 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
@ -68,6 +80,17 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
|
@ -212,6 +212,7 @@ $nodejs\
|
||||
$ocaml\
|
||||
$perl\
|
||||
$php\
|
||||
$pulumi\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
@ -273,7 +274,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ---------------- | ------------------------------------------- |
|
||||
| region | `ap-northeast-1` | The current AWS region |
|
||||
| profile | `astronauts` | The current AWS profile |
|
||||
@ -385,7 +386,7 @@ style = "bold red"
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
discharging_symbol = "💦"
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
@ -426,9 +427,9 @@ By default it only changes color. If you also want to change its shape take a lo
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | ------- | --------------------------------------------------------------------- |
|
||||
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
|
||||
| Zmienne | Example | Description |
|
||||
| ------- | ------- | --------------------------------------------------------------------- |
|
||||
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
|
||||
|
||||
### Examples
|
||||
|
||||
@ -483,7 +484,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | --------- | ------------------------------------ |
|
||||
| version | `v3.17.3` | The version of cmake |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -513,7 +514,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ---------- | ------------------------------------ |
|
||||
| version | `v3.1.2.0` | The version of `cobol` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -553,7 +554,7 @@ Showing desktop notifications requires starship to be built with `rust-notify` s
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | --------------------------------------- |
|
||||
| duration | `16m40s` | The time it took to execute the command |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
@ -593,7 +594,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| ----------- | ------------ | ------------------------------------ |
|
||||
| environment | `astronauts` | The current conda environment |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -632,7 +633,7 @@ The `crystal` module shows the currently installed version of [Crystal](https://
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | --------- | ------------------------------------ |
|
||||
| version | `v0.32.1` | The version of `crystal` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -672,7 +673,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v2.8.4` | The version of `dart` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -709,7 +710,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v1.8.3` | The version of `deno` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -769,7 +770,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | --------------------- | ----------------------------------- |
|
||||
| path | `"D:/Projects"` | The current directory path |
|
||||
| style\* | `"black bold dimmed"` | Mirrors the value of option `style` |
|
||||
@ -788,7 +789,7 @@ truncation_symbol = "…/"
|
||||
|
||||
## Docker Context
|
||||
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
|
||||
### Options
|
||||
|
||||
@ -805,7 +806,7 @@ The `docker_context` module shows the currently active [Docker context](https://
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------------- | ------------------------------------ |
|
||||
| context | `test_context` | The current docker context |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -859,7 +860,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ---------------- | ------------------------------------------------------------------ |
|
||||
| version | `v3.1.201` | The version of `dotnet` sdk |
|
||||
| tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting |
|
||||
@ -900,7 +901,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| ----------- | ------- | ------------------------------------ |
|
||||
| version | `v1.10` | The version of `elixir` |
|
||||
| otp_version | | The otp version of `elixir` |
|
||||
@ -943,7 +944,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | --------- | ------------------------------------ |
|
||||
| version | `v0.19.1` | The version of `elm` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -983,15 +984,15 @@ default = "unknown user"
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `zmienne` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ------------------------------------------- | ------------------------------------------ |
|
||||
| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -1042,7 +1043,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | --------- | ------------------------------------ |
|
||||
| version | `v22.1.3` | The version of `erlang` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -1065,10 +1066,11 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | The style for the module. |
|
||||
| Option | Default | Description |
|
||||
| ---------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `fill` module |
|
||||
|
||||
### Example
|
||||
|
||||
@ -1104,7 +1106,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ------------- | ------------------------------------------------------------------ |
|
||||
| region | `us-central1` | The current GCP region |
|
||||
| account | `foo` | The current GCP profile |
|
||||
@ -1168,7 +1170,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| ------------- | -------- | ------------------------------------------------------------------------------------------------------ |
|
||||
| branch | `master` | The current branch name, falls back to `HEAD` if there's no current branch (e.g. git detached `HEAD`). |
|
||||
| remote_name | `origin` | The remote name. |
|
||||
@ -1207,7 +1209,7 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | --------- | ----------------------------------- |
|
||||
| hash | `b703eb3` | The current git commit hash |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
@ -1245,7 +1247,7 @@ The `git_state` module will show in directories which are part of a git reposito
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| ---------------- | ---------- | ----------------------------------- |
|
||||
| state | `REBASING` | The current state of the repo |
|
||||
| progress_current | `1` | The current operation progress |
|
||||
@ -1286,7 +1288,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| ----------------- | ------- | ------------------------------------------- |
|
||||
| added | `1` | The current number of added lines |
|
||||
| deleted | `2` | The current number of deleted lines |
|
||||
@ -1332,7 +1334,7 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| Zmienne | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
@ -1349,16 +1351,16 @@ The following variables can be used in `format`:
|
||||
|
||||
The following variables can be used in `diverged`:
|
||||
|
||||
| Variable | Description |
|
||||
| Zmienne | Description |
|
||||
| -------------- | ---------------------------------------------- |
|
||||
| `ahead_count` | Number of commits ahead of the tracking branch |
|
||||
| `behind_count` | Number of commits behind the tracking branch |
|
||||
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------- | ------------------------ |
|
||||
| `count` | Show the number of files |
|
||||
| Zmienne | Description |
|
||||
| ------- | ------------------------ |
|
||||
| `count` | Show the number of files |
|
||||
|
||||
### Example
|
||||
|
||||
@ -1418,7 +1420,7 @@ The `golang` module shows the currently installed version of [Go](https://golang
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | --------- | ------------------------------------ |
|
||||
| version | `v1.12.1` | The version of `go` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -1457,7 +1459,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v3.1.1` | The version of `helm` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -1490,7 +1492,7 @@ The `hostname` module shows the system hostname.
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ------- | ------------------------------------ |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
@ -1531,7 +1533,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ------- | ------------------------------------ |
|
||||
| version | `v14` | The version of `java` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -1587,7 +1589,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ------- | ------------------------------------ |
|
||||
| number | `1` | The number of jobs |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -1629,7 +1631,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v1.4.0` | The version of `julia` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -1668,7 +1670,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | --------- | ------------------------------------ |
|
||||
| version | `v1.4.21` | The version of `kotlin` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -1715,7 +1717,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------------------- | ---------------------------------------- |
|
||||
| context | `starship-cluster` | The current kubernetes context |
|
||||
| namespace | `starship-namespace` | If set, the current kubernetes namespace |
|
||||
@ -1802,7 +1804,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v5.4.0` | The version of `lua` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -1843,7 +1845,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| ---------------- | ------------- | ------------------------------------------------------------------ |
|
||||
| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. |
|
||||
| ram_pct | `48%` | The percentage of the current system memory. |
|
||||
@ -1883,7 +1885,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| branch | `master` | The active mercurial branch |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -1926,7 +1928,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v1.2.0` | The version of `nimc` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -1961,7 +1963,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ------- | ------------------------------------ |
|
||||
| state | `pure` | The state of the nix-shell |
|
||||
| name | `lorri` | The name of the nix-shell |
|
||||
@ -2009,7 +2011,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ---------- | ------------------------------------ |
|
||||
| version | `v13.12.0` | The version of `node` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -2054,7 +2056,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| ---------------- | ------------ | ----------------------------------------------------------------- |
|
||||
| version | `v4.10.0` | The version of `ocaml` |
|
||||
| switch_name | `my-project` | The active OPAM switch |
|
||||
@ -2088,7 +2090,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ------- | ------------------------------------ |
|
||||
| cloud | `corp` | The current OpenStack cloud |
|
||||
| project | `dev` | The current OpenStack project |
|
||||
@ -2110,7 +2112,7 @@ symbol = "☁️ "
|
||||
|
||||
## Package Version
|
||||
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages.
|
||||
|
||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||
- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||
- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||
- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present
|
||||
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
||||
|
||||
> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager.
|
||||
@ -2141,7 +2144,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v1.0.0` | The version of your package |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -2183,7 +2186,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | --------- | ------------------------------------ |
|
||||
| version | `v5.26.1` | The version of `perl` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -2221,7 +2224,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v7.3.8` | The version of `php` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
|
||||
format = "via [🔹 $version](147 bold) "
|
||||
```
|
||||
|
||||
## Pulumi
|
||||
|
||||
The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version.
|
||||
|
||||
::: tip
|
||||
|
||||
By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version).
|
||||
|
||||
:::
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
|
||||
| `style` | `"bold 5"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `pulumi` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ---------- | ------------------------------------ |
|
||||
| version | `v0.12.24` | The version of `pulumi` |
|
||||
| stack | `dev` | The current Pulumi stack |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Example
|
||||
|
||||
#### With Pulumi Version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[pulumi]
|
||||
format = "[🛥 ($version )$stack]($style) "
|
||||
```
|
||||
|
||||
#### Without Pulumi version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
[pulumi]
|
||||
symbol = "🛥 "
|
||||
format = "[$symbol$stack]($style) "
|
||||
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met:
|
||||
@ -2260,7 +2320,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `0.13.5` | The version of `purescript` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -2321,7 +2381,7 @@ The default values and order for `python_binary` was chosen to first identify th
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| ------------ | --------------- | ------------------------------------------ |
|
||||
| version | `"v3.8.1"` | The version of `python` |
|
||||
| symbol | `"🐍 "` | Mirrors the value of option `symbol` |
|
||||
@ -2393,11 +2453,11 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | ------------- | ------------------------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style | `"blue bold"` | Mirrors the value of option `style` |
|
||||
| Zmienne | Example | Description |
|
||||
| ------- | ------------- | ------------------------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style | `"blue bold"` | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
@ -2429,7 +2489,7 @@ By default the `red` module shows the currently installed version of [Red](https
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v2.5.1` | The version of `red` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -2469,7 +2529,7 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v2.5.1` | The version of `ruby` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -2508,7 +2568,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ----------------- | ------------------------------------ |
|
||||
| version | `v1.43.0-nightly` | The version of `rustc` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -2548,7 +2608,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ------------ | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `"[$indicator]($style) "` | The format for the module. |
|
||||
| `style` | `"white bold"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Default | Description |
|
||||
| Zmienne | Default | Description |
|
||||
| --------- | ------- | ---------------------------------------------------------- |
|
||||
| indicator | | Mirrors the value of `indicator` for currently used shell. |
|
||||
| style\* | | Mirrors the value of option `style`. |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Examples
|
||||
|
||||
@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
fish_indicator = ""
|
||||
powershell_indicator = "_"
|
||||
unknown_indicator = "mystery shell"
|
||||
style = "cyan bold"
|
||||
disabled = false
|
||||
```
|
||||
|
||||
@ -2626,7 +2691,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ------- | ------------------------------------ |
|
||||
| shlvl | `3` | The current value of `SHLVL` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -2660,7 +2725,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ------------ | ------------------------------------ |
|
||||
| env | `centos.img` | The current Singularity image |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -2710,7 +2775,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| status | `127` | The exit code of the last command |
|
||||
| int | `127` | The exit code of the last command |
|
||||
@ -2761,7 +2826,7 @@ By default the `swift` module shows the currently installed version of [Swift](h
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v5.2.4` | The version of `swift` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.terraform` folder
|
||||
- Current directory contains a file with the `.tf` or `.hcl` extensions
|
||||
- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions
|
||||
|
||||
### Options
|
||||
|
||||
@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💠"` | A format string shown before the terraform workspace. |
|
||||
| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold 105"` | The style for the module. |
|
||||
@ -2808,7 +2873,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ---------- | ------------------------------------ |
|
||||
| version | `v0.12.24` | The version of `terraform` |
|
||||
| workspace | `default` | The current Terraform workspace |
|
||||
@ -2863,7 +2928,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ---------- | ----------------------------------- |
|
||||
| time | `13:08:10` | The current time. |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
@ -2910,10 +2975,10 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | ------------ | ------------------------------------------------------------------------------------------- |
|
||||
| `style` | `"red bold"` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. |
|
||||
| `user` | `"matchai"` | The currently logged-in user ID. |
|
||||
| Zmienne | Example | Description |
|
||||
| ------- | ------------ | ------------------------------------------------------------------------------------------- |
|
||||
| `style` | `"red bold"` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. |
|
||||
| `user` | `"matchai"` | The currently logged-in user ID. |
|
||||
|
||||
### Example
|
||||
|
||||
@ -2949,7 +3014,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ---------------- | ------------------------------------ |
|
||||
| version | `Vagrant 2.2.10` | The version of `Vagrant` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -2987,7 +3052,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ------- | ------------------------------------ |
|
||||
| version | `v0.2` | The version of `v` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -3016,7 +3081,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ------------------------------------------- | ------------------------------------ |
|
||||
| repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -3054,7 +3119,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v0.6.0` | The version of `zig` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
:::
|
||||
|
||||
::: warning Command output is printed unescaped to the prompt
|
||||
|
||||
Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell.
|
||||
|
||||
Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html).
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
@ -3120,7 +3193,7 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Description |
|
||||
| Zmienne | Description |
|
||||
| --------- | -------------------------------------- |
|
||||
| output | The output of shell command in `shell` |
|
||||
| symbol | Mirrors the value of option `symbol` |
|
||||
@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
files = ["foo"] # can specify filters but wildcards are not supported
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
format = " transcending [$output]($style)"
|
||||
|
||||
[custom.time]
|
||||
command = "time /T"
|
||||
files = ["*.pst"]
|
||||
extensions = ["pst"] # filters *.pst files
|
||||
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
|
||||
```
|
||||
|
@ -56,9 +56,35 @@ Jeżeli podczas używania gotowych instalacji (np. na CentOS 6 lub 7) pojawia si
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## W wierszu poleceń zauważyłem symbole których się nie spodziewałem bądź nie rozumiem. Co one oznaczają?
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Jeśli zauważyłeś symbole których nie rozpoznajesz, możesz użyć `starship explain` aby uzyskać szczegółowy opis obecnie wyświetlanych modułów.
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
@ -79,9 +105,9 @@ The first line should produce a [snake emoji](https://emojipedia.org/snake/), wh
|
||||
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## Jak odinstalować Starship?
|
||||
## How do I uninstall Starship?
|
||||
|
||||
Starship można odinstalować równie łatwo jak przebiega proces instalacji.
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
|
||||
1. Usuń zawartość konfiguracji powłoki (np. `~/.bashrc`) służącą do zainicjalizowania Starship.
|
||||
1. Usuń plik wykonywalny programu Starship.
|
||||
|
@ -181,7 +181,7 @@
|
||||
#### Instalacja za pomocą menedżera pakietów
|
||||
|
||||
|
||||
##### Przykład: [Homebrew](https://brew.sh/):
|
||||
##### With [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -304,37 +304,9 @@ Jeśli płynnie władasz językiem innym niż angielski, bardzo doceniamy każd
|
||||
|
||||
Jeżeli chcesz wspomóc tworzenie starship, zapoznaj się z naszym [Poradnikiem Współpracy](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Ponadto możesz wejść na nasz [serwer Discord](https://discord.gg/8Jzqu3T) i się przywitać. 👋
|
||||
|
||||
### Współtwórcy kodu
|
||||
|
||||
Ten projekt istnieje dzięki pomocy wszystkich zaangażowanych osób. [[Wspomóż nas](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>
|
||||
|
||||
### Wsparcie finansowe
|
||||
|
||||
Udziel wsparcia finansowego i pomóż nam utrzymywać społeczność. [[Wspomóż nas](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### Osoby prywatne
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### Organizacje
|
||||
|
||||
Wspieraj ten projekt za pomocą swojej organizacji. Twoje logo pojawi się tutaj z linkiem do Twojej witryny. [[Wspomóż nas](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>
|
||||
|
||||
## 💭Inspiracje
|
||||
|
||||
Zapoznaj się z wcześniejszymi projektami które zainspirowały nas do stworzenia starship. 🙏
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Wiersz poleceń ZSH dla astronautów.
|
||||
|
||||
|
@ -35,6 +35,16 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Instalacja
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
|
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
![Screenshot of Pure preset](/presets/pure-prompt.png)
|
||||
|
||||
### Konfiguracja
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -31,11 +31,23 @@ trap blastoff DEBUG # Trap Inicia o debug antes de iniciar o starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Altera o título da janela
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
Alguns shell prompts iram alterar o titulo da janela automaticamente para você (e.x: para espelhar o diretório atual). Fish faz isso por padrão. Starship não faz isso, mas é bastante simples adicionar esta funcionalidade ao `bash` ou `zsh`.
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering:
|
||||
|
||||
Primeiro, defina uma função de alteração de titulo de janela (é o mesmo para bash e zsh):
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -43,23 +55,23 @@ function set_win_title(){
|
||||
}
|
||||
```
|
||||
|
||||
Você pode usar variáveis para customizar o titulo (`$USER`, `$HOSTNAME`, e `$PWD` são escolhas populares).
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
|
||||
No `bash`, defina esta função como a precedente da função starship:
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
No `zsh`, adicione no array `precmd_functions`:
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
|
||||
```bash
|
||||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
Se você gostar do resultado, adicione esta linha ao seu arquivo de configuração de shell (`~/.bashrc` or `~/.zshrc`) para torna-lo permanente.
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
Por exemplo, se você quiser exibir seu diretório atual no seu titulo de aba do terminal, adicione o seguinte snippet ao seu `~/.bashrc` ou `~/.zshrc`:
|
||||
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -68,9 +80,20 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
## Ativando o Prompt Direito
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
Alguns shells suportam um prompt no lado direito que renderiza na mesma linha do input. Starship consegue definir o conteúdo do prompt direito usando a opção `right_format`. Qualquer módulo pode ser usado no `format` é suportado o `right_format`. A variável `$all` só irá alterar os módulos que não usaram de forma explicita o `format` ou `right_format`.
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
|
||||
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill).
|
||||
|
||||
@ -81,14 +104,14 @@ Note: The right prompt is a single line following the input location. To right a
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Um prompt esquerdo minimo
|
||||
# A minimal left prompt
|
||||
format = """$character"""
|
||||
|
||||
# Move o resto do prompt para direita
|
||||
# move the rest of the prompt to the right
|
||||
right_format = """$all"""
|
||||
```
|
||||
|
||||
Gera um prompt parecido com o seguinte:
|
||||
Produces a prompt like the following:
|
||||
|
||||
```
|
||||
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -56,41 +56,67 @@ Se você está tendo um erro como "_version 'GLIBC_2.18' not found (required by
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Eu vejo símbolos que não entendo ou não esperado, o que isso significa?
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Se você vê símbolos que não reconhece você pode usar `starship explain` para exibir os módulos que estão sendo mostrados no momento.
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## Por que não consigo visualizar um simbolo glifo no meu prompt?
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
A causa mais comum é a configuração incorreta do sistema. Algumas distribuições Linux em particular não vem com suporte de fontes pronto para uso. Você deve conferir os pontos abaixo:
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
||||
- Sua localização está configurada como UTF-8, como por exemplo `de_DE.UTF-8` ou `ja_JP.UTF-8`. Se `LC_ALL` não estiver configurado como UTF-8, [você deve mudar](https://www.tecmint.com/set-system-locales-in-linux/).
|
||||
- Você tem uma fonte de emoji instalda. A maioria dos sistemas vem com uma fonte de emoji instalada como padrão, mas alguns não (principalmente o Arch Linux). Você pode instalar uma em seu sistema, através do gerenciador de pacotes-[noto emoji](https://www.google.com/get/noto/help/emoji/) é uma escolha popular.
|
||||
- Você está usando uma [Nerd Font](https://www.nerdfonts.com/).
|
||||
|
||||
Para testar seu sistema, execute o comando abaixo em um terminal:
|
||||
To test your system, run the following commands in a terminal:
|
||||
|
||||
```sh
|
||||
echo -e "\xf0\x9f\x90\x8d"
|
||||
echo -e "\xee\x82\xa0"
|
||||
```
|
||||
|
||||
A primeira linha deve produzir um [emoji de cobra](https://emojipedia.org/snake/), enquanto a segunda linha deve produzir um [um simbolo de bifurcação (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
|
||||
Se um dos símbolos acima falhar seu sistema ainda está configurado de forma errada. Infelizmente, obter a configuração de fontes correta as vezes é difícil. Usuários no Discord podem te ajudar. Se os dois símbolos acima exibirem de forma correta, mas você ainda continua sem visualizar no Starship, [registre um erro!](https://github.com/starship/starship/issues/new/choose)
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## Como eu desinstalo o Starship?
|
||||
## How do I uninstall Starship?
|
||||
|
||||
O Starship é tão fácil de desinstalar tão como é para instalar.
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
|
||||
1. Remova qualquer linha da configuração do seu shell (ex: `~/.bashrc`) usada para iniciar o Starship.
|
||||
1. Delete o binário do Starship.
|
||||
|
||||
Se o Starship foi instalando usando algum gerenciador de pacotes, por favor consulte as documentações do mesmo para instruções de desinstalação.
|
||||
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
|
||||
|
||||
Se o Starship foi instalado usando o script de instalação, o comando abaixo irá remover o binário:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Localiza e deleta o binario do starship
|
||||
# Locate and delete the starship binary
|
||||
sh -c 'rm "$(which starship)"'
|
||||
```
|
||||
|
@ -181,7 +181,7 @@
|
||||
#### Instalar via gerenciador de pacotes
|
||||
|
||||
|
||||
##### Exemplo: [Homebrew](https://brew.sh/):
|
||||
##### Com o [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -304,37 +304,9 @@ Se você é fluente em uma linguá não inglesa, nos ficaríamos gratos por qual
|
||||
|
||||
Se você está interessado em ajudar contribuindo com o projeto, dê uma olhada no nosso [Guia de Contribuição](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Além disso, sinta-se à vontade para entrar no nosso [servidor no Discord](https://discord.gg/8Jzqu3T) e dizer oi. 👋
|
||||
|
||||
### Contribuidores de código
|
||||
|
||||
Este projeto existe graças a todas as pessoas que contribuem. [[Contribuir](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>
|
||||
|
||||
### Contribuidores Financeiros
|
||||
|
||||
Torne-se um contribuidor financeiro e nos ajude a sustentar a nossa comunidade. [[Contribuir](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### Pessoas
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### Organizações
|
||||
|
||||
Apoie este projeto com sua organização. Seu logotipo aparecerá aqui com um link para o seu site. [[Contribuir](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>
|
||||
|
||||
## 💭 Inspirado por
|
||||
|
||||
Por favor, confira estes projetos anteriores que ajudaram a inspirar a criação do startship. 🙏
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Um prompt ZSH para astronautas.
|
||||
|
||||
@ -344,9 +316,9 @@ Por favor, confira estes projetos anteriores que ajudaram a inspirar a criação
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Ícone de foguete do Starship">
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
</p>
|
||||
|
||||
## 📝 Licença
|
||||
|
||||
Todos os direitos reservados © 2019-Presente, [Contribuidores Starship](https://github.com/starship/starship/graphs/contributors).<br /> Este projeto está licenciado pelo [ISC](https://github.com/starship/starship/blob/master/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.
|
||||
|
@ -35,9 +35,19 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Instalação
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Obtendo o Binário
|
||||
### Getting the Binary
|
||||
|
||||
#### Imperativamente
|
||||
|
||||
@ -47,7 +57,7 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarativo, usuário único, via [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Ative o modulo `programs.starship` em seu arquivo `home.nix`, e adicione suas configurações
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
@ -69,7 +79,7 @@ Ative o modulo `programs.starship` em seu arquivo `home.nix`, e adicione suas co
|
||||
}
|
||||
```
|
||||
|
||||
então execute
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -77,7 +87,7 @@ home-manager switch
|
||||
|
||||
#### Declarativo, em todo o sistema com NixOS
|
||||
|
||||
Adicione `pkgs.starship` em `environment.systemPackages` no arquivo `configuration.nix`, então execute
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
|
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
![Screenshot of Pure preset](/presets/pure-prompt.png)
|
||||
|
||||
### Configuração
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -31,6 +31,18 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
@ -68,6 +80,17 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
|
@ -212,6 +212,7 @@ $nodejs\
|
||||
$ocaml\
|
||||
$perl\
|
||||
$php\
|
||||
$pulumi\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
@ -385,7 +386,7 @@ style = "bold red"
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
discharging_symbol = "💦"
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
@ -788,7 +789,7 @@ truncation_symbol = "…/"
|
||||
|
||||
## Docker Context
|
||||
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
|
||||
### Options
|
||||
|
||||
@ -983,7 +984,7 @@ default = "unknown user"
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | | The symbol used before displaying the variable value. |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
@ -1065,10 +1066,11 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | The style for the module. |
|
||||
| Option | Default | Description |
|
||||
| ---------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `fill` module |
|
||||
|
||||
### Example
|
||||
|
||||
@ -2110,7 +2112,7 @@ symbol = "☁️ "
|
||||
|
||||
## Package Version
|
||||
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages.
|
||||
|
||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||
- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||
- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||
- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present
|
||||
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
||||
|
||||
> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager.
|
||||
@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
|
||||
format = "via [🔹 $version](147 bold) "
|
||||
```
|
||||
|
||||
## Pulumi
|
||||
|
||||
The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version.
|
||||
|
||||
::: tip
|
||||
|
||||
By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version).
|
||||
|
||||
:::
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
|
||||
| `style` | `"bold 5"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `pulumi` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | ---------- | ------------------------------------ |
|
||||
| version | `v0.12.24` | The version of `pulumi` |
|
||||
| stack | `dev` | The current Pulumi stack |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Example
|
||||
|
||||
#### With Pulumi Version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[pulumi]
|
||||
format = "[🛥 ($version )$stack]($style) "
|
||||
```
|
||||
|
||||
#### Without Pulumi version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
[pulumi]
|
||||
symbol = "🛥 "
|
||||
format = "[$symbol$stack]($style) "
|
||||
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met:
|
||||
@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ------------ | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `"[$indicator]($style) "` | The format for the module. |
|
||||
| `style` | `"white bold"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Default | Description |
|
||||
| --------- | ------- | ---------------------------------------------------------- |
|
||||
| indicator | | Mirrors the value of `indicator` for currently used shell. |
|
||||
| style\* | | Mirrors the value of option `style`. |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Examples
|
||||
|
||||
@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
fish_indicator = ""
|
||||
powershell_indicator = "_"
|
||||
unknown_indicator = "mystery shell"
|
||||
style = "cyan bold"
|
||||
disabled = false
|
||||
```
|
||||
|
||||
@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.terraform` folder
|
||||
- Current directory contains a file with the `.tf` or `.hcl` extensions
|
||||
- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions
|
||||
|
||||
### Options
|
||||
|
||||
@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💠"` | A format string shown before the terraform workspace. |
|
||||
| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold 105"` | The style for the module. |
|
||||
@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
:::
|
||||
|
||||
::: warning Command output is printed unescaped to the prompt
|
||||
|
||||
Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell.
|
||||
|
||||
Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html).
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
files = ["foo"] # can specify filters but wildcards are not supported
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
format = " transcending [$output]($style)"
|
||||
|
||||
[custom.time]
|
||||
command = "time /T"
|
||||
files = ["*.pst"]
|
||||
extensions = ["pst"] # filters *.pst files
|
||||
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
|
||||
```
|
||||
|
@ -56,10 +56,36 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
@ -181,7 +181,7 @@
|
||||
#### Install via Package Manager
|
||||
|
||||
|
||||
##### Example: [Homebrew](https://brew.sh/):
|
||||
##### With [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -304,34 +304,6 @@ If you are fluent in a non-English language, we greatly appreciate any help keep
|
||||
|
||||
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
|
||||
|
||||
### 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>
|
||||
|
||||
## 💭 Inspired By
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
@ -35,6 +35,16 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Installation
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
|
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
![Screenshot of Pure preset](/presets/pure-prompt.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -31,11 +31,23 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Изменение заголовка окна
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish даже делает это по умолчанию. Starship не делает этого, но достаточно легко добавить эту функциональность к `bash` или `zsh`.
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Тем не менее, Starship дает вам ограниченную возможность вставить собственные функции в процедуру отображения подсказки:
|
||||
|
||||
Сначала задайте функцию изменения заголовка окна (идентичную в bash и zsh):
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -43,15 +55,15 @@ function set_win_title(){
|
||||
}
|
||||
```
|
||||
|
||||
Вы можете использовать переменные для настройки этого заголовка (`$USER`, `$HOSTNAME`, и `$PWD` являются популярными вариантами).
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
|
||||
В `bash`, установите эту функцию как функцию precmd в Starship:
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
В `zsh`, добавьте это в массив `precmd_functions`:
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
|
||||
```bash
|
||||
precmd_functions+=(set_win_title)
|
||||
@ -59,7 +71,7 @@ precmd_functions+=(set_win_title)
|
||||
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
Например, если вы хотите отобразить ваш текущий каталог в заголовке вкладки терминала, добавьте следующие строки в `~/. bashrc` или `~/.zshrc`:
|
||||
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -68,6 +80,17 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -56,10 +56,36 @@ starship prompt --help
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
@ -79,7 +105,7 @@ The first line should produce a [snake emoji](https://emojipedia.org/snake/), wh
|
||||
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## Как удалить Starship?
|
||||
## How do I uninstall Starship?
|
||||
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
|
||||
|
@ -181,7 +181,7 @@
|
||||
#### Установить через менеджер пакетов
|
||||
|
||||
|
||||
##### [Homebrew](https://brew.sh/):
|
||||
##### С [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -304,37 +304,9 @@
|
||||
|
||||
Если вы хотите помочь в создании Starship, пожалуйста, ознакомьтесь с нашим [Руководством по содействию](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Кроме того, заходите на наш [Discord сервер](https://discord.gg/8Jzqu3T) и поздоровайтесь. 👋
|
||||
|
||||
### Соавторы кода
|
||||
|
||||
Этот проект существует благодаря всем тем, кто внес свой вклад. [[Внести вклад](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>
|
||||
|
||||
### Финансовые спонсоры
|
||||
|
||||
Станьте финансовым спонсором и помогайте нам поддерживать наше сообщество. [[Внести вклад](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### Частные лица
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### Организации
|
||||
|
||||
Поддержите этот проект вашей организацией. Ваш логотип будет отображаться здесь со ссылкой на ваш сайт. [[Внести вклад](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. 🙏
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - командная строка ZSH для астронавтов.
|
||||
|
||||
@ -344,9 +316,9 @@
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Иконка ракеты Starship">
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
</p>
|
||||
|
||||
## 📝 Лицензия
|
||||
|
||||
Авторское право © 2019-настоящее, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> Этот проект лицензирован под лицензией [ISC](https://github.com/starship/starship/blob/master/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.
|
||||
|
@ -35,6 +35,16 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Installation
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
|
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
![Screenshot of Pure preset](/presets/pure-prompt.png)
|
||||
|
||||
### Конфигурация
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -30,7 +30,19 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Pencere Başlığını Değiştirme
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Ancak Starship, size istem oluşturma prosedürü sayesinde kendi işlevlerinizi ekleme konusunda sınırlı bir yetenek sağlar:
|
||||
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
|
||||
@ -67,6 +79,17 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
|
@ -212,6 +212,7 @@ $nodejs\
|
||||
$ocaml\
|
||||
$perl\
|
||||
$php\
|
||||
$pulumi\
|
||||
$purescript\
|
||||
$python\
|
||||
$rlang\
|
||||
@ -385,7 +386,7 @@ style = "bold red"
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
discharging_symbol = "💦"
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
@ -788,7 +789,7 @@ truncation_symbol = "…/"
|
||||
|
||||
## Docker Context
|
||||
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
|
||||
### Options
|
||||
|
||||
@ -983,7 +984,7 @@ default = "unknown user"
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | | The symbol used before displaying the variable value. |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
@ -1065,10 +1066,11 @@ The `fill` module fills any extra space on the line with a symbol. If multiple `
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | The style for the module. |
|
||||
| Option | Default | Description |
|
||||
| ---------- | -------------- | --------------------------------- |
|
||||
| `symbol` | `"."` | The symbol used to fill the line. |
|
||||
| `style` | `"bold black"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `fill` module |
|
||||
|
||||
### Example
|
||||
|
||||
@ -2110,7 +2112,7 @@ symbol = "☁️ "
|
||||
|
||||
## Package Version
|
||||
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages.
|
||||
|
||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory
|
||||
- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
|
||||
@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||
- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present
|
||||
- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present
|
||||
- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present
|
||||
- [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present
|
||||
|
||||
> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager.
|
||||
@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
|
||||
format = "via [🔹 $version](147 bold) "
|
||||
```
|
||||
|
||||
## Pulumi
|
||||
|
||||
The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version.
|
||||
|
||||
::: tip
|
||||
|
||||
By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version).
|
||||
|
||||
:::
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml`
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | -------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string shown before the Pulumi stack. |
|
||||
| `style` | `"bold 5"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `pulumi` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | ---------- | ------------------------------------ |
|
||||
| version | `v0.12.24` | The version of `pulumi` |
|
||||
| stack | `dev` | The current Pulumi stack |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Example
|
||||
|
||||
#### With Pulumi Version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[pulumi]
|
||||
format = "[🛥 ($version )$stack]($style) "
|
||||
```
|
||||
|
||||
#### Without Pulumi version
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
[pulumi]
|
||||
symbol = "🛥 "
|
||||
format = "[$symbol$stack]($style) "
|
||||
|
||||
```
|
||||
|
||||
## PureScript
|
||||
|
||||
The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met:
|
||||
@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ------------ | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
|
||||
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
|
||||
| `ion_indicator` | `ion` | A format string used to represent ion. |
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `"[$indicator]($style) "` | The format for the module. |
|
||||
| `style` | `"white bold"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Default | Description |
|
||||
| --------- | ------- | ---------------------------------------------------------- |
|
||||
| indicator | | Mirrors the value of `indicator` for currently used shell. |
|
||||
| style\* | | Mirrors the value of option `style`. |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Examples
|
||||
|
||||
@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
fish_indicator = ""
|
||||
powershell_indicator = "_"
|
||||
unknown_indicator = "mystery shell"
|
||||
style = "cyan bold"
|
||||
disabled = false
|
||||
```
|
||||
|
||||
@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.terraform` folder
|
||||
- Current directory contains a file with the `.tf` or `.hcl` extensions
|
||||
- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions
|
||||
|
||||
### Options
|
||||
|
||||
@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💠"` | A format string shown before the terraform workspace. |
|
||||
| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold 105"` | The style for the module. |
|
||||
@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
:::
|
||||
|
||||
::: warning Command output is printed unescaped to the prompt
|
||||
|
||||
Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell.
|
||||
|
||||
Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html).
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
files = ["foo"] # can specify filters but wildcards are not supported
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
format = " transcending [$output]($style)"
|
||||
|
||||
[custom.time]
|
||||
command = "time /T"
|
||||
files = ["*.pst"]
|
||||
extensions = ["pst"] # filters *.pst files
|
||||
shell = ["pwsh.exe", "-NoProfile", "-Command", "-"]
|
||||
```
|
||||
|
@ -56,10 +56,36 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
@ -181,7 +181,7 @@
|
||||
#### Install via Package Manager
|
||||
|
||||
|
||||
##### Example: [Homebrew](https://brew.sh/):
|
||||
##### With [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -304,34 +304,6 @@ If you are fluent in a non-English language, we greatly appreciate any help keep
|
||||
|
||||
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
|
||||
|
||||
### 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>
|
||||
|
||||
## 💭 Inspired By
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
@ -35,9 +35,19 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Kurulum
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Binary Alma
|
||||
### Getting the Binary
|
||||
|
||||
#### Zorunlu olarak
|
||||
|
||||
@ -47,7 +57,7 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Açıklayıcı, tek kullanıcı, via [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
`home.nix` dosyanızda, `programs.starship` modülünü etkinleştirin, ayarlarınızı ekleyin
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
@ -69,7 +79,7 @@ nix-env -iA nixos.starship
|
||||
}
|
||||
```
|
||||
|
||||
sonra çalıştırın
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
|
@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[pulumi]
|
||||
format = '\[[$symbol$stack]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@ -350,6 +353,9 @@ symbol = "pl "
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[pulumi]
|
||||
symbol = "pulumi "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
@ -435,6 +441,9 @@ format = 'via [$symbol]($style)'
|
||||
[php]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
[pulumi]
|
||||
format = 'via [$symbol$stack]($style)'
|
||||
|
||||
[purescript]
|
||||
format = 'via [$symbol]($style)'
|
||||
|
||||
@ -462,3 +471,60 @@ format = 'via [$symbol]($style)'
|
||||
[zig]
|
||||
format = 'via [$symbol]($style)'
|
||||
```
|
||||
|
||||
## Pure
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
![Screenshot of Pure preset](/presets/pure-prompt.png)
|
||||
|
||||
### Yapılandırma
|
||||
|
||||
```toml
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$python\
|
||||
$character"""
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vicmd_symbol = "[❮](green)"
|
||||
|
||||
[git_branch]
|
||||
format = "[$branch]($style)"
|
||||
style = "bright-black"
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
|
||||
style = "cyan"
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[python]
|
||||
format = "[$virtualenv]($style) "
|
||||
style = "bright-black"
|
||||
```
|
||||
|
@ -31,11 +31,23 @@ trap blastoff DEBUG # Bẫy DEBUG *trước khi* starship chạy
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Thay đổi tên gọi trên cửa sổ của chương trình terminal
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
Một vài shell có khả năng tự động thay đổi tên hiển thị (chẳng hạn như tên của thư mục hiện thời) trên cửa số của trình mô phỏng terminal. Fish shell mặc định thực hiện thay đổi này. Tuy không được set mặc định trên Starship, chức năng này có thể được tích hợp dễ dàng trên `bash` shell và `zsh` shell.
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Tuy nhiên, Starship cho phép bạn viết các hàm riêng của bạn để tùy biến việc render prompt:
|
||||
|
||||
Đầu tiên, ta cần định nghĩa một hàm thay đổi tiêu đề cửa sổ (dùng chung cho cả bash và zsh):
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -43,23 +55,23 @@ function set_win_title(){
|
||||
}
|
||||
```
|
||||
|
||||
Ta có thể sử dụng biến số để tuỳ chỉnh tên hiển thị này (`$USER`, `$HOSTNAME`, và `$PWD` là những biến số thường được dùng).
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
|
||||
Với `bash` shell, set precmd của starship bằng tên của hàm này:
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
Với `zsh` shell, thêm hàm này vào mảng `precmd_functions`:
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
|
||||
```bash
|
||||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
Nếu ta hài lòng với các tùy biến đã được thiết lập, thêm những dòng sau vào cấu hình shell (`~/.bashrc` hoặc `~/.zshrc`) để thực thi chúng mỗi khi ta khởi tạo một shell mới.
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
Ví dụ, nếu ta muốn hiển thị đường dẫn thư mục hiện tại trong tiêu đề của một terminal tab, thêm đoạn code sau vào `~/.bashrc` hoặc `~/.zshrc`:
|
||||
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -68,6 +80,17 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -56,37 +56,63 @@ Nếu bạn nhận được một lỗi giống như "_version 'GLIBC_2.18' not
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Tôi thấy các biểu tượng tôi không hiểu hoặc không mong muốn, chúng có nghĩa là gì?
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Nếu bạn thấy các biểu tượng bạn không biết, bạn có thể sử dụng `starship explain` để giải thích các mô đun hiện tại đang hiển thị.
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## Tại sao tôi không thấy một biểu tượng glyph trong dấu nhắc lệnh của tôi?
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
Đa số lí do phổ biến là do cái này mất cấu hình hệ thống. Một số bản phân phối Linux cụ thể không đi kèm việ hõ trợ font out-of-the-box. Bạn cần chắc chắn rằng:
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
||||
- Mã ngôn ngữ của bạn được thiết lập là một giá trị UTF-8, giống như `de_DE.UTF-8` or `ja_JP.UTF-8`. Nếu `LO_ALL` không phải là một giá trị UTF-8, [ bạn sẽ cần thay đổi nó](https://www.tecmint.com/set-system-locales-in-linux/).
|
||||
- Bạn đã cài đặt phông chữ biểu tượng cảm xúc. Đa số hệ thống đi kèm với một phông biểu tượng cảm xúc mặc định, nhưng một vài (đáng chú ý là Arch Linux) thì không. Bạn có thể thường cài đặt thông qua một trình quản lí gói hệ thống của bạn--[noto emoji](https://www.google.com/get/noto/help/emoji/) là một lựa chọn phổ biến.
|
||||
- Bạn đang sử dụng một [Nerd Font](https://www.nerdfonts.com/).
|
||||
|
||||
Để kiểm tra hệ thống của bạn, chạy các câu lệnh bên dưới trong terminal:
|
||||
To test your system, run the following commands in a terminal:
|
||||
|
||||
```sh
|
||||
echo -e "\xf0\x9f\x90\x8d"
|
||||
echo -e "\xee\x82\xa0"
|
||||
```
|
||||
|
||||
Dòng đầu tiên nên sinh ra một [snake emoji](https://emojipedia.org/snake/), trong khi dòng thứ hai nên sinh ra một [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
|
||||
Nếu biểu tượng không hiển thị đúng, hệ thống của bạn vẫn cấu hình sai. Thật không may, lấy cấu hình font đúng đôi khi khó khăn. Người dùng trên Discord có thể có giúp đỡ được. Nếu các biểu tượng hiển thị đúng, nhưng bạn vẫn không thấy chúng trong starship, [nộp một báo cáo lỗi](https://github.com/starship/starship/issues/new/choose)
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## Là thế nào để tôi gỡ cài đặt Starship?
|
||||
## How do I uninstall Starship?
|
||||
|
||||
Starship thì dễ dàng gỡ cài đặt như cài đặt ngay từ đầu.
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
|
||||
1. Gỡ mọi tập tin trong cấu hình shell của bạn (e.g. `~/.bashrc`) đã sử dụng để khởi tạo Starship.
|
||||
1. Xoá tập tin Starship nhị phân.
|
||||
|
||||
Nếu Starship đã được cài đặt bằng việc sử dụng một trình quản lí gói, vui lòng tham khảo tài liệu của chúng để gỡ cài đặt.
|
||||
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
|
||||
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch"
|
||||
alt="Tiếng Đức"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@ -63,7 +63,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español"
|
||||
alt="Tiếng Tây Ban Nha"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@ -71,7 +71,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français"
|
||||
alt="Thiếng Pháp"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@ -79,7 +79,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語"
|
||||
alt="Tiếng Nhật"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@ -95,7 +95,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский"
|
||||
alt="Tiếng Nga"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@ -111,7 +111,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文"
|
||||
alt="Tiếng Trung giản thể"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@ -119,7 +119,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文"
|
||||
alt="Tiếng Trung hiện đại"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
@ -181,7 +181,7 @@
|
||||
#### Cài đặt thông qua Trình quản lí gói
|
||||
|
||||
|
||||
##### Ví dụ: [Homebrew](https://brew.sh/):
|
||||
##### Với [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -304,37 +304,9 @@ Nếu bạn thành thạo một ngôn ngữ không phải Tiếng Anh, chúng t
|
||||
|
||||
Nếu bạn thích thú trong việc giúp đỡ đóng góp cho starship, xin hãy xem [Hướng dẫn đóng góp](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) của chúng tôi. Ngoài ra, vui lòng truy cập vào [máy chủ Discord](https://discord.gg/8Jzqu3T) và nói xin chào. 👋
|
||||
|
||||
### Cộng tác viên
|
||||
|
||||
Dự án này tồn tại là nhờ tất cả những cộng tác viên. [[Cộng tác viên](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>
|
||||
|
||||
### Những cộng tác viên về tài chính
|
||||
|
||||
Trở thành một cộng tác viên tài tài về tài chính và giúp chúng ta duy trì cộng đồng của chúng ta. [[Cộng tác viên](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### Cá nhân
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### Tổ chức
|
||||
|
||||
Hỗ trợ dự án này với tổ chức của bạn. Biểu tượng của bạn sẽ hiển thị ở đây với một liên kết tới website của bạn. [[Cộng tác viên](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>
|
||||
|
||||
## Cảm hứng
|
||||
|
||||
Xin hãy xem qua những công việc này trước đây, những thứ đã giúp truyền cảm hứng để tạo ra starship. 🙏
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt cho những phi hành gia.
|
||||
|
||||
@ -349,4 +321,4 @@ Xin hãy xem qua những công việc này trước đây, những thứ đã gi
|
||||
|
||||
## 📝 Giấy phép
|
||||
|
||||
Bản quyền © 2019-nay, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> Dự án này được [ISC](https://github.com/starship/starship/blob/master/LICENSE) cấp phép.
|
||||
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.
|
||||
|
@ -35,9 +35,19 @@ pkg install getconf
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### Cài đặt
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Lấy tệp tin nhị phân
|
||||
### Getting the Binary
|
||||
|
||||
#### Lệnh
|
||||
|
||||
@ -47,14 +57,14 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Khai báo, người dùng đơn, thông qua [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Kích hoạt mô đun `programs.starship` trong tệp `home.nix` của bạn, và thêm các cài đặt của bạn
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Cấu hình viết vào ~/.config/starship.toml
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
@ -69,7 +79,7 @@ Kích hoạt mô đun `programs.starship` trong tệp `home.nix` của bạn, v
|
||||
}
|
||||
```
|
||||
|
||||
sau đó chạy
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -77,7 +87,7 @@ home-manager switch
|
||||
|
||||
#### Khai báo, system-wide, với NixOS
|
||||
|
||||
Thêm`pkgs.starship` vào `environment.systemPackages` trong `configuration.nix` của bạn, sau đó chạy
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user