mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-28 07:46:28 +00:00
docs(i18n): New Crowdin updates (#2362)
* New translations README.md (Sorani (Kurdish)) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Simplified) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Portuguese) * 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 (Chinese Simplified) * New translations README.md (Chinese Traditional) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * 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 (Spanish) * New translations README.md (French) * New translations README.md (Portuguese) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Korean) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Russian) * 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 (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * 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 (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Chinese Simplified) * 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 Traditional) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Sorani (Kurdish)) * 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 (Spanish) * New translations README.md (Spanish) * New translations README.md (Korean) * New translations README.md (Korean) * New translations README.md (Korean) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (French) * New translations README.md (Portuguese) * 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 (Russian) * New translations README.md (Polish) * New translations README.md (Spanish) * 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 (French) * New translations README.md (Arabic) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Chinese Traditional) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Portuguese) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Russian) * 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 (Portuguese) * 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 (Russian) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Korean) * New translations README.md (German) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Portuguese) * 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 (Chinese Simplified) * New translations README.md (Chinese Traditional) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * 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 (Spanish) * New translations README.md (French) * New translations README.md (Portuguese) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Korean) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Russian) * 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 (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 (Portuguese) * 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 (Russian) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Korean) * New translations README.md (Italian) * New translations README.md (Italian)
This commit is contained in:
parent
052b56fe10
commit
3a4c9063e9
@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
|
||||
|
||||
```toml
|
||||
# Don't print a new line at the start of the prompt
|
||||
add_newline = false
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
|
||||
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.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green.
|
||||
|
||||
#### Style Strings
|
||||
@ -146,7 +146,7 @@ This is the list of prompt-wide configuration options.
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `add_newline` | `true` | Add a new line before the start of the prompt. |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
@ -162,7 +162,7 @@ format = """
|
||||
# Wait 10 milliseconds for starship to check files under the current directory.
|
||||
scan_timeout = 10
|
||||
|
||||
# Disable the newline at the start of the prompt
|
||||
# Disable the blank line at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
@ -207,6 +207,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
|
||||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
|
||||
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -1343,6 +1346,12 @@ symbol = "🌟 "
|
||||
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. 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.
|
||||
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### Options
|
||||
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| 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
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `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. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
|
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
|
||||
@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
## 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:
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt" />
|
||||
alt="Starship – Cross-shell prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="GitHub Actions workflow status" /></a>
|
||||
alt="GitHub Actions workflow status"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io version" /></a>
|
||||
alt="Crates.io version"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<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" /></a>
|
||||
alt="Chat on Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter" /></a>
|
||||
alt="Follow @StarshipPrompt on Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship with iTerm2 and the Snazzy theme"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
|
||||
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 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).
|
||||
|
@ -8,13 +8,29 @@ To install starship, you need to do two things:
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### Installation
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
@ -31,7 +47,29 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarative, single user, via [home-manager](home-manager)
|
||||
|
||||
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -39,18 +77,8 @@ home-manager switch
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### With Nix and home-manager, using zsh:
|
||||
|
||||
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module.
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
|
||||
|
||||
```toml
|
||||
# Don't print a new line at the start of the prompt
|
||||
add_newline = false
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
|
||||
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.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green.
|
||||
|
||||
#### Style Strings
|
||||
@ -146,7 +146,7 @@ This is the list of prompt-wide configuration options.
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `add_newline` | `true` | Add a new line before the start of the prompt. |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
@ -162,7 +162,7 @@ format = """
|
||||
# Wait 10 milliseconds for starship to check files under the current directory.
|
||||
scan_timeout = 10
|
||||
|
||||
# Disable the newline at the start of the prompt
|
||||
# Disable the blank line at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
@ -207,6 +207,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
|
||||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
|
||||
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -1343,6 +1346,12 @@ symbol = "🌟 "
|
||||
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. 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.
|
||||
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### Options
|
||||
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| 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
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `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. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
|
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
|
||||
@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
## 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:
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt" />
|
||||
alt="Starship – Cross-shell prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="GitHub Actions workflow status" /></a>
|
||||
alt="GitHub Actions workflow status"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io version" /></a>
|
||||
alt="Crates.io version"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<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" /></a>
|
||||
alt="Chat on Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter" /></a>
|
||||
alt="Follow @StarshipPrompt on Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship with iTerm2 and the Snazzy theme"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
|
||||
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 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).
|
||||
|
@ -8,13 +8,29 @@ To install starship, you need to do two things:
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### Installation
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
@ -31,7 +47,29 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarative, single user, via [home-manager](home-manager)
|
||||
|
||||
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -39,18 +77,8 @@ home-manager switch
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### With Nix and home-manager, using zsh:
|
||||
|
||||
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module.
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -123,3 +123,14 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
Die gesamte Konfiguration von Starship wird über diese [TOML](https://github.com/toml-lang/toml)-Datei durchgeführt:
|
||||
|
||||
```toml
|
||||
# Don't print a new line at the start of the prompt
|
||||
add_newline = false
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
|
||||
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.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green.
|
||||
|
||||
#### Style-Strings
|
||||
@ -146,7 +146,7 @@ Dies ist eine Liste mit Prompt-weiten Konfigurationsoptionen.
|
||||
| -------------- | ------------------------------ | ------------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout für das Scannen von Dateien (in Millisekunden). |
|
||||
| `add_newline` | `true` | Neuer Zeilenumbruch bei Start des Prompts. |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Beispiel
|
||||
|
||||
@ -162,7 +162,7 @@ format = """
|
||||
# Wait 10 milliseconds for starship to check files under the current directory.
|
||||
scan_timeout = 10
|
||||
|
||||
# Disable the newline at the start of the prompt
|
||||
# Disable the blank line at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
@ -207,6 +207,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@ -237,15 +238,17 @@ Das `aws`-Modul zeigt das aktuelle AWS-Profil an. Dies basiert auf den Umgebungs
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
|
||||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
### Optionen
|
||||
|
||||
| Option | Standardwert | Beschreibung |
|
||||
| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | Symbol das vor dem aktuellen AWS-Profil angezeigt wird. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | Stil für dieses Modul. |
|
||||
| `disabled` | `false` | Deaktiviert das `aws`-Modul. |
|
||||
| Option | Standardwert | Beschreibung |
|
||||
| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | Symbol das vor dem aktuellen AWS-Profil angezeigt wird. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | Stil für dieses Modul. |
|
||||
| `disabled` | `false` | Deaktiviert das `aws`-Modul. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@ -301,7 +304,7 @@ symbol = "🅰 "
|
||||
|
||||
## Akkustand
|
||||
|
||||
Das `battery` Modul zeigt, wie hoch der Akku des Geräts geladen ist und den aktuellen Ladestatus. Das Modul ist nur sichtbar, wenn der Akku des Geräts unter 10% geladen ist.
|
||||
The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%.
|
||||
|
||||
### Optionen
|
||||
|
||||
@ -330,7 +333,7 @@ discharging_symbol = "💀"
|
||||
|
||||
### Anzeige des Akkustandes
|
||||
|
||||
Die `display` Konfiguration "threshold" stellt ein ab wann die Akkuanzeige eingeblendet wird. Mit "style" wird das Erscheinungsbild festgelegt. Wenn `display` nicht angegeben ist. Die Standardwerte sind folgende:
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. Die Standardwerte sind folgende:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
@ -340,7 +343,7 @@ style = "bold red"
|
||||
|
||||
#### Optionen
|
||||
|
||||
Die `display`-Option beinhaltet ein Array mit den folgenden Werten.
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Option | Beschreibung |
|
||||
| ----------- | ------------------------------------------------------- |
|
||||
@ -364,9 +367,9 @@ style = "bold yellow"
|
||||
|
||||
## Zeichen
|
||||
|
||||
Das `character` Modul zeigt ein Zeichen ( meistens einen Pfeil "❯") vor der Texteingabe an.
|
||||
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
|
||||
|
||||
Das Zeichen zeigt an ob der letzte Befehl erfolgreich war, oder einen Fehler erzeugt hat. It can do this in two ways:
|
||||
The character will tell you whether the last command was successful or not. It can do this in two ways:
|
||||
|
||||
- changing color (`red`/`green`)
|
||||
- changing shape (`❯`/`✖`)
|
||||
@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| Option | Standardwert | Beschreibung |
|
||||
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
|
||||
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -453,15 +456,15 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
|
||||
## Befehlsdauer
|
||||
|
||||
Das `cmd_duration` Modul zeigt an wie lange der letzte Befehl ausgeführt wurde. Das Modul wird nur angezeigt wenn der letzte Befehl länger als zwei Sekunden ausgeführt wurde. Mit der `min_time` Option kann die Zeit eingestellt werden ab der `cmd_duration` angezeigt wird.
|
||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||
|
||||
::: warning Nicht die DEBUG-trap in der Bash hooken
|
||||
::: warning Do not hook the DEBUG trap in Bash
|
||||
|
||||
Ist `bash` die Konsole der Wahl, dann nicht die `DEBUG`-trap nach der Ausführung von `eval $(starship init $0)` hooken, andernfalls **wird** dieses Modul unweigerlich untergehen.
|
||||
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
|
||||
|
||||
:::
|
||||
|
||||
Bash Nutzer, die eine "preexec" ähnliche Funktion benötigen, können [rcaloras bash_preexec Framework](https://github.com/rcaloras/bash-preexec) verwenden. Definieren Sie einfach die Arrays `preexec_functions` und `precmd_functions` bevor sie `eval $(starship init $0)` ausführen, und fahren Sie dann wie gewohnt fort.
|
||||
Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
|
||||
|
||||
### Optionen
|
||||
|
||||
@ -475,7 +478,7 @@ Bash Nutzer, die eine "preexec" ähnliche Funktion benötigen, können [rcaloras
|
||||
| `show_notifications` | `false` | Show desktop notifications when command completes. |
|
||||
| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). |
|
||||
|
||||
::: Tipp
|
||||
::: tip
|
||||
|
||||
Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`.
|
||||
|
||||
@ -502,11 +505,11 @@ format = "underwent [$duration](bold yellow)"
|
||||
|
||||
## Conda
|
||||
|
||||
Das `conda`-Modul zeigt dessen aktuelle Umgebung an, sofern `$CONDA_DEFAULT_ENV` gesetzt ist.
|
||||
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
|
||||
|
||||
::: Tipp
|
||||
::: tip
|
||||
|
||||
Hinweis: Dies unterdrückt nicht conda's eigenen Prompt-Modifikator, sie können jedoch conda mit `conda config --set changeps1 False` konfigurieren, um die Ausgabe von conda selbst auszuschalten.
|
||||
This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
|
||||
|
||||
:::
|
||||
|
||||
@ -619,7 +622,7 @@ format = "via [🔰 $version](bold red) "
|
||||
|
||||
## Verzeichnis
|
||||
|
||||
Das `directory` -Modul zeigt den Pfad zu Ihrem aktuellen Verzeichnis an, abgeschnitten auf drei übergeordnete Ordner. Your directory will also be truncated to the root of the git repo that you're currently in.
|
||||
The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
|
||||
|
||||
When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
|
||||
|
||||
@ -640,7 +643,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
|
||||
| `home_symbol` | `"~"` | The symbol indicating home directory. |
|
||||
|
||||
<details>
|
||||
<summary>Dieses Modul hat einige erweiterte Konfigurationsoptionen, welche die Darstellung von Verzeichnissen steuern.</summary>
|
||||
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
|
||||
|
||||
| Advanced Option | Standardwert | Beschreibung |
|
||||
| --------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
@ -988,7 +991,7 @@ asia-northeast1 = "an1"
|
||||
|
||||
## Git-Branch
|
||||
|
||||
Das `git_branch`-Modul zeigt den aktiven Git-Branch des Repositories im aktuellen Verzeichnis an.
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### Optionen
|
||||
|
||||
@ -1186,7 +1189,7 @@ behind = "⇣${count}"
|
||||
|
||||
## Golang
|
||||
|
||||
Das `golang`-Modul zeigt die aktuell installierte Version von Golang. By default the module will be shown if any of the following conditions are met:
|
||||
The `golang` module shows the currently installed version of Golang. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `go.mod`-Datei
|
||||
- Das aktuelle Verzeichnis enthält eine `go.sum`-Datei
|
||||
@ -1268,7 +1271,7 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## Hostname
|
||||
|
||||
Das `hostname`-Modul zeigt den Hostnamen des Systems an.
|
||||
The `hostname` module shows the system hostname.
|
||||
|
||||
### Optionen
|
||||
|
||||
@ -1303,7 +1306,7 @@ disabled = false
|
||||
|
||||
## Java
|
||||
|
||||
Das `java` Modul zeigt die derzeit installierte Version von Java an. By default the module will be shown if any of the following conditions are met:
|
||||
The `java` module shows the currently installed version of Java. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
|
||||
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
|
||||
@ -1343,6 +1346,12 @@ symbol = "🌟 "
|
||||
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. 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.
|
||||
|
||||
::: Warnung
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
### Optionen
|
||||
|
||||
| Option | Standardwert | Beschreibung |
|
||||
@ -1462,9 +1471,9 @@ kotlin_binary = "kotlinc"
|
||||
|
||||
Displays the current Kubernetes context name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
|
||||
|
||||
::: Tipp
|
||||
::: tip
|
||||
|
||||
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1503,7 +1512,7 @@ disabled = false
|
||||
|
||||
## Zeilenumbruch
|
||||
|
||||
Das `line_break`-Modul unterteilt den Prompt in zwei Zeilen.
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
|
||||
### Optionen
|
||||
|
||||
@ -1562,13 +1571,13 @@ format = "via [🌕 $version](bold blue) "
|
||||
|
||||
## Speicherauslastung
|
||||
|
||||
Das `memory_usage` Modul zeigt den aktuellen Systemspeicher und die swap-Nutzung an.
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
|
||||
Standardmäßig wird die swap-Nutzung angezeigt, wenn der gesamte System-swap nicht Null ist.
|
||||
By default the swap usage is displayed if the total system swap is non-zero.
|
||||
|
||||
::: Tipp
|
||||
::: tip
|
||||
|
||||
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1686,7 +1695,7 @@ symbol = "🎣 "
|
||||
|
||||
## Nix-Shell
|
||||
|
||||
Das `nix_shell`-Modul zeigt die nix-shell Umgebung an. Das Modul wird angezeigt, wenn es sich in einer nix-Shell-Umgebung befindet.
|
||||
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
|
||||
|
||||
### Optionen
|
||||
|
||||
@ -1724,7 +1733,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
|
||||
|
||||
## NodeJS
|
||||
|
||||
Das `nodejs`-Modul zeigt die aktuell installierte Version von NodeJS. By default the module will be shown if any of the following conditions are met:
|
||||
The `nodejs` module shows the currently installed version of NodeJS. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `package.json`-Datei
|
||||
- The current directory contains a `.node-version` file
|
||||
@ -1737,7 +1746,7 @@ Das `nodejs`-Modul zeigt die aktuell installierte Version von NodeJS. By default
|
||||
| Option | Standardwert | Beschreibung |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
@ -1843,7 +1852,7 @@ symbol = "☁️ "
|
||||
|
||||
## Paketversion
|
||||
|
||||
Das `Package` Modul wird angezeigt, wenn das aktuelle Verzeichnis das Repository für ein Paket ist, und zeigt dessen aktuelle Version an. The module currently supports `npm`, `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`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
|
||||
- **npm** – Die `npm` Paketversion wird aus dem `package.json` gelesen, das sich im aktuellen Verzeichnis befindet
|
||||
- **Cargo** – Die `Cargo` Paketversion wird aus dem `Cargo.toml` gelesen, das sich im aktuellen Verzeichnis befindet
|
||||
@ -1928,7 +1937,7 @@ format = "via [🦪 $version]($style) "
|
||||
|
||||
## PHP
|
||||
|
||||
Das `php`-Modul zeigt die aktuell installierte Version von PHP. By default the module will be shown if any of the following conditions are met:
|
||||
The `php` module shows the currently installed version of PHP. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `composer.json`-Datei
|
||||
- The current directory contains a `.php-version` file
|
||||
@ -2036,7 +2045,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
|
||||
::: Tipp
|
||||
::: tip
|
||||
|
||||
The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
|
||||
@ -2083,7 +2092,7 @@ detect_extensions = []
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of Ruby. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
By default the `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `Gemfile`-Datei
|
||||
- The current directory contains a `.ruby-version` file
|
||||
@ -2122,7 +2131,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of Rust. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
By default the `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `Cargo.toml`-Datei
|
||||
- Das aktuelle Verzeichnis enthält eine Datei mit der `.rs`-Erweiterung
|
||||
@ -2158,13 +2167,55 @@ By default the `rust` module shows the currently installed version of Rust. Das
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### Optionen
|
||||
|
||||
|
||||
| Option | Standardwert | Beschreibung |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | Stil für dieses Modul. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Beispiel | Beschreibung |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| 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
|
||||
|
||||
### Beispiel
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: Tipp
|
||||
::: tip
|
||||
|
||||
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2178,6 +2229,7 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
|
||||
| `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. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
@ -2269,9 +2321,9 @@ format = '[📦 \[$env\]]($style) '
|
||||
|
||||
The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`.
|
||||
|
||||
::: Tipp
|
||||
::: tip
|
||||
|
||||
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2324,7 +2376,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of Swift. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
By default the `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@ -2364,7 +2416,7 @@ format = "via [🏎 $version](red bold)"
|
||||
|
||||
The `terraform` module shows the currently selected terraform workspace and version.
|
||||
|
||||
::: Tipp
|
||||
::: tip
|
||||
|
||||
By default the terraform version is not shown, since this is slow for current versions of terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-version).
|
||||
|
||||
@ -2372,7 +2424,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:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `.terraform`-Datei
|
||||
- The current directory contains a `.terraform` folder
|
||||
- Current directory contains a file with the `.tf` or `.hcl` extensions
|
||||
|
||||
### Optionen
|
||||
@ -2422,9 +2474,9 @@ format = "[🏎💨 $workspace]($style) "
|
||||
|
||||
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
|
||||
|
||||
::: Tipp
|
||||
::: tip
|
||||
|
||||
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2466,14 +2518,14 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## Username
|
||||
|
||||
The `username` module shows active user's username. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Der aktuelle Benutzer ist root
|
||||
- Der aktuelle Benutzer ist nicht der eingeloggte Benutzer
|
||||
- Der Benutzer ist aktuell via SSH verbunden
|
||||
- Die Variable `show_always` ist auf true gesetzt
|
||||
- The current user is root
|
||||
- The current user isn't the same as the one that is logged in
|
||||
- The user is currently connected as an SSH session
|
||||
- The variable `show_always` is set to true
|
||||
|
||||
::: Tipp
|
||||
::: tip
|
||||
|
||||
SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value.
|
||||
|
||||
@ -2548,7 +2600,7 @@ format = "via [⍱ $version](bold white) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of Zig. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
By default the the `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
@ -2594,19 +2646,19 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
|
||||
::: Tipp
|
||||
::: tip
|
||||
|
||||
Multiple custom modules can be defined by using a `.`.
|
||||
|
||||
:::
|
||||
|
||||
::: Tipp
|
||||
::: tip
|
||||
|
||||
The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined.
|
||||
|
||||
:::
|
||||
|
||||
::: Tipp
|
||||
::: tip
|
||||
|
||||
[Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there!
|
||||
|
||||
|
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
Die [Bash Implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) ist etwas komplexer, um erweiterte Funktionen wie das [Befehlsdauer-Modul](https://starship.rs/config/#Command-Duration) zu ermöglichen und um sicherzustellen, dass Starship mit vorinstallierten Bash Konfigurationen kompatibel ist.
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
Für eine Liste aller Flaggen, die von `Starship-Eingabeaufforderung` akzeptiert wird, verwenden Sie den folgenden Befehl:
|
||||
|
||||
@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
## 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:
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-Shell Prompt" />
|
||||
alt="Starship – Cross-Shell Prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="Workflow-Status der GitHub Actions" /></a>
|
||||
alt="Workflow-Status der GitHub Actions"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io-Version" /></a>
|
||||
alt="Crates.io-Version"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<a href="https://discord.gg/starship"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="Chat auf Discord" /></a>
|
||||
alt="Chat auf Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Folge @StarshipPrompt auf Twitter" /></a>
|
||||
alt="Folge @StarshipPrompt auf Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="Englisch" /></a>
|
||||
alt="Englisch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Russisch" /></a>
|
||||
alt="Russisch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship mit iTem2 und dem Theme „Snazzy“"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!**
|
||||
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 Mitwirken
|
||||
|
||||
Wir laden Leute **aller Erfahrungsstufen** herzlich ein mitzumachen! Falls du dich mit dem Projekt vertaut machen willst, versuche ein [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 🚀 Advanced Installation
|
||||
|
||||
To install starship, you need to do two things:
|
||||
Um starship zu installieren, musst du zwei Dinge tun:
|
||||
|
||||
1. Get the **starship** binary onto your computer
|
||||
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
|
||||
@ -8,13 +8,29 @@ To install starship, you need to do two things:
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Voraussetzungen
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### Installation
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Voraussetzungen
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
@ -31,7 +47,29 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarative, single user, via [home-manager](home-manager)
|
||||
|
||||
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -39,18 +77,8 @@ home-manager switch
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### With Nix and home-manager, using zsh:
|
||||
|
||||
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module.
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -8,17 +8,17 @@ actionLink: ./guide/
|
||||
features:
|
||||
-
|
||||
title: Compatibilidad primero
|
||||
details: Funciona en las shells más comunes en los sistemas operativos más comunes. ¡Úsalo en todas partes!
|
||||
details: Funciona en los intérprete de comandos más comunes de los sistemas operativos más comunes. ¡Úsalo en todas partes!
|
||||
-
|
||||
title: Desarrollado en Rust
|
||||
details: Obtén la mayor velocidad y seguridad de Rust, para hacer tu prompt lo más rápida y segura posible.
|
||||
-
|
||||
title: Personalizable
|
||||
details: Puedes personalizar cada pequeño detalle a tu gusto, de manera que puedes tener una interfaz minimalista o rica en funcionalidades.
|
||||
details: Puedes personalizar cada pequeño detalle a tu gusto, de manera que puedes tener un prompt minimalista o rico en funcionalidades.
|
||||
footer: Bajo una licencia ISC | Derechos de autor © 2019-presente Colaboradores de Starship
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: el indicador de comando multi-intérprete"
|
||||
description: Starship es el símbolo de sistema minimalista, ultrarápido e infinitamente customizable para cualquier intérprete de comandos. Muestra la información que necesitas, a la par que es elegante y minimalista. Instalación rápida disponible para Bash, Fish, ZSH, Ion y PowerShell.
|
||||
metaTitle: "Starship: el prompt multi-intérprete"
|
||||
description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos! Muestra la información que necesitas, a la par que es elegante y minimalista. Instalación rápida disponible para Bash, Fish, ZSH, Ion y PowerShell.'
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
@ -35,7 +35,7 @@ description: Starship es el símbolo de sistema minimalista, ultrarápido e infi
|
||||
|
||||
#### Instalar la última versión
|
||||
|
||||
Con la interfaz de línea de comandos:
|
||||
Con el intérprete de comandos:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
@ -56,7 +56,7 @@ description: Starship es el símbolo de sistema minimalista, ultrarápido e infi
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
1. Añade el script de inicio al archivo de configuración de tu interfaz de línea de comandos:
|
||||
1. Añade el guión de inicio al archivo de configuración de tu intérprete de comandos:
|
||||
|
||||
|
||||
#### Bash
|
||||
@ -123,3 +123,14 @@ description: Starship es el símbolo de sistema minimalista, ultrarápido e infi
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Añade el siguiente código al final de `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -82,7 +82,7 @@ Las cadenas de estilo son una lista de palabras, separadas por espacios en blanc
|
||||
|
||||
donde `<color>` es un especificador de color (discutido a continuación). `fg:<color>` y `<color>` hacen actualmente lo mismo, aunque esto puede cambiar en el futuro. El orden de las palabras en la cadena no importa.
|
||||
|
||||
El token `none` anula todos los demás tokens en una cadena si no es parte de un especificador `bg:`, de modo que por ejemplo `fg:red none fg:blue` creará una cadena sin ningún estilo. `bg:none` establece el fondo al color predeterminado, así que `fg:red bg:none` es equivalente a `red` o `fg:red` y `bg:green fg:red bg:none` también es equivalente a `fg:red` o `red`. Puede convertirse en un error usar `none` junto con otros tokens en el futuro.
|
||||
El token `none` anula todos los demás tokens en una cadena si no es parte de un especificador `bg:`, de modo que por ejemplo `fg:red none fg:blue` creará una cadena sin ningún estilo. `bg:none` establece el fondo al color por defecto, así que `fg:red bg:none` es equivalente a `red` o `fg:red` y `bg:green fg:red bg:none` también es equivalente a `fg:red` o `red`. Puede convertirse en un error usar `none` junto con otros tokens en el futuro.
|
||||
|
||||
Un especificador de color puede ser uno de los siguientes:
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6,24 +6,24 @@
|
||||
- **Tema**: Mínimo
|
||||
- **Esquema de color**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
|
||||
- **Interfaz de línea de comandos**: [Fish Shell](https://fishshell.com/)
|
||||
- **Intérprete de comandos**: [Fish Shell](https://fishshell.com/)
|
||||
- **Configuración**: [archivos de configuración de matchai](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
|
||||
- **Prompt**: [Starship](https://starship.rs/)
|
||||
|
||||
## ¿Cómo obtengo el autocompletado del comando como se muestra en el GIF?
|
||||
|
||||
El soporte de terminación, o autocompletado, es proporcionado por su shell de elección. En el caso de la demo, la demo se realizó con [Fish Shell](https://fishshell.com/), que proporciona el completado por defecto. Si usas Z Shell (zsh), te sugeriría echar un vistazo a [zsh-autosuggeries,](https://github.com/zsh-users/zsh-autosuggestions).
|
||||
El soporte de terminación, o autocompletado, es proporcionado por tu intérprete de comandos de elección. En el caso de la demo, la demo se realizó con [Fish Shell](https://fishshell.com/), que proporciona el completado por defecto. Si usas Z Shell (zsh), te sugerimos echar un vistazo a [zsh-autosuggeries,](https://github.com/zsh-users/zsh-autosuggestions).
|
||||
|
||||
## ¿`prompt_order` y `<module>.disabled` hacen lo mismo?
|
||||
|
||||
Sí, se pueden usar ambos para desactivar los módulos en el símbolo del sistema. Si todo lo que planeas es desactivar módulos, `<module>.disabled` es el método preferido por las siguientes razones:
|
||||
Sí, se pueden usar ambos para desactivar los módulos en el prompt. Si todo lo que planeas es desactivar módulos, `<module>.disabled` es el método preferido por las siguientes razones:
|
||||
|
||||
- Deshabilitar módulos es más explícito que omitirlos del nivel superior `format`
|
||||
- Los nuevos módulos se añadirán al símbolo del sistema en cuanto Starship se actualice
|
||||
- Los nuevos módulos se añadirán al prompt en cuanto Starship se actualice
|
||||
|
||||
## La documentación dice que Starship es "cross-shell". ¿Por qué no es compatible mi shell preferido?
|
||||
## La documentación dice que Starship es "cross-shell". ¿Por qué no es compatible mi intérprete de comandos preferido?
|
||||
|
||||
Por la forma en que Starshp está construído, debería ser posible añadir soporte para prácticamente cualquier intérprete de comandos. El binario de Starship es sin estado y agnóstico, por lo que mientras que tu intérprete de comandos se pueda ampliar y soporte la personalización del símbolo del sistema, puede utilizar Starship.
|
||||
Por la forma en que Starship está construído, debería ser posible añadir soporte para prácticamente cualquier intérprete de comandos. El binario de Starship es sin estado y agnóstico, por lo que mientras que tu intérprete de comandos se pueda ampliar y soporte la personalización del prompt, puedes utilizar Starship.
|
||||
|
||||
Aquí tienes un pequeño ejemplo haciendo que Starship funcione con bash:
|
||||
|
||||
@ -38,9 +38,9 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
La [implementación de Bash](https://github.com/starship/starship/blob/master/src/init/starship.bash) en Starship es sensíblemente is ligeramente más compleja para permitir características avanzadas como [el módulo de duración de comando](https://starship.rs/config/#Command-Duration) y para asegurar que Starship es compatible con las configuraciones preinstaladas de Bash.
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
Para obtener una lista de todos los parámetros aceptados por `el símbolo del sistema starship`, usa el siguiente comando:
|
||||
Para obtener una lista de todos los parámetros aceptados por `el prompt de Starship`, usa el siguiente comando:
|
||||
|
||||
```sh
|
||||
starship prompt --help
|
||||
@ -56,33 +56,37 @@ Si obtienes un error como "_version 'GLIBC_2.18' not found (required by starship
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Veo símbolos que no entiendo ni espero, ¿qué significan?
|
||||
|
||||
Si ves símbolos que no reconoces, puedes usar `starship explain` para explicar los módulos que se muestran actualmente.
|
||||
|
||||
## ¿Por qué no veo un símbolo de glifo en mi prompt?
|
||||
|
||||
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 "listo para usare". Tienes que asegurar que:
|
||||
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:
|
||||
|
||||
- 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, ejecuta los siguientes comandos en un terminal:
|
||||
Para probar tu sistema, ejecua los siguientes comandos en un 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).
|
||||
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).
|
||||
|
||||
Si cualquiera de los dos símbolos no se puede mostrar correctamente, tu 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 te 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)
|
||||
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)
|
||||
|
||||
## ¿Cómo puedo desinstalar Starship?
|
||||
|
||||
Starship es tan fácil de desinstalar como de instalar en primer lugar.
|
||||
|
||||
1. Elimina cualquier línea de tu configuración de shell (por ejemplo, `~/.bashrc`) usada para inicializar Starship.
|
||||
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érere a sus documentos para instrucciones de desinstalación.
|
||||
Si Starship fue instalado usando un gestor de paquetes, por favor refiérete a sus documentos para instrucciones de desinstalación.
|
||||
|
||||
Si Starship fue instalado usando el script `curl | bash`, el siguiente comando eliminará el binario:
|
||||
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship - Prompt multi intérprete de comandos" />
|
||||
alt="Starship - Prompt multi-intérprete de comandos"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="Estado del flujo de trabajo de GitHub Actions" /></a>
|
||||
alt="Estado del flujo de trabajo de GitHub Actions"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Versión de Crates.io" /></a>
|
||||
alt="Versión de Crates.io"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<a href="https://discord.gg/starship"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="Chat en Discord" /></a>
|
||||
alt="Chat en Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Sigue a @StarshipPrompt en Twitter" /></a>
|
||||
alt="Sigue a @StarshipPrompt en Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Francés" /></a>
|
||||
alt="Francés"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship con iTerm 2 y el tema Snazzy"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**¡El prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos!**
|
||||
|
||||
@ -163,7 +178,7 @@
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
2. Añade el script de inicio al archivo de configuración de tu interfaz de línea de comandos:
|
||||
2. Añade el guión de inicio al archivo de configuración de tu intérprete de comandos:
|
||||
|
||||
|
||||
#### Bash
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Añade el siguiente código al final de `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 Colaborando
|
||||
|
||||
¡Siempre estamos buscando colaboradores de **todos los niveles y habilidades**! Si estas buscando una manera fácil de ayudar este proyecto, puedes intentar resolver un problema con la etiqueta "[good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)".
|
||||
@ -269,11 +295,11 @@ Apoya este proyecto con tu organización. Su logo se mostrará aquí con un enla
|
||||
|
||||
Por favor, revisa estos trabajos previos que ayudaron a inspirar la creación de starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Una prompt ZSH para astronautas.
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un prompt ZSH para astronautas.
|
||||
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - robbyrussel, tema multi intérprete de comandos escrito en JavaScript.
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - robbyrussel, tema multi-intérprete de comandos escrito en JavaScript.
|
||||
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** - Una prompt multi intérprete de comandos personalizable, basada en Powerline con iconos.
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** - Un prompt multi-intérprete de comandos personalizable, basada en Powerline con iconos.
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
|
@ -3,25 +3,41 @@
|
||||
Para instalar Starship, necesitas hacer dos cosas:
|
||||
|
||||
1. Consigue el binario de **Starship** en tu ordenador
|
||||
1. Decirle a tu shell que use el binario de Starship como su prompt modificando sus guiones de inicio
|
||||
1. Decirle a tu intérprete de comandos que use el binario de Starship como su prompt modificando sus guiones de inicio
|
||||
|
||||
Para la mayoría de los usuarios, las instrucciones en [la página principal](/guide/#🚀-installation) funcionarán genial. Sin embargo, para algunas plataformas más especializadas, se necesitan diferentes instrucciones.
|
||||
|
||||
Hay tantas plataformas ahí fuera que no cabían en el README.md principal, así que aquí están algunas instrucciones de instalación para otras plataformas de la comunidad. ¿No está usted aquí? ¡Por favor, añádelo aquí si lo encuentras!
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Prerequisitos
|
||||
|
||||
Dirígete a la página de instalación de [Chocolatey](https://chocolatey.org/install) y sigue las instrucciones para instalar Chocolatey.
|
||||
|
||||
### Instalación
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Prerequisitos
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
### Instalación
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
### Obtener el binario
|
||||
|
||||
#### Imperativamente
|
||||
|
||||
@ -31,26 +47,38 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarativo, usuario único, a través de [home-manager](home-manager)
|
||||
|
||||
Añade `pkgs.starship` a tu `home.packages` en tu archivo `home.nix` y luego ejecuta
|
||||
Activa el módulo `programs.starship` en tu archivo `home.nix` y añade tus ajustes
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
luego ejecutar
|
||||
|
||||
```sh
|
||||
interruptor home-manager
|
||||
home-manager switch
|
||||
```
|
||||
|
||||
#### Declarativo, en todo el sistema, con NixOS
|
||||
|
||||
Añade `pkgs.starship` a `environment.packages` en tu `configuration.nix`, luego ejecuta
|
||||
Añade `pkgs.starship` a `environment.systemPackages` en tu `configuration.nix`, luego ejecuta
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### Con Nix y home-manager, usando zsh:
|
||||
|
||||
Añade lo siguiente a `programs.zsh.initExtra` en tu archivo `home.nix` y luego ejecutar
|
||||
|
||||
```sh
|
||||
interruptor home-manager
|
||||
```
|
||||
|
@ -6,7 +6,7 @@ Esta guía pretende guiarle a través de los cambios de ruptura.
|
||||
|
||||
## `prompt_order` ha sido reemplazado por un "nivel raíz" `format`
|
||||
|
||||
Anterioramente a v0.45.0, `prompt_order` aceptaría un array de nombres de módulos en el orden que deberían ser renderizados por Starship.
|
||||
Anterioramente a v0.45.0, `prompt_order` aceptaría un arreglo de nombres de módulos en el orden que deberían ser renderizados por Starship.
|
||||
|
||||
En su lugar, Starship v0.45.0 acepta un valor de `format`, permitiendo la personalización del indicador fuera de los propios módulos.
|
||||
|
||||
@ -70,7 +70,7 @@ prefix = "tomó "
|
||||
```toml
|
||||
[cmd_duration]
|
||||
# $duration – La duración del comando (p. ej. "15s")
|
||||
# $style – El estilo predeterminado del módulo (p. ej. "bold yellow")
|
||||
# $style – El estilo por defecto del módulo (p. ej. "bold yellow")
|
||||
format = "tomó [$duration]($style) "
|
||||
```
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
# Ajustes predeterminados
|
||||
# Ajustes por defecto
|
||||
|
||||
Aqui hay una colección de ajustes predeterminados creados por la comunidad de Starship. ¡Si quieres compartir un ajuste predeterminado, por favor, [envía un PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) actualizando este archivo! 😊
|
||||
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! 😊
|
||||
|
||||
## Símbolos de Nerd Font
|
||||
|
||||
Este ajuste predeterminado 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 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!
|
||||
|
||||
![Captura de pantalla de los ajustes predeterminados de los Símbolos de Nerd Font](/presets/nerd-font-symbols.png)
|
||||
![Captura de pantalla de los ajustes por defecto de los Símbolos de Nerd Font](/presets/nerd-font-symbols.png)
|
||||
|
||||
### Prerequisitos
|
||||
|
||||
@ -16,7 +16,7 @@ Este ajuste predeterminado no modifica nada excepto los símbolos usados para ca
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -123,3 +123,14 @@ description: Starship est un invite minimaliste, ultra-rapide et hautement perso
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
Toute la configuration de starship est faite dans ce fichier [TOML](https://github.com/toml-lang/toml):
|
||||
|
||||
```toml
|
||||
# N'écrivez pas une nouvelle ligne au début de la console
|
||||
add_newline = false
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Remplacez le symbole "❯" dans la console avec "➜"
|
||||
[character] # Le nom du module que nous configurons est "character"
|
||||
success_symbol = "[➜](bold green)" # Le segment "success_symbol" est mis comme "➜" avec la couleur "bold green"
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
|
||||
|
||||
# Désactivez le module package, le masquant complètement dans la console
|
||||
# Disable the package module, hiding it from the prompt completely
|
||||
[package]
|
||||
disabled = true
|
||||
```
|
||||
@ -80,7 +80,7 @@ La deuxième partie, qui est entourée par `()`, est une [chaîne de style](#sty
|
||||
Par exemple :
|
||||
|
||||
- `[on](red bold)` affichera une chaîne de caractères `on` avec un texte gras de couleur rouge.
|
||||
- `[⬢ $version](bold green)` affichera un symbole `⬢` suivi du contenu de la variable `version`, avec un texte en gras de couleur verte.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
- `[a [b](red) c](green)` affichera `a b c` avec `b` rouge, et `a` et `c` vert.
|
||||
|
||||
#### Chaînes de style
|
||||
@ -146,7 +146,7 @@ Voici la liste des options de configuration de l'invite en lui-même.
|
||||
| -------------- | ------------------------------ | -------------------------------------------------------------------------- |
|
||||
| `format` | [lien](#default-prompt-format) | Configure le format de l'invite. |
|
||||
| `scan_timeout` | `30` | Délai d'attente avant que starship scanne les fichiers (en millisecondes). |
|
||||
| `add_newline` | `true` | Ajoute une nouvelle ligne a début de l'invite. |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -162,7 +162,7 @@ format = """
|
||||
# Attendez 10 millisecondes pour que starship vérifie les fichiers dans le répertoire de travail.
|
||||
scan_timeout = 10
|
||||
|
||||
# Désactive la nouvelle ligne au démarrage de l'invite
|
||||
# Disable the blank line at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
@ -207,6 +207,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@ -237,15 +238,17 @@ Le module `aws` affiche la région et le profil AWS courant. Ces informations so
|
||||
|
||||
Quand [aws-vault](https://github.com/99designs/aws-vault) est utilisé, la valeur du profil est lu dans la variable d'environnement: `AWS_VAULT`.
|
||||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ------------------------------------------------ | -------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | Format du module. |
|
||||
| `symbol` | `"☁️ "` | Le symbole affiché avant le profil AWS actuel. |
|
||||
| `region_aliases` | | Table des alias de région à afficher en plus du nom AWS. |
|
||||
| `style` | `"bold yellow"` | Le style du module. |
|
||||
| `disabled` | `false` | Désactive le module `AWS`. |
|
||||
| Option | Default | Description |
|
||||
| ---------------- | --------------------------------------------------- | -------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | Format du module. |
|
||||
| `symbol` | `"☁️ "` | Le symbole affiché avant le profil AWS actuel. |
|
||||
| `region_aliases` | | Table des alias de région à afficher en plus du nom AWS. |
|
||||
| `style` | `"bold yellow"` | Le style du module. |
|
||||
| `disabled` | `false` | Désactive le module `AWS`. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -256,7 +259,7 @@ Quand [aws-vault](https://github.com/99designs/aws-vault) est utilisé, la valeu
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemples
|
||||
|
||||
@ -266,7 +269,7 @@ Quand [aws-vault](https://github.com/99designs/aws-vault) est utilisé, la valeu
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@ -301,7 +304,7 @@ symbol = "🅰 "
|
||||
|
||||
## Battery
|
||||
|
||||
Le module `battery` montre à quel point la batterie de l'appareil est chargée et son état de charge actuel. Ce module n'est visible que lorsque la batterie de l'appareil est inférieure à 10%.
|
||||
The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%.
|
||||
|
||||
### Options
|
||||
|
||||
@ -330,7 +333,7 @@ discharging_symbol = "💀"
|
||||
|
||||
### Indicateur de batterie
|
||||
|
||||
L'option de configuration `display` est utilisée pour définir quand l'indicateur de batterie doit être affiché (seuil) et à quoi il ressemble (style). Si aucun `display` n'est fourni. La valeur par défaut est la suivante :
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. La valeur par défaut est la suivante :
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
@ -340,7 +343,7 @@ style = "bold red"
|
||||
|
||||
#### Options
|
||||
|
||||
L'option `display` est une array de la table suivante.
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Option | Description |
|
||||
| ----------- | -------------------------------------------------- |
|
||||
@ -364,14 +367,14 @@ style = "bold yellow"
|
||||
|
||||
## Caractères
|
||||
|
||||
Le module `character` affiche un caractère (habituellement une flèche) à côté de l'endroit où le texte est entré dans votre terminal.
|
||||
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
|
||||
|
||||
Le caractère vous dira si la dernière commande a été réussie ou pas. Cela peut être fait de deux manières:
|
||||
The character will tell you whether the last command was successful or not. It can do this in two ways:
|
||||
|
||||
- changement de couleur (`red`/`green`)
|
||||
- changement de forme (`❯`/`✖`)
|
||||
|
||||
Par défaut, il ne change que la couleur. Si vous voulez également changer sa forme, jetez un œil à [cet exemple](#with-custom-error-shape).
|
||||
By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
|
||||
@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| Option | Défaut | Description |
|
||||
| ------------------- | -------------------------------------- | --------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | Format du module. |
|
||||
| `symbol` | `"喝 "` | Le symbole utilisé avant la version de cmake. |
|
||||
| `symbol` | `"△ "` | Le symbole utilisé avant la version de cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -449,19 +452,19 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
## Temps d'exécution
|
||||
|
||||
Le module `cmd_duration` montre le temps qu'a pris la dernière commande a pris pour s'exécuter. Le module ne sera affiché que si la commande a pris plus de deux secondes, ou si la valeur de configuration `min_time` existe.
|
||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||
|
||||
::: attention, n'accrochez pas la trappe DEBUG en Bash
|
||||
::: warning Do not hook the DEBUG trap in Bash
|
||||
|
||||
Si vous utilisez starship en `bash`, n'accrochez pas `DEBUG` après avoir exécuté `eval $(starship init $0)`, ou ce module **cassera**.
|
||||
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
|
||||
|
||||
:::
|
||||
|
||||
Les utilisateurs de Bash qui ont besoin de fonctionnalité pré-exec peuvent utiliser [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Définissez simplement les array `preexec_functions` et `precmd_functions` avant d'éxécuter `eval $(starship init $0)`, puis procédez comme d'habitude.
|
||||
Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
|
||||
|
||||
### Options
|
||||
|
||||
@ -477,7 +480,7 @@ Les utilisateurs de Bash qui ont besoin de fonctionnalité pré-exec peuvent uti
|
||||
|
||||
::: tip
|
||||
|
||||
L'affichage des notifications de bureau nécessite que starship soit compilé avec la prise en charge de `rust-notify`. Vérifiez si starship supporte les notifications en exécutant `STARSHIP_LOG=debug starship module cmd_duration -d 60000` lorsque `show_notifications` est défini à `true`.
|
||||
Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`.
|
||||
|
||||
:::
|
||||
|
||||
@ -488,7 +491,7 @@ L'affichage des notifications de bureau nécessite que starship soit compilé av
|
||||
| duration | `16m40s` | Le temps nécessaire pour exécuter la commande |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -502,11 +505,11 @@ format = "underwent [$duration](bold yellow)"
|
||||
|
||||
## Conda
|
||||
|
||||
Le module `conda` affiche l'environnement conda actuel, si `$CONDA_DEFAULT_ENV` est défini.
|
||||
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
|
||||
|
||||
::: tip
|
||||
|
||||
Cela ne supprime pas le modificateur d'invite de conda, vous pouvez exécuter `conda config --set changeps1 False`.
|
||||
This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
|
||||
|
||||
:::
|
||||
|
||||
@ -529,7 +532,7 @@ Cela ne supprime pas le modificateur d'invite de conda, vous pouvez exécuter `c
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -542,7 +545,7 @@ format = "[$symbol$environment](dimmed green) "
|
||||
|
||||
## Crystal
|
||||
|
||||
Le module `crystal` affiche la version actuellement installée de Crystal. By default the module will be shown if any of the following conditions are met:
|
||||
The `crystal` module shows the currently installed version of Crystal. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- Le répertoire courant contient un fichier `shard.yml`
|
||||
- Le répertoire courant contient un fichier `.cr`
|
||||
@ -567,7 +570,7 @@ Le module `crystal` affiche la version actuellement installée de Crystal. By de
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -580,7 +583,7 @@ format = "via [✨ $version](bold blue) "
|
||||
|
||||
## Dart
|
||||
|
||||
Le module `dart` affiche la version courante installée de Dart. By default the module will be shown if any of the following conditions are met:
|
||||
The `dart` module shows the currently installed version of Dart. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- Le répertoire courant contient un fichier `.dart`
|
||||
- Le répertoire courant contient un répertoire `.dart_tool`
|
||||
@ -606,7 +609,7 @@ Le module `dart` affiche la version courante installée de Dart. By default the
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -619,11 +622,11 @@ format = "via [🔰 $version](bold red) "
|
||||
|
||||
## Dossier
|
||||
|
||||
Le mode `directory` montre le chemin de votre dossier actuel, tronqué aux 3 dossiers parents. Votre répertoire sera également tronqué à la racine du repo git dans lequel vous vous trouvez actuellement.
|
||||
The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
|
||||
|
||||
Quand vous utilisez le style pwd de fish, au lieu de cacher le chemin qui est tronqué, vous verrez un nom raccourci de chaque dossier basé sur le nombre établi pour l'option.
|
||||
When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
|
||||
|
||||
Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo, et l'option définie à `1`. Vous verrez maintenant `~/D/N/nixpkgs/pkgs`, alors que vous auriez vu `nixpkgs/pkgs` avant.
|
||||
For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
|
||||
|
||||
### Options
|
||||
|
||||
@ -640,7 +643,7 @@ Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo
|
||||
| `home_symbol` | `"~"` | The symbol indicating home directory. |
|
||||
|
||||
<details>
|
||||
<summary>Ce module possède quelques options de configuration avancées qui contrôlent l'affichage du répertoire.</summary>
|
||||
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
|
||||
|
||||
| Options avancées | Défaut | Description |
|
||||
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
@ -667,7 +670,7 @@ Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo
|
||||
| path | `"D:/Projects"` | Le chemin du répertoire courant |
|
||||
| style\* | `"black bold dimmed"` | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -704,7 +707,7 @@ The `docker_context` module shows the currently active [Docker context](https://
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -759,7 +762,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -774,7 +777,7 @@ heuristic = false
|
||||
|
||||
## Elixir
|
||||
|
||||
Le module `elixir` affiche la version actuellement installé d'Elixir et Erlang/OTP. By default the module will be shown if any of the following conditions are met:
|
||||
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- Le répertoire courant contient un fichier `mix.exs`.
|
||||
|
||||
@ -799,7 +802,7 @@ Le module `elixir` affiche la version actuellement installé d'Elixir et Erlang/
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -840,7 +843,7 @@ The `elm` module shows the currently installed version of Elm. By default the mo
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -876,7 +879,7 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | `black bold dimmed` | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -915,7 +918,7 @@ The `erlang` module shows the currently installed version of Erlang/OTP. By defa
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -951,7 +954,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemples
|
||||
|
||||
@ -1013,7 +1016,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1049,7 +1052,7 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
| hash | `b703eb3` | The current git commit hash |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1089,7 +1092,7 @@ The `git_state` module will show in directories which are part of a git reposito
|
||||
| progress_total | `2` | The total operation progress |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1140,7 +1143,7 @@ The following variables can be used in `format`:
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
The following variables can be used in `diverged`:
|
||||
|
||||
@ -1217,7 +1220,7 @@ The `golang` module shows the currently installed version of Golang. By default
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1255,7 +1258,7 @@ The `helm` module shows the currently installed version of Helm. By default the
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1287,7 +1290,7 @@ The `hostname` module shows the system hostname.
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1328,7 +1331,7 @@ The `java` module shows the currently installed version of Java. By default the
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1343,6 +1346,12 @@ symbol = "🌟 "
|
||||
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. 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.
|
||||
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Défaut | Description |
|
||||
@ -1361,7 +1370,7 @@ The `jobs` module shows the current number of jobs running. The module will be s
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1401,7 +1410,7 @@ The `julia` module shows the currently installed version of Julia. By default th
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1439,7 +1448,7 @@ The `kotlin` module shows the currently installed version of Kotlin. By default
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1464,7 +1473,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
|
||||
|
||||
::: tip
|
||||
|
||||
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1487,7 +1496,7 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1549,7 +1558,7 @@ The `lua` module shows the currently installed version of Lua. By default the mo
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1568,7 +1577,7 @@ By default the swap usage is displayed if the total system swap is non-zero.
|
||||
|
||||
::: tip
|
||||
|
||||
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1630,7 +1639,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1672,7 +1681,7 @@ The `nim` module shows the currently installed version of Nim. By default the mo
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1708,7 +1717,7 @@ The `nix_shell` module shows the nix-shell environment. The module will be shown
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
||||
| Option | Défaut | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | Format du module. |
|
||||
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
@ -1753,7 +1762,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1795,7 +1804,7 @@ The `ocaml` module shows the currently installed version of OCaml. By default th
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1828,7 +1837,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1876,7 +1885,7 @@ The `package` module is shown when the current directory is the repository for a
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1954,7 +1963,7 @@ The `php` module shows the currently installed version of PHP. By default the mo
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -1967,7 +1976,7 @@ format = "via [🔹 $version](147 bold) "
|
||||
|
||||
## PureScript
|
||||
|
||||
Le module `purescript` affiche la version courante de Purescript installée. By default the module will be shown if any of the following conditions are met:
|
||||
The `purescript` module shows the currently installed version of PureScript version. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- Le répertoire courant contient un fichier `spago.dhall`
|
||||
- The current directory contains a file with the `.purs` extension
|
||||
@ -1992,7 +2001,7 @@ Le module `purescript` affiche la version courante de Purescript installée. By
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -2083,7 +2092,7 @@ detect_extensions = []
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of Ruby. Le module est affiché si l'une des ces conditions est remplie :
|
||||
By default the `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Gemfile` file
|
||||
- The current directory contains a `.ruby-version` file
|
||||
@ -2109,7 +2118,7 @@ By default the `ruby` module shows the currently installed version of Ruby. Le m
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -2122,7 +2131,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of Rust. Le module est affiché si l'une des ces conditions est remplie :
|
||||
By default the `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Cargo.toml` file
|
||||
- The current directory contains a file with the `.rs` extension
|
||||
@ -2147,7 +2156,7 @@ By default the `rust` module shows the currently installed version of Rust. Le m
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -2158,13 +2167,55 @@ By default the `rust` module shows the currently installed version of Rust. Le m
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### Options
|
||||
|
||||
|
||||
| Option | Défaut | Description |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | Format du module. |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | Le style du module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Exemple | Description |
|
||||
| --------- | -------- | -------------------------------------- |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: tip
|
||||
|
||||
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2178,6 +2229,7 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
|
||||
| `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. |
|
||||
| `format` | `$indicator` | Format du module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
@ -2220,7 +2272,7 @@ The `shlvl` module shows the current SHLVL ("shell level") environment variable,
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -2254,7 +2306,7 @@ The `singularity` module shows the current singularity image, if inside a contai
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -2271,7 +2323,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
::: tip
|
||||
|
||||
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2305,7 +2357,7 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -2324,7 +2376,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of Swift. Le module est affiché si l'une des ces conditions est remplie :
|
||||
By default the `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@ -2349,7 +2401,7 @@ By default the `swift` module shows the currently installed version of Swift. Le
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -2396,7 +2448,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -2424,7 +2476,7 @@ The `time` module shows the current **local** time. The `format` configuration v
|
||||
|
||||
::: tip
|
||||
|
||||
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2449,7 +2501,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
|
||||
| time | `13:08:10` | The current time. |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -2466,12 +2518,12 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## Username
|
||||
|
||||
The `username` module shows active user's username. Le module est affiché si l'une des ces conditions est remplie :
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- L'utilisateur courant est root
|
||||
- L'utilisateur courant est différent de celui connecté
|
||||
- L'utilisateur est actuellement connecté à une session SSH
|
||||
- La variable `show_always` a comme valeur true
|
||||
- The current user is root
|
||||
- The current user isn't the same as the one that is logged in
|
||||
- The user is currently connected as an SSH session
|
||||
- The variable `show_always` is set to true
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2535,7 +2587,7 @@ The `vagrant` module shows the currently installed version of Vagrant. By defaul
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -2548,7 +2600,7 @@ format = "via [⍱ $version](bold white) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of Zig. Le module est affiché si l'une des ces conditions est remplie :
|
||||
By default the the `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
@ -2572,7 +2624,7 @@ By default the the `zig` module shows the currently installed version of Zig. Le
|
||||
| symbol | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Exemple
|
||||
|
||||
@ -2636,13 +2688,13 @@ The order in which custom modules are shown can be individually set by including
|
||||
| symbol | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Commandes shell personnalisées
|
||||
|
||||
`shell` accepts a non-empty list of strings, where:
|
||||
|
||||
- La première chaîne est le chemin vers le shell à utiliser pour exécuter la commande.
|
||||
- The first string is the path to the shell to use to execute the command.
|
||||
- Other following arguments are passed to the shell.
|
||||
|
||||
If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows.
|
||||
|
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
L' [implémentation Bash](https://github.com/starship/starship/blob/master/src/init/starship.bash) intégrée à Starship est légèrement plus complexe pour permettre des fonctionnalités avancées comme le [module de durée de commande](https://starship.rs/config/#Command-Duration) et pour s'assurer que Starship est compatible avec les configurations Bash pré-installées.
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
Pour une liste de tous les flags acceptés par `starship`, utilisez la commande suivante :
|
||||
|
||||
@ -56,35 +56,39 @@ Si vous obtenez une erreur du type "_version 'GLIBC_2.18' not found (required by
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
## 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 que d'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. Supprimer 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 `curl | bash` , la commande suivante supprimera l'exécutable :
|
||||
If Starship was installed using the `curl | bash` script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Localiser et supprimer l'exécutable de Starship
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Prompt Shell multi-platformes" />
|
||||
alt="Starship – Prompt Shell multi-platformes"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="Statut du workflow actions GitHub" /></a>
|
||||
alt="Statut du workflow actions GitHub"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Version Crates.io" /></a>
|
||||
alt="Version Crates.io"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<a href="https://discord.gg/starship"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="Discuter sur Discord" /></a>
|
||||
alt="Discuter sur Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Suivez @StarshipPrompt sur Twitter" /></a>
|
||||
alt="Suivez @StarshipPrompt sur Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Espagnol" /></a>
|
||||
alt="Espagnol"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship avec iTerm2 et le thème Snazzy"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**L'invite minimaliste, ultra-rapide et personnalisable à l'infini pour n'importe quel shell !**
|
||||
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝Contribution
|
||||
|
||||
Nous sommes toujours à la recherche de contributeurs de **tous niveaux de compétence**! Si vous cherchez à faciliter votre entrée dans le projet, essayez un [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
|
||||
|
@ -8,13 +8,29 @@ Pour installer starship, vous devez faire deux choses:
|
||||
Pour la plupart des utilisateurs, les instructions sur [la page principale](/guide/#🚀-installation) fonctionneront bien. Cependant, pour certaines plateformes plus spécialisées, des instructions différentes sont nécessaires.
|
||||
|
||||
Il y a tellement de plates-formes, qu'il aurait été déraisonnable de les faire apparaître dans le README principal, voici donc quelques instructions d'installation supplémentaires pour celles-ci, écrient par la commaunauté. La vôtre n'est-elle pas là ? S'il vous plaît, ajoutez-la ici pour les suivants !
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Pré-requis
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### Installation
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Pré-requis
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
@ -31,7 +47,29 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Déclaration, utilisateur unique, via [home-manager](home-manager)
|
||||
|
||||
Ajoutez `pkgs.starship` à votre `home.packages` dans votre fichier `home.nix` puis exécutez
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -39,18 +77,8 @@ home-manager switch
|
||||
|
||||
#### Déclaration, au niveau du système, avec NixOS
|
||||
|
||||
Ajoutez `pkgs.starship` à `environment.packages` dans votre `configuration.nix`, puis exécutez
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### Avec Nix et home manager, en utilisant zsh :
|
||||
|
||||
Ajoutez les éléments suivants à `programs.zsh.initExtra` dans votre fichier `home.nix` puis exécuter
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
@ -16,7 +16,7 @@ Cette configuration ne modifie rien sauf les symboles utilisés pour chaque modu
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -38,7 +38,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
|
||||
Con Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
curl -fsSL https://starship.rs/install.sh <unk> bash
|
||||
```
|
||||
|
||||
|
||||
@ -123,3 +123,14 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Aggiungi quanto segue alla fine di `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -27,11 +27,11 @@ starship_precmd_user_func="blastoff"
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
eval $(starship init bash)
|
||||
trap blastoff DEBUG # Trap DEBUG *prima* di eseguire starship
|
||||
eval $(starship bash)
|
||||
```
|
||||
|
||||
## Cambia il Titolo della Finestra
|
||||
## Cambia il titolo della finestra
|
||||
|
||||
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`.
|
||||
|
||||
@ -39,7 +39,7 @@ Innanzitutto, bisogna definire una funzione per il cambio del titolo della fines
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
|
||||
echo -ne "\033]0; IL_TUO_TITOLO_QUI \007"
|
||||
}
|
||||
```
|
||||
|
||||
@ -68,7 +68,7 @@ function set_win_title(){
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
## Stile delle Stringhe
|
||||
## Stringhe di stile
|
||||
|
||||
Le stringhe di stile sono un elenco di parole, separate da spazi bianchi. Le parole non sono sensibili alle maiuscole (cioè `grassetto` e `BoLd` sono considerate la stessa stringa). Ogni parola può essere una delle seguenti:
|
||||
|
||||
|
@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
|
||||
|
||||
```toml
|
||||
# Don't print a new line at the start of the prompt
|
||||
add_newline = false
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
@ -80,10 +80,10 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
|
||||
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.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green.
|
||||
|
||||
#### Stile delle Stringhe
|
||||
#### Stringhe di stile
|
||||
|
||||
Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/).
|
||||
|
||||
@ -146,7 +146,7 @@ This is the list of prompt-wide configuration options.
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `add_newline` | `true` | Add a new line before the start of the prompt. |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
@ -162,7 +162,7 @@ format = """
|
||||
# Wait 10 milliseconds for starship to check files under the current directory.
|
||||
scan_timeout = 10
|
||||
|
||||
# Disable the newline at the start of the prompt
|
||||
# Disable the blank line at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
@ -207,6 +207,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
|
||||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
|
||||
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -1343,6 +1346,12 @@ symbol = "🌟 "
|
||||
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. 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.
|
||||
|
||||
::: Attenzione
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### Options
|
||||
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| 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
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `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. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
|
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
L'implementazione [Bash](https://github.com/starship/starship/blob/master/src/init/starship.bash) integrata in Starship è leggermente più complessa per consentire funzionalità avanzate come il [modulo di durata dei comandi](https://starship.rs/config/#Command-Duration) e per garantire che Starship sia compatibile con le configurazioni Bash preinstallate.
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
Per un elenco di tutti i flag accettati da `starship prompt`, utilizzare il seguente comando:
|
||||
|
||||
@ -56,33 +56,37 @@ Se si ottiene un errore come "_versione 'GLIBC_2. 8' non trovato (richiesta da S
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
## 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.
|
||||
|
||||
If Starship was installed using the `curl | bash` script, the following command will delete the binary:
|
||||
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship: Cross-Shell Prompt" />
|
||||
alt="Starship: Cross-Shell Prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="GitHub Actions workflow status" /></a>
|
||||
alt="GitHub Actions workflow status"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Versione Crates.io" /></a>
|
||||
alt="Versione Crates.io"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<a href="https://discord.gg/starship"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="Chat su Discord" /></a>
|
||||
alt="Chat su Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Segui @StarshipPrompt su Twitter" /></a>
|
||||
alt="Segui @StarshipPrompt su Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="Inglese" /></a>
|
||||
alt="Inglese"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Russo" /></a>
|
||||
alt="Russo"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Tedesco" /></a>
|
||||
alt="Tedesco"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Spagnolo" /></a>
|
||||
alt="Spagnolo"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Francese" /></a>
|
||||
alt="Francese"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship con iTerm2 e il tema Snazzy"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**Il prompt minimalista, super veloce e infinitamente personalizzabile per qualsiasi shell!**
|
||||
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Aggiungi quanto segue alla fine di `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 Contribuire
|
||||
|
||||
Siamo sempre alla ricerca di collaboratori di **tutti i livelli**! Se stai cercando di entrare facilmente nel progetto, prova un [buon primo problema](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
|
||||
|
@ -8,13 +8,29 @@ To install starship, you need to do two things:
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Prerequisiti
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### Installation
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Prerequisiti
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
@ -31,7 +47,29 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarative, single user, via [home-manager](home-manager)
|
||||
|
||||
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -39,18 +77,8 @@ home-manager switch
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### With Nix and home-manager, using zsh:
|
||||
|
||||
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
@ -16,7 +16,7 @@ Questo preset non cambia nulla tranne i simboli utilizzati per ogni modulo. Se g
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -94,7 +94,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
|
||||
|
||||
#### 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. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
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. 通常、パスは `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` または -Nix 上では `~/.config/powershell/Microsoft.PowerShell_profile.ps1` です。
|
||||
|
||||
```sh
|
||||
Invoke-Expression (&starship init powershell)
|
||||
@ -115,7 +115,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
|
||||
|
||||
::: warning Only elvish v0.15 or higher is supported. :::
|
||||
|
||||
Add the following to the end of `~/.elvish/rc.elv`:
|
||||
`~/.elvish/rc.elv` の最後に以下を追記してください。
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
@ -123,3 +123,14 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
`~/.tcshrc` の最後に以下を追加します:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -82,7 +82,7 @@ starship_precmd_user_func="set_win_title"
|
||||
|
||||
ここで、 `<color>` は色を指定します(以下で述べます)。 `fg:<color>` と `<color>` は現在同様の動作ですが、将来変更される可能性があります。 文字列中の単語の順序は関係ありません。
|
||||
|
||||
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`. 将来 `none` を他の単語と一緒に使用することはエラーになるかもしれません。
|
||||
`none` トークンは、文字列中の`bg:` 指定子の一部でない場合、他のすべてのトークンをオーバーライドします。そのため、たとえば、`fg:red none fg:blue` と指定した場合、スタイルなしの文字列が作られます。 `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`. 将来 `none` を他の単語と一緒に使用することはエラーになるかもしれません。
|
||||
|
||||
色は以下のいずれか1つを指定できます。
|
||||
|
||||
|
@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
Starshipのすべての設定は、この[TOML](https://github.com/toml-lang/toml)ファイルで行われます。
|
||||
|
||||
```toml
|
||||
# プロンプトの先頭に改行を表示しません
|
||||
add_newline = false
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# プロンプトの「❯」記号を「➜」に置き換えます
|
||||
[character] # 設定しているモジュールの名前は「character」です
|
||||
success_symbol = "[➜](bold green)" # 「success_symbol」セグメントは「ボールドグリーン」の色で「➜」に設定されています
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
|
||||
|
||||
# package モジュールを無効にし、プロンプトから完全に隠します
|
||||
# Disable the package module, hiding it from the prompt completely
|
||||
[package]
|
||||
disabled = true
|
||||
```
|
||||
@ -80,7 +80,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
|
||||
例:
|
||||
|
||||
- `[on](red bold)` は文字列 `on` に太字のテキストを赤色で表示します。
|
||||
- `[⬢ $version](bold green)` はシンボル `⬢` の後に変数 `バージョン`の内容を表示します 緑色の太字を付けています
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
- `[a [b](red) c](green)` は `a b c` を `b` だけ赤色に表示し、 `a` と `c` を緑色に表示します。
|
||||
|
||||
#### スタイルの設定
|
||||
@ -142,11 +142,11 @@ format = '''
|
||||
|
||||
### オプション
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| -------------- | ------------------------------ | ---------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | プロンプトの形式を設定します。 |
|
||||
| `scan_timeout` | `30` | ファイルをスキャンする際のタイムアウト時間 (milliseconds) です。 |
|
||||
| `add_newline` | `true` | プロンプトの開始前に新しい行を追加します。 |
|
||||
| オプション | デフォルト | 説明 |
|
||||
| -------------- | ------------------------------ | ----------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | プロンプトの形式を設定します。 |
|
||||
| `scan_timeout` | `30` | ファイルをスキャンする際のタイムアウト時間 (milliseconds) です。 |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -163,7 +163,7 @@ format = """
|
||||
|
||||
scan_timeout = 10
|
||||
|
||||
# プロンプトの 先頭での改行を無効にする
|
||||
# Disable the blank line at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
@ -208,6 +208,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@ -238,15 +239,17 @@ $character"""
|
||||
|
||||
[aws-vault](https://github.com/99designs/aws-vault)を使用する場合、プロファイル は`AWS_VAULT`env varから読み取られます。
|
||||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
### オプション
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ---------------- | ------------------------------------------------ | ----------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | moduleのフォーマットです。 |
|
||||
| `symbol` | `"☁️ "` | 現在のAWSプロファイルを表示する前に表示される記号です。 |
|
||||
| `region_aliases` | | AWS名に加えて表示するリージョンのエイリアスです。 |
|
||||
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | `aws`モジュールを無効にします。 |
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ---------------- | --------------------------------------------------- | ----------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | moduleのフォーマットです。 |
|
||||
| `symbol` | `"☁️ "` | 現在のAWSプロファイルを表示する前に表示される記号です。 |
|
||||
| `region_aliases` | | AWS名に加えて表示するリージョンのエイリアスです。 |
|
||||
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | `aws`モジュールを無効にします。 |
|
||||
|
||||
### 変数
|
||||
|
||||
@ -257,7 +260,7 @@ $character"""
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -267,7 +270,7 @@ $character"""
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@ -302,7 +305,7 @@ symbol = "🅰 "
|
||||
|
||||
## バッテリー
|
||||
|
||||
`battery`モジュールは、デバイスのバッテリー残量と現在の充電状態を示します。 モジュールは、デバイスのバッテリー残量が10%未満の場合にのみ表示されます。
|
||||
The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -331,7 +334,7 @@ discharging_symbol = "💀"
|
||||
|
||||
### バッテリーの表示
|
||||
|
||||
`display` オプションを使用して、バッテリーインジケーターを表示するタイミング(閾値)と外観(スタイル)を定義します。 `display` が提供されない場合、 デフォルトは次のとおりです。
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. デフォルトは次のとおりです。
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
@ -341,7 +344,7 @@ style = "bold red"
|
||||
|
||||
#### オプション
|
||||
|
||||
`display`オプションは、次の表の通りです。
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| オプション | 説明 |
|
||||
| ----------- | ------------------------------ |
|
||||
@ -365,14 +368,14 @@ style = "bold yellow"
|
||||
|
||||
## 文字
|
||||
|
||||
`character`モジュールは、端末でテキストが入力される場所の横に文字(通常は矢印)を表示します。
|
||||
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
|
||||
|
||||
文字は、最後のコマンドが成功したかどうかを示します。 表し方は下記の2つです。
|
||||
The character will tell you whether the last command was successful or not. It can do this in two ways:
|
||||
|
||||
- 色の変更 (`赤`/`緑`)
|
||||
- プロンプトの表示の変更 (`❯`/`✖`)
|
||||
|
||||
デフォルトでは、色だけが変更されます。 If you also want to change it's shape take a look at [this example](#with-custom-error-shape).
|
||||
By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
|
||||
@ -435,7 +438,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
|
||||
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
|
||||
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -450,19 +453,19 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
## コマンド実行時間
|
||||
|
||||
`cmd_duration`モジュールは、最後のコマンドの実行にかかった時間を示します。 モジュールが表示されるのは、コマンドが2秒以上かかった場合、または`min_time`値が存在する場合のみです。
|
||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||
|
||||
::: warning BashでDEBUGトラップをhookしない
|
||||
::: warning Do not hook the DEBUG trap in Bash
|
||||
|
||||
`bash`でStarshipを実行している場合、 `eval $(starship init $0)`実行した後に`DEBUG`トラップをフックしないでください。そうしないと、このモジュールが**おそらくですが**壊れます。
|
||||
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
|
||||
|
||||
:::
|
||||
|
||||
preexecのような機能を必要とするBashユーザーは、 [rcalorasのbash_preexecフレームワーク](https://github.com/rcaloras/bash-preexec)を使用できます。 `eval $(starship init $0)` を実行する前に、`preexec_functions`、および`precmd_functions`定義するだけで、通常どおり続行します。
|
||||
Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -489,7 +492,7 @@ Showing desktop notifications requires starship to be built with `rust-notify` s
|
||||
| duration | `16m40s` | コマンドの実行時間 |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -503,11 +506,11 @@ format = "underwent [$duration](bold yellow)"
|
||||
|
||||
## Conda
|
||||
|
||||
`$CONDA_DEFAULT_ENV`が設定されている場合、`conda`モジュールは現在のcondaの環境を表示します。
|
||||
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
|
||||
|
||||
::: tip
|
||||
|
||||
Note: これはconda自身の プロンプト修飾子 を抑制しません。`conda config --set changeps1 False` で実行することができます。
|
||||
This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
|
||||
|
||||
:::
|
||||
|
||||
@ -530,7 +533,7 @@ Note: これはconda自身の プロンプト修飾子 を抑制しません。`
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -543,7 +546,7 @@ format = "[$symbol$environment](dimmed green) "
|
||||
|
||||
## Crystal
|
||||
|
||||
`crystal`モジュールには、現在インストールされているCrystalのバージョンが表示されます。 By default the module will be shown if any of the following conditions are met:
|
||||
The `crystal` module shows the currently installed version of Crystal. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- カレントディレクトリに`shard.yml`ファイルが含まれている
|
||||
- カレントディレクトリに`.cr`の拡張子のファイルが含まれている
|
||||
@ -568,7 +571,7 @@ format = "[$symbol$environment](dimmed green) "
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -607,7 +610,7 @@ The `dart` module shows the currently installed version of Dart. By default the
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -620,11 +623,11 @@ format = "via [🔰 $version](bold red) "
|
||||
|
||||
## ディレクトリ
|
||||
|
||||
`directory`モジュールには、現在のディレクトリへのパスが表示され、3つの親フォルダは切り捨てられます。 ディレクトリは、現在のgitリポジトリであるとルートとなります。
|
||||
The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
|
||||
|
||||
fishスタイルのpwdオプションを使用すると、切り捨てられたパスを非表示にする代わりに、オプションで有効にした番号に基づいて各ディレクトリの短縮名が表示されます。
|
||||
When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
|
||||
|
||||
例として、`~/Dev/Nix/nixpkgs/pkgs`で、`nixpkgs`がリポジトリルートであり、オプションが`1`に設定されている場合を挙げます。 以前は`nixpkgs/pkgs`でしたが、`~/D/N/nixpkgs/pkgs`が表示されます。
|
||||
For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -641,7 +644,7 @@ fishスタイルのpwdオプションを使用すると、切り捨てられた
|
||||
| `home_symbol` | `"~"` | The symbol indicating home directory. |
|
||||
|
||||
<details>
|
||||
<summary>このモジュールは、どのようにディレクトリを表示するかについての高度なオプションをいくつか持っています。</summary>
|
||||
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
|
||||
|
||||
| Advanced Option | デフォルト | 説明 |
|
||||
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
@ -668,7 +671,7 @@ fishスタイルのpwdオプションを使用すると、切り捨てられた
|
||||
| path | `"D:/Projects"` | The current directory path |
|
||||
| style\* | `"black bold dimmed"` | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -682,7 +685,7 @@ truncation_symbol = "…/"
|
||||
|
||||
## Docker Context
|
||||
|
||||
`docker_context`モジュールは、 [Dockerコンテキスト](https://docs.docker.com/engine/context/working-with-contexts/)が`デフォルト`に設定されていない場合、現在アクティブな <1>Dockerコンテキストを表示します。
|
||||
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`.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -705,7 +708,7 @@ truncation_symbol = "…/"
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -718,7 +721,7 @@ format = "via [🐋 $context](blue bold)"
|
||||
|
||||
## Dotnet
|
||||
|
||||
`dotnet` モジュールはカレントディレクトリに関係する.NET Core SDKのバージョンを表示します。 もし SDKは現在のディレクトリに固定されているのであれば、その固定されたバージョンが表示されます。 それ以外の場合、モジュール SDKの最新のインストールバージョンを示します。
|
||||
The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
|
||||
|
||||
By default this module will only be shown in your prompt when one or more of the following files are present in the current directory:
|
||||
|
||||
@ -734,7 +737,7 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
|
||||
You'll also need the .NET Core SDK installed in order to use it correctly.
|
||||
|
||||
内部的に、このモジュールは自身のバージョン検知のメカニズムを利用します。 `dotnet --version` を実行するより2倍速く実行できますが、.NET project一般的でないディレクトリlayoutの場合は間違ったバージョンが示されてしまうことがあります。 速度よりも精度が重要な場合は、次の方法でメカニズムを無効にできます。 モジュールオプションで`heuristic = false `を設定します。
|
||||
Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
|
||||
|
||||
The module will also show the Target Framework Moniker (<https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions>) when there is a csproj file in the current directory.
|
||||
|
||||
@ -760,7 +763,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -800,7 +803,7 @@ The `elixir` module shows the currently installed version of Elixir and Erlang/O
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -813,7 +816,7 @@ symbol = "🔮 "
|
||||
|
||||
## Elm
|
||||
|
||||
`elm`モジュールは、現在インストールされているElmのバージョンを示します。 By default the module will be shown if any of the following conditions are met:
|
||||
The `elm` module shows the currently installed version of Elm. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- カレントディレクトリに`elm.json`ファイルが含まれている
|
||||
- カレントディレクトリに`elm-package.json`ファイルが含まれている
|
||||
@ -841,7 +844,7 @@ symbol = "🔮 "
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -854,7 +857,7 @@ format = "via [ $version](cyan bold) "
|
||||
|
||||
## 環境変数
|
||||
|
||||
`env_var`モジュールは、選択された環境変数の現在の値を表示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met:
|
||||
|
||||
- `variable`オプションが、既存の環境変数と一致する
|
||||
- `variable`オプションが定義されておらず、`default`オプションが定義されている
|
||||
@ -877,7 +880,7 @@ format = "via [ $version](cyan bold) "
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | `black bold dimmed` | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -916,7 +919,7 @@ The `erlang` module shows the currently installed version of Erlang/OTP. By defa
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -952,7 +955,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -989,7 +992,7 @@ asia-northeast1 = "an1"
|
||||
|
||||
## Git ブランチ
|
||||
|
||||
`git_branch`モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを表示します。
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1014,7 +1017,7 @@ asia-northeast1 = "an1"
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1050,7 +1053,7 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
| hash | `b703eb3` | The current git commit hash |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1064,7 +1067,7 @@ tag_symbol = "🔖 "
|
||||
|
||||
## Git の進行状態
|
||||
|
||||
`git_state`モジュールはgitディレクトリの進行状態を表します。 (例: _REBASING_, _BISECTING_, その他) 進捗情報がある場合(例: REBASING 3/10)はその情報も表示されます。
|
||||
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1090,7 +1093,7 @@ tag_symbol = "🔖 "
|
||||
| progress_total | `2` | The total operation progress |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1104,7 +1107,7 @@ cherry_pick = "[🍒 PICKING](bold red)"
|
||||
|
||||
## Git の状態
|
||||
|
||||
`git_status`モジュールは、現在のディレクトリのリポジトリの状態を表すシンボルを表示します。
|
||||
The `git_status` module shows symbols representing the state of the repo in your current directory.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1141,7 +1144,7 @@ The following variables can be used in `format`:
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
The following variables can be used in `diverged`:
|
||||
|
||||
@ -1187,7 +1190,7 @@ behind = "⇣${count}"
|
||||
|
||||
## Golang
|
||||
|
||||
`golang`モジュールは、現在インストールされているGolangのバージョンを示します。 By default the module will be shown if any of the following conditions are met:
|
||||
The `golang` module shows the currently installed version of Golang. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- カレントディレクトリに`go.mod`ファイルが含まれている
|
||||
- カレントディレクトリに`go.sum`ファイルが含まれている
|
||||
@ -1218,7 +1221,7 @@ behind = "⇣${count}"
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1256,7 +1259,7 @@ The `helm` module shows the currently installed version of Helm. By default the
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1269,7 +1272,7 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## ホスト名
|
||||
|
||||
`hostname`モジュールには、システムのホスト名が表示されます。
|
||||
The `hostname` module shows the system hostname.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1288,7 +1291,7 @@ format = "via [⎈ $version](bold white) "
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1304,7 +1307,7 @@ disabled = false
|
||||
|
||||
## Java
|
||||
|
||||
`java`モジュールは、現在インストールされているJavaのバージョンを示します。 By default the module will be shown if any of the following conditions are met:
|
||||
The `java` module shows the currently installed version of Java. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
|
||||
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
|
||||
@ -1329,7 +1332,7 @@ disabled = false
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1342,7 +1345,13 @@ symbol = "🌟 "
|
||||
|
||||
## ジョブ
|
||||
|
||||
`jobs`モジュールには、実行中のジョブの現在の数が表示されます。 このモジュールは、実行中のバックグラウンドジョブがある場合にのみ表示されます。 1つ以上のジョブがある、または`threshold`に指定した値以上にジョブがある場合は実行中のジョブの数を表示します。
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. 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.
|
||||
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1362,7 +1371,7 @@ symbol = "🌟 "
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1376,7 +1385,7 @@ threshold = 4
|
||||
|
||||
## Julia
|
||||
|
||||
`julia`モジュールは、現在インストールされているJuliaのバージョンを示します。 By default the module will be shown if any of the following conditions are met:
|
||||
The `julia` module shows the currently installed version of Julia. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- カレントディレクトリに`Project.toml`ファイルが含まれている
|
||||
- カレントディレクトリに`Manifest.toml`ファイルが含まれている
|
||||
@ -1402,7 +1411,7 @@ threshold = 4
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1440,7 +1449,7 @@ The `kotlin` module shows the currently installed version of Kotlin. By default
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1465,7 +1474,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
|
||||
|
||||
::: tip
|
||||
|
||||
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1488,7 +1497,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1504,7 +1513,7 @@ disabled = false
|
||||
|
||||
## 改行
|
||||
|
||||
`line_break`モジュールは、プロンプトを2行に分割します。
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1550,7 +1559,7 @@ The `lua` module shows the currently installed version of Lua. By default the mo
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1563,14 +1572,13 @@ format = "via [🌕 $version](bold blue) "
|
||||
|
||||
## メモリ使用量
|
||||
|
||||
`memory_usage</ 0>モジュールは、現在のシステムメモリとスワップ使用量を示します。</p>
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
|
||||
<p spaces-before="0">デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。</p>
|
||||
By default the swap usage is displayed if the total system swap is non-zero.
|
||||
|
||||
<p spaces-before="0">::: tip</p>
|
||||
::: tip
|
||||
|
||||
<p spaces-before="0">このモジュールはデフォルトで無効になっています。
|
||||
有効にするには、設定ファイルで<code>disabled`を`false`に設定します。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1611,7 +1619,7 @@ style = "bold dimmed green"
|
||||
|
||||
## Mercurial ブランチ
|
||||
|
||||
` hg_branch `モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを示します。
|
||||
The `hg_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1632,7 +1640,7 @@ style = "bold dimmed green"
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1674,7 +1682,7 @@ The `nim` module shows the currently installed version of Nim. By default the mo
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1688,7 +1696,7 @@ symbol = "🎣 "
|
||||
|
||||
## Nix-shell
|
||||
|
||||
`nix_shell`モジュールは、nix-shell環境を示しています。 このモジュールは、nixシェル環境内にあるときに表示されます。
|
||||
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
|
||||
|
||||
### オプション
|
||||
|
||||
@ -1710,7 +1718,7 @@ symbol = "🎣 "
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1726,7 +1734,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
|
||||
|
||||
## NodeJS
|
||||
|
||||
`nodejs`モジュールは、現在インストールされているNodeJSのバージョンを示します。 By default the module will be shown if any of the following conditions are met:
|
||||
The `nodejs` module shows the currently installed version of NodeJS. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- カレントディレクトリに`package.json`ファイルが含まれている
|
||||
- The current directory contains a `.node-version` file
|
||||
@ -1739,7 +1747,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
|
||||
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
@ -1755,7 +1763,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1797,7 +1805,7 @@ The `ocaml` module shows the currently installed version of OCaml. By default th
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1830,7 +1838,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1845,7 +1853,7 @@ symbol = "☁️ "
|
||||
|
||||
## パッケージのバージョン
|
||||
|
||||
`package`モジュールは、現在のディレクトリがパッケージのリポジトリである場合に表示され、現在のバージョンが表示されます。 The module currently supports `npm`, `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`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
|
||||
- **npm** – `npm`パッケージバージョンは、現在のディレクトリにある`package.json`から抽出されます
|
||||
- **cargo** – `cargo`パッケージバージョンは、現在のディレクトリにある`Cargo.toml`から抽出されます。
|
||||
@ -1878,7 +1886,7 @@ symbol = "☁️ "
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1930,7 +1938,7 @@ format = "via [🦪 $version]($style) "
|
||||
|
||||
## PHP
|
||||
|
||||
`php`モジュールは、現在インストールされているPHPのバージョンを示します。 By default the module will be shown if any of the following conditions are met:
|
||||
The `php` module shows the currently installed version of PHP. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- カレントディレクトリに`composer.json`ファイルが含まれている
|
||||
- The current directory contains a `.php-version` file
|
||||
@ -1956,7 +1964,7 @@ format = "via [🦪 $version]($style) "
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -1994,7 +2002,7 @@ The `purescript` module shows the currently installed version of PureScript vers
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -2007,7 +2015,7 @@ format = "via [$symbol$version](bold white)"
|
||||
|
||||
## Python
|
||||
|
||||
`python` モジュールは現在インストールされているPythonのバージョンと アクティブ化されている場合は現在のPython仮想環境を表示します。
|
||||
The `python` module shows the currently installed version of Python and the current Python virtual environment if one is activated.
|
||||
|
||||
If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`.
|
||||
|
||||
@ -2085,7 +2093,7 @@ detect_extensions = []
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of Ruby. 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
By default the `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- カレントディレクトリに`Gemfile`ファイルが含まれている
|
||||
- The current directory contains a `.ruby-version` file
|
||||
@ -2111,7 +2119,7 @@ By default the `ruby` module shows the currently installed version of Ruby. 次
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -2124,7 +2132,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of Rust. 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
By default the `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- カレントディレクトリに`Cargo.toml`ファイルが含まれている
|
||||
- カレントディレクトリに`.rs`の拡張子のファイルが含まれている
|
||||
@ -2149,7 +2157,7 @@ By default the `rust` module shows the currently installed version of Rust. 次
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -2160,13 +2168,55 @@ By default the `rust` module shows the currently installed version of Rust. 次
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### オプション
|
||||
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | moduleのフォーマットです。 |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### 変数
|
||||
|
||||
| 変数 | 設定例 | 説明 |
|
||||
| --------- | -------- | ---------------------- |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: tip
|
||||
|
||||
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2180,6 +2230,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
| `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. |
|
||||
| `format` | `$indicator` | moduleのフォーマットです。 |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
@ -2222,7 +2273,7 @@ The `shlvl` module shows the current SHLVL ("shell level") environment variable,
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -2256,7 +2307,7 @@ The `singularity` module shows the current singularity image, if inside a contai
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -2273,7 +2324,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
::: tip
|
||||
|
||||
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2307,7 +2358,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -2326,7 +2377,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of Swift. 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
By default the `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@ -2351,7 +2402,7 @@ By default the `swift` module shows the currently installed version of Swift.
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -2374,7 +2425,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:
|
||||
|
||||
- カレントディレクトリに`.terraform`フォルダが含まれている
|
||||
- The current directory contains a `.terraform` folder
|
||||
- Current directory contains a file with the `.tf` or `.hcl` extensions
|
||||
|
||||
### オプション
|
||||
@ -2398,7 +2449,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -2426,7 +2477,7 @@ The `time` module shows the current **local** time. The `format` configuration v
|
||||
|
||||
::: tip
|
||||
|
||||
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2451,7 +2502,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
|
||||
| time | `13:08:10` | The current time. |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -2468,12 +2519,12 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## Username
|
||||
|
||||
The `username` module shows active user's username. 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- カレントユーザーがroot
|
||||
- カレントユーザーが、ログインしているユーザーとは異なる
|
||||
- ユーザーがSSHセッションとして接続されている
|
||||
- `show_always`変数がtrueに設定されている
|
||||
- The current user is root
|
||||
- The current user isn't the same as the one that is logged in
|
||||
- The user is currently connected as an SSH session
|
||||
- The variable `show_always` is set to true
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2537,7 +2588,7 @@ The `vagrant` module shows the currently installed version of Vagrant. By defaul
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -2550,7 +2601,7 @@ format = "via [⍱ $version](bold white) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of Zig. 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
By default the the `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
@ -2574,7 +2625,7 @@ By default the the `zig` module shows the currently installed version of Zig.
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 設定例
|
||||
|
||||
@ -2638,7 +2689,7 @@ The order in which custom modules are shown can be individually set by including
|
||||
| symbol | オプション `記号` の値をミラーする |
|
||||
| style\* | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Custom command shell
|
||||
|
||||
|
@ -10,22 +10,22 @@
|
||||
- **設定**: [matchaiのDotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
|
||||
- **プロンプト**: [Starship](https://starship.rs/)
|
||||
|
||||
## How do I get command completion as shown in the demo GIF?
|
||||
## デモのGIFのようにコマンド補完はどうしたら使用できますか?
|
||||
|
||||
Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
|
||||
補完サポート、または自動補完は選択したシェルによって提供されます。 デモ中では、デフォルトの[Fish Shell](https://fishshell.com/)によって補完されています。 Z Shell (zsh) を利用しているのであれば、[zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions)を照参してください。
|
||||
|
||||
## Do top level `format` and `<module>.disabled` do the same thing?
|
||||
## トップレベルの`format`と`<module>.disabled`は同じように動作しますか?
|
||||
|
||||
はい、両方ともプロンプトでモジュールを無効にするために使用できます。 モジュールを無効にするだけの場合は、これらの理由から` <module> .disabled `を無効にする方法をお勧めします。
|
||||
|
||||
- Disabling modules is more explicit than omitting them from the top level `format`
|
||||
- モジュールを無効化することは、トップレベルの`format`を削除するよりも明示的です。
|
||||
- Starshipが更新されると、新しく作成されたモジュールがプロンプトに追加されます
|
||||
|
||||
## The docs say Starship is cross-shell. Why isn't my preferred shell supported?
|
||||
## Starshipはcross-shellとのことです。 私の好みのshellはサポートしていないようですが。
|
||||
|
||||
Starshipの構築方法は、事実上すべてのシェルのサポートを追加できるはずです。 Starshipのバイナリはステートレスであり、シェルに依存しないため、シェルがプロンプトのカスタマイズとシェルの拡張をサポートしている限り、Starshipを使用できます。
|
||||
|
||||
Starshipをbashで動作させる小さな例を次に示します。
|
||||
Starshipをbashで動作させる例を次に示します。
|
||||
|
||||
```sh
|
||||
# Get the status code from the last command executed
|
||||
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
Starshipに組み込まれた[Bashの実装](https://github.com/starship/starship/blob/master/src/init/starship.bash)は、[ Command Durationモジュール](https://starship.rs/config/#Command-Duration)などの高度な機能を可能にし、Starshipが事前にインストールされたBash構成と互換性があるようにするため、少し複雑です。
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
`Starshipのプロンプト`で受け入れられるすべてのフラグのリストは、次のコマンドを取得できます。
|
||||
|
||||
@ -50,43 +50,47 @@ starship prompt --help
|
||||
|
||||
## 古いバージョンの glibc を使用する Linux ディストリビューションで Starship を実行するにはどうすればよいですか?
|
||||
|
||||
"_version 'GLIBC_2のようなエラーが表示された場合。 8' が見つかりません (starshipで要求されます)_" プリビルドバイナリを使用しています(例えば、 CentOS 6 または 7 では、`glibc`の代わりに`musl`でコンパイルされたバイナリを使用できます。
|
||||
CentOS6や7などで事前にビルドされたバイナリを使用していて、"_version 'GLIBC_2.18' not found (required by starship)_" のようなエラーが出た場合、`glibc`の替わりに `musl`でコンパイルされたバイナリを使用できます。
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s --- -platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## プロンプトにグリフ記号が表示されないのはなぜですか?
|
||||
## よくわからない記号を見つけました。これはどういった意味ですか?
|
||||
|
||||
これの最も一般的な原因は、システムの設定ミスです。 いくつかのLinuxディストリビューション 特に、すぐに使用できるフォントサポートは付属していません。 次のことを確認する必要があります。
|
||||
不明な記号に遭遇した場合、`starship explain` を使用することで、現在表示しているモジュールの説明を見ることができます。
|
||||
|
||||
- ロケールは、`de_DE.UTF-8`や` ja_JP.UTF-8</ 0>などのUTF-8値に設定されています。 <code>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/)を使用しています。
|
||||
## 私のプロンプトで記号のグリフがないのはなぜですか?
|
||||
|
||||
システムをテストするには、ターミナルで次のコマンドを実行します。
|
||||
よくある原因はシステム上での設定ミスです。 いくつかのLinuxディストリビューションの初期設定にフォントサポートがありません。 次のことを確認してください。
|
||||
|
||||
- ロケールが、`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/)を使用している。
|
||||
|
||||
ターミナルで以下のコマンドを実行することでテストできます。
|
||||
|
||||
```sh
|
||||
echo -e "\xf0\x9f\x90\x8d"
|
||||
echo -e "\xee\x82\xa0"
|
||||
```
|
||||
|
||||
1行目は[snake emoji](https://emojipedia.org/snake/)を生成し、2行目は[powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs)を生成するはずです。
|
||||
一行目は[蛇の絵文字](https://emojipedia.org/snake/)、二行目は[powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs)が表示されるはずです。
|
||||
|
||||
いずれかのシンボルが正しく表示されない場合でも、システムの設定が間違っています。 残念ながら、フォント設定を正しくするのは難しい場合があります。 Discordのユーザーがお役に立てるかもしれません。 両方の記号が正しく表示されているにもかかわらず、まだStarshipに表示されていない場合は、[バグ報告をしてください!](https://github.com/starship/starship/issues/new/choose)
|
||||
もし、どちらの記号とも正しく表示されない場合は、システムの設定が間違っています。 不幸にも、正しくフォントを設定するのは難しいものです。 Discordのユーザーが助けてくれるかもしれません! もし記号が正しく表示されているのにもかかわらず、Starshipが正しく表示されていない場合は、[バグの報告](https://github.com/starship/starship/issues/new/choose)をお願いします。
|
||||
|
||||
## Starshipをアンインストールするにはどうすればいいですか?
|
||||
## Starshipをアンインストールしたい
|
||||
|
||||
Starshipは、最初の場所にインストールするのと同じくらい簡単にアンインストールできます。
|
||||
Starshipのアンインストールはインストールと同じぐらい簡単です。
|
||||
|
||||
1. Starshipを初期化するために使用されるシェル設定の行を削除します(例:`~/.bashrc`)。
|
||||
1. Starshipを初期化するために使用した、シェルの設定行を削除します (例:`~/.bashrc`)。
|
||||
1. Starshipのバイナリを削除します。
|
||||
|
||||
Starship がパッケージマネージャを使用してインストールされている場合は、アンインストール手順については、そのドキュメントを参照してください。
|
||||
パッケージマネージャーを使用してStarshipをインストールした場合は、パッケージマネージャーのアンインストールガイドを参照してください。
|
||||
|
||||
Starship が `curl | bash` スクリプトを使用してインストールされた場合、次のコマンドはバイナリを削除します:
|
||||
`curl | bash` スクリプトを使用してStarshipをインストールした場合は、以下のコマンドでバイナリを削除してください。
|
||||
|
||||
```sh
|
||||
# starshipバイナリを見つけて削除します
|
||||
# starshipバイナリを見つけて削除
|
||||
rm "$(which starship)"
|
||||
```
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt" />
|
||||
alt="Starship – Cross-shell prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="GitHub Actions workflow status" /></a>
|
||||
alt="GitHub Actions workflow status"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io version" /></a>
|
||||
alt="Crates.io version"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<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" /></a>
|
||||
alt="Chat on Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter" /></a>
|
||||
alt="Follow @StarshipPrompt on Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship with iTerm2 and the Snazzy theme"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**シェル用の最小限の、非常に高速で、無限にカスタマイズ可能なプロンプトです!**
|
||||
|
||||
@ -132,7 +147,7 @@
|
||||
|
||||
### 入門
|
||||
|
||||
**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/).
|
||||
**注意**: さまざまなプラットフォームが急増しているため、ここでは対応プラットフォームの一部だけを挙げています。 自分が使っているシェルがありませんか? [extra platform instructions](https://starship.rs/installing/) を確認してください。
|
||||
|
||||
1. **Starship** のバイナリをインストール
|
||||
|
||||
@ -150,7 +165,7 @@
|
||||
#### パッケージマネージャー経由でインストール
|
||||
|
||||
|
||||
##### Example: [Homebrew](https://brew.sh/):
|
||||
##### 例: [Homebrew の場合](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -201,7 +216,7 @@
|
||||
|
||||
#### 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. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
`Microsoft.PowerShell_profile.ps1` の最後に以下を追記してください。 PowerShell 上で `$PROFILE` 変数を問い合わせると、ファイルの場所を確認できます。 通常、パスは `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` または -Nix 上では `~/.config/powershell/Microsoft.PowerShell_profile.ps1` です。
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
@ -221,7 +236,7 @@
|
||||
|
||||
#### Elvish
|
||||
|
||||
**Warning** Only elvish v0.15 or higher is supported. Add the following to the end of `~/.elvish/rc.elv`:
|
||||
**警告** elvish v0.15 以上のみがサポートされています。 `~/.elvish/rc.elv` の最後に以下を追記してください。
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
@ -229,11 +244,22 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
`~/.tcshrc` の最後に以下を追加します:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 貢献
|
||||
|
||||
私たちは常に**すべてのスキルレベル**の貢献者を探しています! もし簡単にプロジェクトへ参加する方法をお探しなら、 [good first issue](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/) から貢献できます。
|
||||
|
||||
もしあなたが Starship への貢献に興味がある場合は、我々の[貢献ガイド](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)をご覧ください。 また、気軽に我々の[Discord サーバー](https://discord.gg/8Jzqu3T)へ顔を出してください。 👋
|
||||
|
||||
|
@ -8,13 +8,29 @@ To install starship, you need to do two things:
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### 必要なもの
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### Installation
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### 必要なもの
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
@ -31,7 +47,29 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarative, single user, via [home-manager](home-manager)
|
||||
|
||||
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -39,18 +77,8 @@ home-manager switch
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### With Nix and home-manager, using zsh:
|
||||
|
||||
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -28,7 +28,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
</video>
|
||||
</div>
|
||||
|
||||
### Quick Install
|
||||
### 빠른 설치
|
||||
|
||||
1. **starship** 바이러니 설치:
|
||||
|
||||
@ -42,9 +42,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
```
|
||||
|
||||
|
||||
#### Install via Package Manager
|
||||
#### 패키지 매니저를 이용한 설치
|
||||
|
||||
With [Homebrew](https://brew.sh/):
|
||||
[Homebrew](https://brew.sh/)를 통한 설치:
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -56,12 +56,12 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
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
|
||||
@ -72,7 +72,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
|
||||
@ -83,7 +83,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Zsh
|
||||
|
||||
Add the following to the end of `~/.zshrc`:
|
||||
`~/.zshrc`에 아래 라인을 추가
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
@ -94,7 +94,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. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
`Microsoft.PowerShell_profile.ps1`의 끝부분에 아래 내용을 추가. 해당 설정파일은 파워쉘에서 `$PROFILE` 변수 확인을 통해 확인 가능. 일반적으로 해당 파일은 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 혹은 -Nix의 경우 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`에 위치.
|
||||
|
||||
```sh
|
||||
Invoke-Expression (&starship init powershell)
|
||||
@ -103,7 +103,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
|
||||
@ -113,9 +113,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
|
||||
@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
아래의 라인을 `~/.tcshrc` 마지막에 추가:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
|
||||
|
||||
```toml
|
||||
# Don't print a new line at the start of the prompt
|
||||
add_newline = false
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
|
||||
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.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green.
|
||||
|
||||
#### Style Strings
|
||||
@ -146,7 +146,7 @@ This is the list of prompt-wide configuration options.
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `add_newline` | `true` | Add a new line before the start of the prompt. |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
@ -162,7 +162,7 @@ format = """
|
||||
# Wait 10 milliseconds for starship to check files under the current directory.
|
||||
scan_timeout = 10
|
||||
|
||||
# Disable the newline at the start of the prompt
|
||||
# Disable the blank line at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
@ -207,6 +207,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
|
||||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
|
||||
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -1343,6 +1346,12 @@ symbol = "🌟 "
|
||||
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. 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.
|
||||
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### Options
|
||||
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| 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
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `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. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
|
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
|
||||
@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
## 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:
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt" />
|
||||
alt="Starship – Cross-shell prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="깃헙 액션 워크풀로 상태" /></a>
|
||||
alt="깃헙 액션 워크풀로 상태"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io 버전" /></a>
|
||||
alt="Crates.io 버전"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<a href="https://discord.gg/starship"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="디스코드에 채팅을 하세요" /></a>
|
||||
alt="디스코드에 채팅을 하세요"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="트위터에서 @StarshipPrompt를 팔로우 하세요" /></a>
|
||||
alt="트위터에서 @StarshipPrompt를 팔로우 하세요"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship with iTerm2 and the Snazzy theme"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
|
||||
|
||||
@ -201,7 +216,7 @@
|
||||
|
||||
#### 파워셀
|
||||
|
||||
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. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
`Microsoft.PowerShell_profile.ps1`의 끝부분에 아래 내용을 추가. 해당 설정파일은 파워쉘에서 `$PROFILE` 변수 확인을 통해 확인 가능. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 기여
|
||||
|
||||
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).
|
||||
|
@ -8,13 +8,29 @@ To install starship, you need to do two things:
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### Installation
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
@ -31,7 +47,29 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarative, single user, via [home-manager](home-manager)
|
||||
|
||||
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -39,18 +77,8 @@ home-manager switch
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### With Nix and home-manager, using zsh:
|
||||
|
||||
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module.
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
|
||||
|
||||
```toml
|
||||
# Don't print a new line at the start of the prompt
|
||||
add_newline = false
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
|
||||
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.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green.
|
||||
|
||||
#### Style Strings
|
||||
@ -146,7 +146,7 @@ This is the list of prompt-wide configuration options.
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `add_newline` | `true` | Add a new line before the start of the prompt. |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
@ -162,7 +162,7 @@ format = """
|
||||
# Wait 10 milliseconds for starship to check files under the current directory.
|
||||
scan_timeout = 10
|
||||
|
||||
# Disable the newline at the start of the prompt
|
||||
# Disable the blank line at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
@ -207,6 +207,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
|
||||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
|
||||
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -1343,6 +1346,12 @@ symbol = "🌟 "
|
||||
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. 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.
|
||||
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### Options
|
||||
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| 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
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `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. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
|
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
|
||||
@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
## 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:
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt" />
|
||||
alt="Starship – Cross-shell prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="GitHub Actions workflow status" /></a>
|
||||
alt="GitHub Actions workflow status"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io version" /></a>
|
||||
alt="Crates.io version"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<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" /></a>
|
||||
alt="Chat on Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter" /></a>
|
||||
alt="Follow @StarshipPrompt on Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship with iTerm2 and the Snazzy theme"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
|
||||
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 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).
|
||||
|
@ -8,13 +8,29 @@ To install starship, you need to do two things:
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### Installation
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
@ -31,7 +47,29 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarative, single user, via [home-manager](home-manager)
|
||||
|
||||
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -39,18 +77,8 @@ home-manager switch
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### With Nix and home-manager, using zsh:
|
||||
|
||||
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module.
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
|
||||
|
||||
```toml
|
||||
# Don't print a new line at the start of the prompt
|
||||
add_newline = false
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
|
||||
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.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green.
|
||||
|
||||
#### Style Strings
|
||||
@ -146,7 +146,7 @@ This is the list of prompt-wide configuration options.
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `add_newline` | `true` | Add a new line before the start of the prompt. |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
@ -162,7 +162,7 @@ format = """
|
||||
# Wait 10 milliseconds for starship to check files under the current directory.
|
||||
scan_timeout = 10
|
||||
|
||||
# Disable the newline at the start of the prompt
|
||||
# Disable the blank line at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
@ -207,6 +207,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
|
||||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
|
||||
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -1343,6 +1346,12 @@ symbol = "🌟 "
|
||||
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. 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.
|
||||
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### Options
|
||||
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| 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
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `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. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
|
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
|
||||
@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
## 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:
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt" />
|
||||
alt="Starship – Cross-shell prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="GitHub Actions workflow status" /></a>
|
||||
alt="GitHub Actions workflow status"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io version" /></a>
|
||||
alt="Crates.io version"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<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" /></a>
|
||||
alt="Chat on Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter" /></a>
|
||||
alt="Follow @StarshipPrompt on Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship with iTerm2 and the Snazzy theme"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
|
||||
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 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).
|
||||
|
@ -8,13 +8,29 @@ To install starship, you need to do two things:
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### Installation
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
@ -31,7 +47,29 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarative, single user, via [home-manager](home-manager)
|
||||
|
||||
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -39,18 +77,8 @@ home-manager switch
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### With Nix and home-manager, using zsh:
|
||||
|
||||
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module.
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -123,3 +123,14 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
Todas as configurações do starship são feitas neste arquivo [TOML](https://github.com/toml-lang/toml):
|
||||
|
||||
```toml
|
||||
# Don't print a new line at the start of the prompt
|
||||
add_newline = false
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
|
||||
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.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green.
|
||||
|
||||
#### Estilo dos textos
|
||||
@ -142,11 +142,11 @@ This is the list of prompt-wide configuration options.
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| -------------- | ------------------------------ | ------------------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `add_newline` | `true` | Adiciona uma nova linha antes que o prompt de comando inicie. |
|
||||
| Option | Padrão | Descrição |
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Exemplo
|
||||
|
||||
@ -162,7 +162,7 @@ format = """
|
||||
# Wait 10 milliseconds for starship to check files under the current directory.
|
||||
scan_timeout = 10
|
||||
|
||||
# Disable the newline at the start of the prompt
|
||||
# Disable the blank line at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
@ -207,6 +207,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
|
||||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| Option | Padrão | Descrição |
|
||||
| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
|
||||
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -455,7 +458,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
|
||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||
|
||||
::: warning Não utilize o DEBUG-trap no Bash
|
||||
::: warning Do not hook the DEBUG trap in Bash
|
||||
|
||||
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
|
||||
|
||||
@ -1343,6 +1346,12 @@ symbol = "🌟 "
|
||||
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. 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.
|
||||
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### Opções
|
||||
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variável | Exemplo | Descrição |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| 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
|
||||
|
||||
### Exemplo
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `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. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
|
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
|
||||
@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
## 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:
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt" />
|
||||
alt="Starship – Cross-shell prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="Status do workflow Actions do GitHub" /></a>
|
||||
alt="Status do workflow Actions do GitHub"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Versão no Crates.io" /></a>
|
||||
alt="Versão no Crates.io"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<a href="https://discord.gg/starship"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="Chat no Discord" /></a>
|
||||
alt="Chat no Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Siga o @StarshipPrompt no Twitter" /></a>
|
||||
alt="Siga o @StarshipPrompt no Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship com iTerm2 e o tema Snazzy"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**O prompt minimalista, extremamente rápido e infinitamente personalizável para qualquer shell!**
|
||||
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 Contribuindo
|
||||
|
||||
Nós estamos sempre procurando contribuidores de **todos os níveis de conhecimento**! Se você está buscando um caminho mais fácil para começar no projeto, veja essas [boas issues para começar](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
|
||||
|
@ -8,13 +8,29 @@ To install starship, you need to do two things:
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Pré-requisitos
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### Installation
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Pré-requisitos
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
@ -31,7 +47,29 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarative, single user, via [home-manager](home-manager)
|
||||
|
||||
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -39,18 +77,8 @@ home-manager switch
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### With Nix and home-manager, using zsh:
|
||||
|
||||
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
@ -16,7 +16,7 @@ Essa predefinição não altera nada exceto os símbolos usados para cada módul
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
|
||||
|
||||
```toml
|
||||
# Don't print a new line at the start of the prompt
|
||||
add_newline = false
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
|
||||
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.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green.
|
||||
|
||||
#### Style Strings
|
||||
@ -146,7 +146,7 @@ This is the list of prompt-wide configuration options.
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `add_newline` | `true` | Add a new line before the start of the prompt. |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
@ -162,7 +162,7 @@ format = """
|
||||
# Wait 10 milliseconds for starship to check files under the current directory.
|
||||
scan_timeout = 10
|
||||
|
||||
# Disable the newline at the start of the prompt
|
||||
# Disable the blank line at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
@ -207,6 +207,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
|
||||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
|
||||
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -1343,6 +1346,12 @@ symbol = "🌟 "
|
||||
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. 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.
|
||||
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### Options
|
||||
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| 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
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `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. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
|
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
|
||||
@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
## 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:
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt" />
|
||||
alt="Starship – Cross-shell prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="GitHub Actions workflow status" /></a>
|
||||
alt="GitHub Actions workflow status"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io version" /></a>
|
||||
alt="Crates.io version"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<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" /></a>
|
||||
alt="Chat on Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter" /></a>
|
||||
alt="Follow @StarshipPrompt on Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship with iTerm2 and the Snazzy theme"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
|
||||
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 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).
|
||||
|
@ -8,13 +8,29 @@ To install starship, you need to do two things:
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### Installation
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
@ -31,7 +47,29 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarative, single user, via [home-manager](home-manager)
|
||||
|
||||
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -39,18 +77,8 @@ home-manager switch
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### With Nix and home-manager, using zsh:
|
||||
|
||||
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module.
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -123,3 +123,14 @@ description: Starship - минимальная, быстрая и бесконе
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
Вся конфигурация Starship выполняется в этом файле [TOML](https://github.com/toml-lang/toml):
|
||||
|
||||
```toml
|
||||
# Не добавлять пустую строку в начале ввода
|
||||
add_newline = false
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Поменять символ "❯" на символ "➜"
|
||||
[character] # Имя настраемого модуля - "character"
|
||||
symbol = "➜" # Сегменту "symbol" присваеваем значение "➜"
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
|
||||
|
||||
# Отключить модуль пакетов, полностью скрывая его из терминала
|
||||
# Disable the package module, hiding it from the prompt completely
|
||||
[package]
|
||||
disabled = true
|
||||
```
|
||||
@ -80,7 +80,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
|
||||
Например:
|
||||
|
||||
- `[on](red bold)` будет печатать строку `on` жирным текстом красного цвета.
|
||||
- `[⬢ $version](bold green)` будет печатать символ `⬢` за которым следует содержимое переменной `версии`, с жирным шрифтом зеленого цвета.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
- `[a [b](red) c](green)` будет печатать `a b c` с `b` красного и `a` и `c` зеленого цвета соответсвенно.
|
||||
|
||||
#### Строки стиля
|
||||
@ -142,11 +142,11 @@ format = '''
|
||||
|
||||
### Опции
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| -------------- | -------------------------------- | -------------------------------------------------------- |
|
||||
| `format` | [ссылка](#default-prompt-format) | Настройка форматирования оболочки. |
|
||||
| `scan_timeout` | `30` | Тайм-аут запуска сканирования файлов (в миллисекундах). |
|
||||
| `add_newline` | `true` | Добавление пустой строки перед началом командной строки. |
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| -------------- | -------------------------------- | ------------------------------------------------------- |
|
||||
| `format` | [ссылка](#default-prompt-format) | Настройка форматирования оболочки. |
|
||||
| `scan_timeout` | `30` | Тайм-аут запуска сканирования файлов (в миллисекундах). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Пример
|
||||
|
||||
@ -162,7 +162,7 @@ format = """
|
||||
# Подождите 10 милисекунд пока starship прочитает файлы в этой директории.
|
||||
scan_timeout = 10
|
||||
|
||||
# Выключить новую строку в начале подсказки (prompt)
|
||||
# Disable the blank line at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
@ -207,6 +207,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@ -237,15 +238,17 @@ $character"""
|
||||
|
||||
При использовании [aws-vault](https://github.com/99designs/aws-vault) профиль читается из переменной среды `AWS_VAULT`.
|
||||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
### Опции
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ---------------- | ------------------------------------------------ | -------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | Формат модуля. |
|
||||
| `symbol` | `"☁️ "` | Символ перед отображением текущего профиля AWS. |
|
||||
| `region_aliases` | | Таблица региона псевдонимов, отображаемая вместе с именем AWS. |
|
||||
| `style` | `"bold yellow"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Отключение модуля `AWS`. |
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ---------------- | --------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | Формат модуля. |
|
||||
| `symbol` | `"☁️ "` | Символ перед отображением текущего профиля AWS. |
|
||||
| `region_aliases` | | Таблица региона псевдонимов, отображаемая вместе с именем AWS. |
|
||||
| `style` | `"bold yellow"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Отключение модуля `AWS`. |
|
||||
|
||||
### Переменные
|
||||
|
||||
@ -256,7 +259,7 @@ $character"""
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Примеры
|
||||
|
||||
@ -266,7 +269,7 @@ $character"""
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@ -301,7 +304,7 @@ symbol = "🅰 "
|
||||
|
||||
## Батарея
|
||||
|
||||
Модуль `battery` показывает насколько заряжена батарея девайса и статус зарядки на данный момент. Модуль виден только, если заряд батареи устройства меньше 10%.
|
||||
The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -330,7 +333,7 @@ discharging_symbol = "💀"
|
||||
|
||||
### Отображение батареи
|
||||
|
||||
Параметр `display` используется для определения того, когда индикатор батареи должен быть показан (threshhold) и как он выглядит (style). Если `display` не предоставлено. Значение по умолчанию:
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. Значение по умолчанию:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
@ -340,7 +343,7 @@ style = "bold red"
|
||||
|
||||
#### Опции
|
||||
|
||||
Опция `display` представляет собой массив следующей таблицы.
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Параметр | Описание |
|
||||
| ----------- | -------------------------------------------------------- |
|
||||
@ -364,9 +367,9 @@ style = "bold yellow"
|
||||
|
||||
## Символ
|
||||
|
||||
Модуль `character` показывает символ (обычно, стрелка) рядом с вводимым текстом в терминале.
|
||||
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
|
||||
|
||||
Символ показывает, была ли последняя команда успешной или нет. It can do this in two ways:
|
||||
The character will tell you whether the last command was successful or not. It can do this in two ways:
|
||||
|
||||
- changing color (`red`/`green`)
|
||||
- changing shape (`❯`/`✖`)
|
||||
@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. |
|
||||
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
|
||||
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -449,19 +452,19 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
## Длительность команды
|
||||
|
||||
Модуль `cmd_duration` показывает время исполнения последней команды. Модуль будет показан только, если команда заняла более двух секунд, или если задан параметр `min_time`.
|
||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||
|
||||
::: warning Не подключайте ловушку DEBUG к Bash
|
||||
::: warning Do not hook the DEBUG trap in Bash
|
||||
|
||||
Если вы испоьзуете Starship в `bash`, не подключайте ловушку `DEBUG` после запуска `eval $(starship init $0)`, иначе этот модуль сломается.
|
||||
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
|
||||
|
||||
:::
|
||||
|
||||
Пользователи Bash, которым нужна функциональность, подобная preexec, могут использовать [фреймворк bash_preexec от rcaloras](https://github.com/rcaloras/bash-preexec). Просто определите массивы `preexec_functions` и `precmd_functions` перед запуском `eval $(starship init $0)`, а затем продолжайте нормально.
|
||||
Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -488,7 +491,7 @@ Showing desktop notifications requires starship to be built with `rust-notify` s
|
||||
| duration | `16m40s` | The time it took to execute the command |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -502,11 +505,11 @@ format = "underwent [$duration](bold yellow)"
|
||||
|
||||
## Конда
|
||||
|
||||
Модуль `conda` показывает текущее окружение conda, если `$CONDA_DEFAULT_ENV` присвоено значение.
|
||||
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
|
||||
|
||||
::: tip
|
||||
|
||||
Это не подавляет модификатор командной строки самой conda. Возможно, вы захотите запустить `conda config --set changeps1 False`.
|
||||
This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
|
||||
|
||||
:::
|
||||
|
||||
@ -529,7 +532,7 @@ format = "underwent [$duration](bold yellow)"
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -542,7 +545,7 @@ format = "[$symbol$environment](dimmed green) "
|
||||
|
||||
## Crystal
|
||||
|
||||
Модуль `crystal` показывает установленную версию Crystal. By default the module will be shown if any of the following conditions are met:
|
||||
The `crystal` module shows the currently installed version of Crystal. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- Текущий каталог содержит файл `shard.yml`
|
||||
- Текущий каталог содержит файл `.cr`
|
||||
@ -567,7 +570,7 @@ format = "[$symbol$environment](dimmed green) "
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -606,7 +609,7 @@ The `dart` module shows the currently installed version of Dart. By default the
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -619,11 +622,11 @@ format = "via [🔰 $version](bold red) "
|
||||
|
||||
## Каталог
|
||||
|
||||
Модуль `directory` показывает путь к вашей текущей директории, усеченной до трех родительских папок. Ваш каталог также будет отсечен до корня git репозитория, в котором вы находитесь.
|
||||
The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
|
||||
|
||||
При использовании стиля оболочки fish, вместо скрытия усеченного каталога, вы увидите укороченное имя каталога, зависимое от числа символов вы установите для этой опции.
|
||||
When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
|
||||
|
||||
Например, возьмем `~/Dev/Nix/nixpkgs/pkgs` где `nixpkgs` является корневым репозиторием, и в опции установлено `1`. Вы увидите `~/D/N/nixpkgs/pkgs`, а до этого было бы `nixpkgs/pkgs`.
|
||||
For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -640,7 +643,7 @@ format = "via [🔰 $version](bold red) "
|
||||
| `home_symbol` | `"~"` | The symbol indicating home directory. |
|
||||
|
||||
<details>
|
||||
<summary>Этот модуль имеет несколько расширенных опций конфигурации, которые контролируют отображение каталога.</summary>
|
||||
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
|
||||
|
||||
| Advanced Option | По умолчанию | Описание |
|
||||
| --------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
@ -656,7 +659,7 @@ format = "via [🔰 $version](bold red) "
|
||||
"src/com/long/java/path" = "mypath"
|
||||
```
|
||||
|
||||
`fish_style_pwd_dir_length` взаимодействует со стандартными параметрами усечения, которые могут сначала показаться странными: если он не равен нулю, элементы пути, который обычно усекается, вместо этого отображаются с указанным количеством символов. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
|
||||
`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
|
||||
|
||||
</details>
|
||||
|
||||
@ -667,7 +670,7 @@ format = "via [🔰 $version](bold red) "
|
||||
| path | `"D:/Projects"` | The current directory path |
|
||||
| style\* | `"black bold dimmed"` | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -681,7 +684,7 @@ truncation_symbol = "…/"
|
||||
|
||||
## Контекст Docker
|
||||
|
||||
Модуль `docker_context` показывает текущий активный [контекст Docker](https://docs.docker.com/engine/context/working-with-contexts/), если он не установлен как `default`.
|
||||
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`.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -704,7 +707,7 @@ truncation_symbol = "…/"
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -717,7 +720,7 @@ format = "via [🐋 $context](blue bold)"
|
||||
|
||||
## Dotnet
|
||||
|
||||
Модуль `dotnet` показывает соответствующую версию .NET Core SDK для текущего каталога. Если SDK был закреплен в текущей директории, будет показана закрепленная версия. В противном случае модуль отображает последнюю установленную версию SDK.
|
||||
The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
|
||||
|
||||
By default this module will only be shown in your prompt when one or more of the following files are present in the current directory:
|
||||
|
||||
@ -733,7 +736,7 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
|
||||
You'll also need the .NET Core SDK installed in order to use it correctly.
|
||||
|
||||
Внутренне этот модуль использует свой собственный механизм определения версий. Обычно он в два раза быстрее, чем `dotnet --version`, но он может показывать неправильную версию, если ваш .NET проект имеет необычный формат каталога. Если точность важнее, чем скорость, вы можете отключить механизм опцией `heuristic = false` в настройках модуля.
|
||||
Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
|
||||
|
||||
The module will also show the Target Framework Moniker (<https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions>) when there is a csproj file in the current directory.
|
||||
|
||||
@ -759,7 +762,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -774,7 +777,7 @@ heuristic = false
|
||||
|
||||
## Elixir
|
||||
|
||||
Модуль `elixir` показывает установленную версию Elixir и Erlang/OTP. By default the module will be shown if any of the following conditions are met:
|
||||
The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- Текущий каталог содержит файл `mix.exs`.
|
||||
|
||||
@ -799,7 +802,7 @@ heuristic = false
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -812,7 +815,7 @@ symbol = "🔮 "
|
||||
|
||||
## Elm
|
||||
|
||||
Модуль `elm` показывает установленную версию Elm. By default the module will be shown if any of the following conditions are met:
|
||||
The `elm` module shows the currently installed version of Elm. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- Текущий каталог содержит файл `elm.json`
|
||||
- Текущий каталог содержит файл `elm-package.json`
|
||||
@ -840,7 +843,7 @@ symbol = "🔮 "
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -853,7 +856,7 @@ format = "via [ $version](cyan bold) "
|
||||
|
||||
## Переменная Окружения
|
||||
|
||||
Модуль `env_var` отображает текущее значение выбранной переменной окружения. Модуль будет показан только в том случае, если любое из следующих условий соблюдено:
|
||||
The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met:
|
||||
|
||||
- Опция `variable` соответствует существующей переменной среды
|
||||
- Опция `variable` не определена, но определена опция `default`
|
||||
@ -876,7 +879,7 @@ format = "via [ $version](cyan bold) "
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | `black bold dimmed` | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -915,7 +918,7 @@ The `erlang` module shows the currently installed version of Erlang/OTP. By defa
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -951,7 +954,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Примеры
|
||||
|
||||
@ -988,7 +991,7 @@ asia-northeast1 = "an1"
|
||||
|
||||
## Ветвь Git
|
||||
|
||||
Модуль `git_branch` показывает активную ветку репозитория в вашем текущей директории.
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1013,7 +1016,7 @@ asia-northeast1 = "an1"
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1049,7 +1052,7 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
| hash | `b703eb3` | The current git commit hash |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1063,7 +1066,7 @@ tag_symbol = "🔖 "
|
||||
|
||||
## Состояние Git
|
||||
|
||||
Модуль `git_state` будет отображаться в директориях, являющимися частью репозитория git, и там, где выполняется операция, такие как: _REBASING_, _BISECTING_, и т. д. Если есть информация о прогрессе (например, REBASING 3/10), эта информация также будет показана.
|
||||
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1089,7 +1092,7 @@ tag_symbol = "🔖 "
|
||||
| progress_total | `2` | The total operation progress |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1103,7 +1106,7 @@ cherry_pick = "[🍒 PICKING](bold red)"
|
||||
|
||||
## Статус Git
|
||||
|
||||
Модуль `git_status` отображает символы, представляющие состояние репозитория в вашей текущей директории.
|
||||
The `git_status` module shows symbols representing the state of the repo in your current directory.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1140,7 +1143,7 @@ The following variables can be used in `format`:
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| style\* | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
The following variables can be used in `diverged`:
|
||||
|
||||
@ -1173,7 +1176,7 @@ renamed = "👅"
|
||||
deleted = "🗑"
|
||||
```
|
||||
|
||||
Показывать счетчик впереди/позади для отслеживаемой ветки
|
||||
Show ahead/behind count of the branch being tracked
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
@ -1186,7 +1189,7 @@ behind = "⇣${count}"
|
||||
|
||||
## Golang
|
||||
|
||||
Модуль `golang` показывает установленную версию Golang. By default the module will be shown if any of the following conditions are met:
|
||||
The `golang` module shows the currently installed version of Golang. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- Текущий каталог содержит файл `go.mod`
|
||||
- Текущий каталог содержит файл `go.sum`
|
||||
@ -1217,7 +1220,7 @@ behind = "⇣${count}"
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1255,7 +1258,7 @@ The `helm` module shows the currently installed version of Helm. By default the
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1268,7 +1271,7 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## Имя хоста
|
||||
|
||||
Модуль `hostname` отображает имя системы (хоста).
|
||||
The `hostname` module shows the system hostname.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1287,7 +1290,7 @@ format = "via [⎈ $version](bold white) "
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1303,7 +1306,7 @@ disabled = false
|
||||
|
||||
## Java
|
||||
|
||||
Модуль `java` показывает установленную версию Java. By default the module will be shown if any of the following conditions are met:
|
||||
The `java` module shows the currently installed version of Java. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
|
||||
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
|
||||
@ -1328,7 +1331,7 @@ disabled = false
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1341,7 +1344,13 @@ symbol = "🌟 "
|
||||
|
||||
## Задачи
|
||||
|
||||
Модуль `jobs` отображает текущее количество запущенных работ. Модуль будет показан только если работы выполняются в фоне. Модуль покажет количество запущенных задач при наличии более чем 1 задачи, или больше, чем значение конфигурации `threshold`, если оно существует.
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. 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.
|
||||
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1361,7 +1370,7 @@ symbol = "🌟 "
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1401,7 +1410,7 @@ The `julia` module shows the currently installed version of Julia. By default th
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1439,7 +1448,7 @@ The `kotlin` module shows the currently installed version of Kotlin. By default
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1464,7 +1473,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
|
||||
|
||||
::: tip
|
||||
|
||||
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1487,7 +1496,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1503,7 +1512,7 @@ disabled = false
|
||||
|
||||
## Перевод Строки
|
||||
|
||||
Модуль `line_break` разделяет командную строку на две строки.
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1549,7 +1558,7 @@ The `lua` module shows the currently installed version of Lua. By default the mo
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1562,13 +1571,13 @@ format = "via [🌕 $version](bold blue) "
|
||||
|
||||
## Использование памяти
|
||||
|
||||
Модуль `memory_usage` отображает текущую системную память и использование подкачки.
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
|
||||
По умолчанию использование подкачки отображается, если общая сумма подкачки системы не равна нулю.
|
||||
By default the swap usage is displayed if the total system swap is non-zero.
|
||||
|
||||
::: tip
|
||||
|
||||
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1609,7 +1618,7 @@ style = "bold dimmed green"
|
||||
|
||||
## Ветка Mercurial
|
||||
|
||||
Модуль `hg_branch` показывает активную ветку репозитория в вашем текущем каталоге.
|
||||
The `hg_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1630,7 +1639,7 @@ style = "bold dimmed green"
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1672,7 +1681,7 @@ The `nim` module shows the currently installed version of Nim. By default the mo
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1686,7 +1695,7 @@ symbol = "🎣 "
|
||||
|
||||
## Nix-shell
|
||||
|
||||
Модуль `nix_shell` показывает окружение nix-shell. Модуль будет показываться внутри среды nix-shell.
|
||||
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1708,7 +1717,7 @@ symbol = "🎣 "
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1724,7 +1733,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
|
||||
|
||||
## NodeJS
|
||||
|
||||
Модуль `nodejs` показывает установленную версию NodeJS. By default the module will be shown if any of the following conditions are met:
|
||||
The `nodejs` module shows the currently installed version of NodeJS. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- Текущий каталог содержит файл `package.json`
|
||||
- The current directory contains a `.node-version` file
|
||||
@ -1737,7 +1746,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. |
|
||||
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
@ -1753,7 +1762,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1795,7 +1804,7 @@ The `ocaml` module shows the currently installed version of OCaml. By default th
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1828,7 +1837,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1843,7 +1852,7 @@ symbol = "☁️ "
|
||||
|
||||
## Версия пакета
|
||||
|
||||
Модуль `package` отображается, когда текущий каталог является репозиторием для пакета и показывает его текущую версию. The module currently supports `npm`, `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`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
|
||||
- **npm** – Версия пакета `npm` из файла `package.json` в текущем каталоге
|
||||
- **cargo** – Версия пакета `cargo` из файла `Cargo.toml` в текущем каталоге
|
||||
@ -1876,7 +1885,7 @@ symbol = "☁️ "
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1928,7 +1937,7 @@ format = "via [🦪 $version]($style) "
|
||||
|
||||
## PHP
|
||||
|
||||
Модуль `php` показывает установленную версию PHP. By default the module will be shown if any of the following conditions are met:
|
||||
The `php` module shows the currently installed version of PHP. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- Текущий каталог содержит файл `composer.json`
|
||||
- Текущий каталог содержит файл `.php-version`
|
||||
@ -1954,7 +1963,7 @@ format = "via [🦪 $version]($style) "
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -1992,7 +2001,7 @@ The `purescript` module shows the currently installed version of PureScript vers
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -2083,7 +2092,7 @@ detect_extensions = []
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of Ruby. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
By default the `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Текущий каталог содержит файл `Gemfile`
|
||||
- Текущий каталог содержит файл `.ruby-version`
|
||||
@ -2109,7 +2118,7 @@ By default the `ruby` module shows the currently installed version of Ruby. Мо
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -2122,7 +2131,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of Rust. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
By default the `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Текущий каталог содержит файл `Cargo.toml`
|
||||
- Текущий каталог содержит файл с расширением `.rs`
|
||||
@ -2147,7 +2156,7 @@ By default the `rust` module shows the currently installed version of Rust. Мо
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -2158,13 +2167,55 @@ By default the `rust` module shows the currently installed version of Rust. Мо
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### Опции
|
||||
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | Формат модуля. |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | Стиль модуля. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### Переменные
|
||||
|
||||
| Переменная | Пример | Описание |
|
||||
| ---------- | -------- | ------------------------------------ |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: tip
|
||||
|
||||
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2178,6 +2229,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
| `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. |
|
||||
| `format` | `$indicator` | Формат модуля. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
@ -2220,7 +2272,7 @@ The `shlvl` module shows the current SHLVL ("shell level") environment variable,
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -2254,7 +2306,7 @@ The `singularity` module shows the current singularity image, if inside a contai
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -2271,7 +2323,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
::: tip
|
||||
|
||||
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2305,7 +2357,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -2324,7 +2376,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of Swift. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
By default the `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@ -2349,7 +2401,7 @@ By default the `swift` module shows the currently installed version of Swift. М
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -2372,7 +2424,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:
|
||||
|
||||
- Текущий каталог содержит папку `.terraform`
|
||||
- The current directory contains a `.terraform` folder
|
||||
- Current directory contains a file with the `.tf` or `.hcl` extensions
|
||||
|
||||
### Опции
|
||||
@ -2396,7 +2448,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -2424,7 +2476,7 @@ The `time` module shows the current **local** time. The `format` configuration v
|
||||
|
||||
::: tip
|
||||
|
||||
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2449,7 +2501,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
|
||||
| time | `13:08:10` | The current time. |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -2466,12 +2518,12 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## Username
|
||||
|
||||
The `username` module shows active user's username. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- Текущий пользователь - root
|
||||
- Текущий пользователь отличается от залогиненного
|
||||
- Пользователь подключен к SSH-сессии
|
||||
- Переменная `show_always` равна true
|
||||
- The current user is root
|
||||
- The current user isn't the same as the one that is logged in
|
||||
- The user is currently connected as an SSH session
|
||||
- The variable `show_always` is set to true
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2535,7 +2587,7 @@ The `vagrant` module shows the currently installed version of Vagrant. By defaul
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -2548,7 +2600,7 @@ format = "via [⍱ $version](bold white) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of Zig. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
By default the the `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
@ -2572,7 +2624,7 @@ By default the the `zig` module shows the currently installed version of Zig. М
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Пример
|
||||
|
||||
@ -2636,7 +2688,7 @@ The order in which custom modules are shown can be individually set by including
|
||||
| symbol | Отражает значение параметра `symbol` |
|
||||
| style\* | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Custom command shell
|
||||
|
||||
|
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
[Реализация для Bash](https://github.com/starship/starship/blob/master/src/init/starship.bash), встроенная в Starship, несколько сложнее, чтобы предоставить дополнительные возможности, такие как [модуль длительности команды](https://starship.rs/config/#Command-Duration) и обеспечить совместимость Starship с заранее установленными конфигурациями Bash.
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
Для списка всех флагов, принимаемых `starship prompt`, используйте следующую команду:
|
||||
|
||||
@ -56,6 +56,10 @@ starship prompt --help
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
## 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:
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship - меж-оболочная командная строка" />
|
||||
alt="Starship - меж-оболочная командная строка"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="Статус GitHub Actions" /></a>
|
||||
alt="Статус GitHub Actions"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Версия Crates.io" /></a>
|
||||
alt="Версия Crates.io"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<a href="https://discord.gg/starship"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="Чат в Discord" /></a>
|
||||
alt="Чат в Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Подпишитесь на @StarshipPrompt в Twitter" /></a>
|
||||
alt="Подпишитесь на @StarshipPrompt в Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship в iTerm2 с темой Snazzy"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки!**
|
||||
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 Помощь
|
||||
|
||||
Мы всегда ищем помощь людей **всех уровней навыков**! Если вы хотите облегчить свой путь к проекту, посмотрите хорошие первые ошибки ([first good issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)).
|
||||
|
@ -8,13 +8,29 @@ To install starship, you need to do two things:
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Требования
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### Installation
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Требования
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
@ -31,7 +47,29 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarative, single user, via [home-manager](home-manager)
|
||||
|
||||
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -39,18 +77,8 @@ home-manager switch
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### With Nix and home-manager, using zsh:
|
||||
|
||||
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
|
||||
|
||||
```toml
|
||||
# Don't print a new line at the start of the prompt
|
||||
add_newline = false
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
|
||||
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.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green.
|
||||
|
||||
#### Style Strings
|
||||
@ -146,7 +146,7 @@ This is the list of prompt-wide configuration options.
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `add_newline` | `true` | Add a new line before the start of the prompt. |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
@ -162,7 +162,7 @@ format = """
|
||||
# Wait 10 milliseconds for starship to check files under the current directory.
|
||||
scan_timeout = 10
|
||||
|
||||
# Disable the newline at the start of the prompt
|
||||
# Disable the blank line at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
@ -207,6 +207,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@ -237,15 +238,17 @@ The `aws` module shows the current AWS region and profile. This is based on `AWS
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
|
||||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| Option | Default | Description |
|
||||
| ---------------- | --------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
|
||||
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -1343,6 +1346,12 @@ symbol = "🌟 "
|
||||
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. 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.
|
||||
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
@ -1737,7 +1746,7 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
@ -2158,6 +2167,48 @@ By default the `rust` module shows the currently installed version of Rust. The
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### Options
|
||||
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| 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
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
@ -2178,6 +2229,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `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. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
|
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
|
||||
@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
## 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:
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt" />
|
||||
alt="Starship – Cross-shell prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="GitHub Actions workflow status" /></a>
|
||||
alt="GitHub Actions workflow status"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io version" /></a>
|
||||
alt="Crates.io version"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<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" /></a>
|
||||
alt="Chat on Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter" /></a>
|
||||
alt="Follow @StarshipPrompt on Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship with iTerm2 and the Snazzy theme"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
|
||||
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 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).
|
||||
|
@ -8,13 +8,29 @@ To install starship, you need to do two things:
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### Installation
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
@ -31,7 +47,29 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Declarative, single user, via [home-manager](home-manager)
|
||||
|
||||
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -39,18 +77,8 @@ home-manager switch
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### With Nix and home-manager, using zsh:
|
||||
|
||||
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
@ -16,7 +16,7 @@ This preset doesn't change anything except for the symbols used for each module.
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -123,3 +123,14 @@ eval $(starship init ion)
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Thêm đoạn dưới vào cuối file `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
[Bản cài đặt Bash](https://github.com/starship/starship/blob/master/src/init/starship.bash) xây dựng bên trong Starship phực tạp hơn một chút để cho phép thực hiện các tính năng nâng cao hơn một chứt như [Command Duration module](https://starship.rs/config/#Command-Duration) và chắc chắn rằng Starship là tương thích với cấu hình Bash đã cài đặt trước đó.
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
Với một danh sách tất cả các cờ đã được chấp nhận bởi `starship prompt`, sử dụng lệnh sau:
|
||||
|
||||
@ -56,15 +56,19 @@ Nếu bạn nhận được một lỗi giống như "_version 'GLIBC_2.18' not
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Tại sao tôi không tình thấy một kí hiệu glyph trong prompt?
|
||||
## 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ì?
|
||||
|
||||
Đa số nguyên nhân phổ biến của việc này là cấu hình hệ thống sai. Một số bản phân phối Linux đặc biệt không có hỗ trợ phông chữ ngay lập tức. Bạn cần chắc chắn rằng:
|
||||
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ị.
|
||||
|
||||
## 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?
|
||||
|
||||
Đ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:
|
||||
|
||||
- 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 sau trong một terminal:
|
||||
Để kiểm tra hệ thống của bạn, chạy các câu lệnh bên dưới trong terminal:
|
||||
|
||||
```sh
|
||||
echo -e "\xf0\x9f\x90\x8d"
|
||||
@ -73,9 +77,9 @@ 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).
|
||||
|
||||
Nếu một trong hai biểu tượng không hiển thị chính xác, hệ thống của bạn vẫn bị cấu hình sai. Thật không may, việc lấy đúng cấu hình phông chữ đôi khi rất khó. Những người dùng trên Discord có thể giúp đỡ. Nếu cả hai kí hiệu 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)
|
||||
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)
|
||||
|
||||
## Làm cách nào để tôi gỡ cài đặt Starship?
|
||||
## Là thế nào để tôi gỡ cài đặt Starship?
|
||||
|
||||
Starship thì dễ dàng gỡ cài đặt như cài đặt ngay từ đầu.
|
||||
|
||||
@ -84,7 +88,7 @@ Starship thì dễ dàng gỡ cài đặt như cài đặt ngay từ đầu.
|
||||
|
||||
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.
|
||||
|
||||
Nếu Starship đã được càu đặt bằng việc sử dụng `curl | bash`, theo câu lệnh sau để xoá tập tin nhị phân:
|
||||
Nếu Starship đã được cài đặt bằng việc sử dụng `curl | bash`, theo câu lệnh sau để xoá tập tin nhị phân:
|
||||
|
||||
```sh
|
||||
# Xác định vị trí và xóa tập tin nhị phân của starship
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt" />
|
||||
alt="Starship – Cross-shell prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="Trạng thái GitHub Actions workflow" /></a>
|
||||
alt="Trạng thái GitHub Actions workflow"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Phiên bản Crates.io" /></a>
|
||||
alt="Phiên bản Crates.io"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<a href="https://discord.gg/starship"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="Trò chuyện trên Discord" /></a>
|
||||
alt="Trò chuyện trên Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Theo dõi @StarshipPrompt trên Twitter" /></a>
|
||||
alt="Theo dõi @StarshipPrompt trên Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="Tiếng Anh" /></a>
|
||||
alt="Tiếng Anh"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="Tiếng Nhật" /></a>
|
||||
alt="Tiếng Nhật"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="Tiếng Trung hiện đại" /></a>
|
||||
alt="Tiếng Trung hiện đại"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Tiếng Nga" /></a>
|
||||
alt="Tiếng Nga"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Tiếng Đức" /></a>
|
||||
alt="Tiếng Đức"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="Tiếng Trung giản thể" /></a>
|
||||
alt="Tiếng Trung giản thể"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Tiếng Tây Ban Nha" /></a>
|
||||
alt="Tiếng Tây Ban Nha"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Thiếng Pháp" /></a>
|
||||
alt="Thiếng Pháp"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship với iTerm2 and chủ đề Snazzy"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**Nhỏ gọn, cực nhanh, và khả năng tuỳ chỉnh vô hạn prompt cho bất kì shell nào!**
|
||||
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Thêm đoạn sau vào cuối tệp tin `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 Đóng góp
|
||||
|
||||
Chúng tôi luôn luôn tìm kiếm những cộng tác viên ở **tất cả các các mức độ về kĩ năng**! Nếu bạn đang tìm kiếm cách dễ dàng để tham gia vào dự án, thử một [good issue đầu tiên](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
|
||||
|
@ -8,13 +8,29 @@
|
||||
Đối với đa số người dùng, các hướng dẫn trên [trang chính](/guide/#🚀-installation) sẽ làm việc tốt. Tuy nhiên, với một vài nền tảng đặc biệt hơn, các hướng dẫn khác nhau là cần thiết.
|
||||
|
||||
Có rất nhiều nền tảng bên ngoài, rằng chúng đã không khớp như trong tệp tin README.md, do đó đây là vài hướng dẫn cài đặt cho những nền tảng khác đến từ cộng đồng. Của bạn không có ở đây? Xin hãy thêm nó vào đây nếu bạn tìm ra nó!
|
||||
## [termux](https://termux.com)
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Yêu cầu
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### Cài đặt
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Yêu cầu
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
### Cài đặt
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
@ -31,7 +47,29 @@ nix-env -iA nixos.starship
|
||||
|
||||
#### Khai báo, người dùng đơn, thông qua [home-manager](home-manager)
|
||||
|
||||
Thêm `pkgs.starship` vào `home.packages` trong tệp tin `home.nix` của bạn, sau đó chạy
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@ -39,18 +77,8 @@ home-manager switch
|
||||
|
||||
#### Khai báo, system-wide, với NixOS
|
||||
|
||||
Thêm `pkgs.starship` vào `environment.packages` 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
|
||||
```
|
||||
|
||||
### Modifying Init Scripts
|
||||
|
||||
#### Với Nix và home-manager, sử dụng zsh:
|
||||
|
||||
Thêm phần sau vào `programs.zsh.initExtra` trong tệp tin `home.nix` của bạn, sau đó chạy
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
@ -1,16 +1,16 @@
|
||||
# Migrating to v0.45.0
|
||||
# Tích hợp sang v0.45.0
|
||||
|
||||
Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization.
|
||||
Starship v0.45.0 là một bản phát hành chứa nhiều thay đổi trong việc chuẩn bị cho bản thay đổi lớn v1.0.0. Chúng tôi tạo một vài thay đổi xung quanh cách cấu hình được thực hiện trên dáu nhắc lệnh, cho phép tùy biến theo góc độ tốt hơn.
|
||||
|
||||
This guide is intended to walk you through the breaking changes.
|
||||
Hướng dẫn này nhằm hướng dẫn bạn vượt qua những sự thay đổi.
|
||||
|
||||
## `prompt_order` has been replaced by a root-level `format`
|
||||
## `prompt_order` được thay thế boiwr một root-level `format`
|
||||
|
||||
Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship.
|
||||
Từ trước đế v0.45.0, `prompt_order` sẽ chấp nhận một mảng các tên mô đun theo thứ tự mà chúng nên được render bởi Starship.
|
||||
|
||||
Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves.
|
||||
Starship v0.45.0 thay vì chấp nhận một giá trị `format`, nó cho phép tùy biến dấu nhắc lệnh bên ngoài chính các mô đun đó.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
**Ví dụcủa cấu hình pre-v0.45.0**
|
||||
|
||||
```toml
|
||||
prompt_order = [
|
||||
@ -31,7 +31,7 @@ prompt_order = [
|
||||
]
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
**Ví dụcủa cấu hình v0.45.0**
|
||||
|
||||
```toml
|
||||
format = """\
|
||||
@ -52,40 +52,40 @@ format = """\
|
||||
"""
|
||||
```
|
||||
|
||||
## Module `prefix` and `suffix` have been replaced by `format`
|
||||
## Mô đun `prefix` và`suffix` thay bằng `format`
|
||||
|
||||
Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered.
|
||||
Từ trước tới v0.45.0, một vài mô đun sẽ chấp nhận `prefix` và/hoặc `suffix` theo thứ tự để stylize các mà các mô đun được render.
|
||||
|
||||
Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output.
|
||||
Starship v0.45.0 thay vì chấp nhận một giá trị `format`, nó cho phép tùy biến dấu nhắc lệnh bên ngoài chính các mô đun đó. Thay vì định nghĩa một tiền tố và hậu tố cho các giá trị context-based, các giá trị bây giờ có thể được thay thế với một format string, cái đại diện cho đầu ra của module.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
**Ví dụ của cấu hình pre-v0.45.0**
|
||||
|
||||
```toml
|
||||
[cmd_duration]
|
||||
prefix = "took "
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
**Ví dụ của cấu hình v0.45.0**
|
||||
|
||||
```toml
|
||||
[cmd_duration]
|
||||
# $duration – The command duration (e.g. "15s")
|
||||
# $style – The default style of the module (e.g. "bold yellow")
|
||||
# $duration – Thời gian câu lệnh dùng để thực thi (e.g. "15s")
|
||||
# $style – Style mặc định của mô đun (e.g. "bold yellow")
|
||||
format = "took [$duration]($style) "
|
||||
```
|
||||
|
||||
### Affected Modules
|
||||
### Các mô đun ảnh hưởng
|
||||
|
||||
#### Character
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| Thuộc tính bị gỡ bỏ | Thay thế bằng |
|
||||
| ----------------------- | ---------------- |
|
||||
| `symbol` | `success_symbol` |
|
||||
| `use_symbol_for_status` | `error_symbol` |
|
||||
| `style_success` | `success_symbol` |
|
||||
| `style_failure` | `error_symbol` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Các thay đổi về cấu hình mặc định**
|
||||
|
||||
```diff
|
||||
[character]
|
||||
@ -98,26 +98,26 @@ format = "took [$duration]($style) "
|
||||
++ vicmd_symbol = "[❮](bold green)"
|
||||
```
|
||||
|
||||
Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code.
|
||||
Trước đây, thuộc tính `use_symbol_for_status` được sử dụng để cấu hình dấu nhắc lệnh hiển thị `error_symbol` khi câu lệnh cuối cùng trả về kết quả có status code khác 0.
|
||||
|
||||
With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties.
|
||||
Với bản hát hành v0.45.0, chúng ta bây giờ luôn sử dụng `error_symbol` sau các status khác 0, thống nhất các thuộc tính `use_symbol_for_status` và `error_symbol`.
|
||||
|
||||
To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file:
|
||||
Cấu hình dâu nhắc lệnh để sử dụng cấu hình `use_symbol_for_status = true`, thêm đoạn dưới vào tệp cấu hình của bạn:
|
||||
|
||||
```toml
|
||||
[character]
|
||||
error_symbol = "[✖](bold red)"
|
||||
```
|
||||
|
||||
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
|
||||
*Lưu ý:* Phần tử `character` tự động thêm vào một khoảng trắng phía sau, so unlike the other `format` strings, we specifically do not add one in the above examples.
|
||||
|
||||
#### Command Duration
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| Thuộc tính bị gỡ bỏ | Thay thế bằng |
|
||||
| ------------------- | ------------- |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Các thay đổi về cấu hình mặc định**
|
||||
|
||||
```diff
|
||||
[cmd_duration]
|
||||
@ -127,11 +127,11 @@ error_symbol = "[✖](bold red)"
|
||||
|
||||
#### Đường dẫn
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| Thuộc tính bị gỡ bỏ | Thay thế bằng |
|
||||
| ------------------- | ------------- |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Các thay đổi về cấu hình mặc định**
|
||||
|
||||
```diff
|
||||
[directory]
|
||||
@ -139,14 +139,14 @@ error_symbol = "[✖](bold red)"
|
||||
++ format = "[$path]($style)[$read_only]($read_only_style) "
|
||||
```
|
||||
|
||||
#### Environment Variable
|
||||
#### Biến môi trường
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Thuộc tính bị gỡ bỏ | Thay thế bằng |
|
||||
| ------------------- | ------------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Các thay đổi về cấu hình mặc định**
|
||||
|
||||
```diff
|
||||
[env_var]
|
||||
@ -157,12 +157,12 @@ error_symbol = "[✖](bold red)"
|
||||
|
||||
#### Git Commit
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Thuộc tính bị gỡ bỏ | Thay thế bằng |
|
||||
| ------------------- | ------------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Các thay đổi về cấu hình mặc định**
|
||||
|
||||
```diff
|
||||
[git_commit]
|
||||
@ -173,13 +173,13 @@ error_symbol = "[✖](bold red)"
|
||||
|
||||
#### Git Status
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ----------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| `show_sync_count` | `format` |
|
||||
| Thuộc tính bị gỡ bỏ | Thay thế bằng |
|
||||
| ------------------- | ------------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| `show_sync_count` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Các thay đổi về cấu hình mặc định**
|
||||
|
||||
```diff
|
||||
[git_status]
|
||||
@ -189,11 +189,11 @@ error_symbol = "[✖](bold red)"
|
||||
++ format = '([\[$all_status$ahead_behind\]]($style) )'
|
||||
```
|
||||
|
||||
Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch.
|
||||
Trước đây, thuộc tính `show_sync_count` được sử dụng để cấu hình dấu nhắc lệnh hiển thị số commit của nhánh ahead hoặc số lượng behind của remote branch.
|
||||
|
||||
With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`.
|
||||
Với bản phát hành v0.45.0, cái này được thay thế bằng ba thuộc tính rời `ahead`, `behind`, và `diverged`.
|
||||
|
||||
To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file:
|
||||
Cấu hình dấu nhắc lệnh sử dụng cấu hình `show_sync_count = true` cũ hơn, thiết lâp như dưới đây trong tệp cấu hình của bạn:
|
||||
|
||||
```toml
|
||||
[git_status]
|
||||
@ -204,12 +204,12 @@ behind = "⇣${count}"
|
||||
|
||||
#### Hostname
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Thuộc tính bị gỡ bỏ | Thay thế bằng |
|
||||
| ------------------- | ------------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Các thay đổi về cấu hình mặc định**
|
||||
|
||||
```diff
|
||||
[hostname]
|
||||
@ -220,13 +220,13 @@ behind = "⇣${count}"
|
||||
|
||||
#### Singularity
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `label` | `format` |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Thuộc tính bị gỡ bỏ | Thay thế bằng |
|
||||
| ------------------- | ------------- |
|
||||
| `nhãn` | `format` |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Các thay đổi về cấu hình mặc định**
|
||||
|
||||
```diff
|
||||
[singularity]
|
||||
@ -235,13 +235,13 @@ behind = "⇣${count}"
|
||||
++ format = '[$symbol\[$env\]]($style) '
|
||||
```
|
||||
|
||||
#### Time
|
||||
#### Thời gian
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ------------- |
|
||||
| `format` | `time_format` |
|
||||
| Thuộc tính bị gỡ bỏ | Thay thế bằng |
|
||||
| ------------------- | ------------- |
|
||||
| `format` | `time_format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Các thay đổi về cấu hình mặc định**
|
||||
|
||||
```diff
|
||||
[time]
|
||||
@ -250,14 +250,14 @@ behind = "⇣${count}"
|
||||
++ format = "at 🕙[$time]($style) "
|
||||
```
|
||||
|
||||
#### Custom Commands
|
||||
#### Các câu lệnh tùy biến
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Thuộc tính bị gỡ bỏ | Thay thế bằng |
|
||||
| ------------------- | ------------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Các thay đổi về cấu hình mặc định**
|
||||
|
||||
```diff
|
||||
[custom.example]
|
||||
|
@ -16,7 +16,7 @@ Preset này không thay đổi bất kể thứ gì ngoại trừ các kí hiệ
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
@ -84,6 +84,9 @@ symbol = " "
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
@ -123,3 +123,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
`Starship 功能繁多,有时您必须在编辑 <code>starship.toml` 之外做更多工作才能实现某些效果。 此页面详细介绍了一些在 starship 中使用的高级配置技巧。
|
||||
|
||||
::: 警告
|
||||
::: warning
|
||||
|
||||
本节所述的配置内容可能随 Starship 未来版本的更新而改变。
|
||||
|
||||
|
@ -9,8 +9,8 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
Starship 的所有配置都在此 [TOML](https://github.com/toml-lang/toml) 配置文件中完成:
|
||||
|
||||
```toml
|
||||
# Don't print a new line at the start of the prompt
|
||||
add_newline = false
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
@ -80,7 +80,7 @@ In the second part, which is enclosed in a `()`, is a [style string](#style-stri
|
||||
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.
|
||||
- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
|
||||
- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green.
|
||||
|
||||
#### 样式设定
|
||||
@ -142,11 +142,11 @@ format = '''
|
||||
|
||||
### 配置项
|
||||
|
||||
| Option | 默认值 | 描述 |
|
||||
| -------------- | ----------------------------- | ----------------------------------- |
|
||||
| `format` | [见下文](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Starship 扫描文件的超时时间(单位:毫秒)。 |
|
||||
| `add_newline` | `true` | 在提示符与提示信息间换行。 |
|
||||
| Option | 默认值 | 描述 |
|
||||
| -------------- | ----------------------------- | ----------------------------------------- |
|
||||
| `format` | [见下文](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Starship 扫描文件的超时时间(单位:毫秒)。 |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### 示例
|
||||
|
||||
@ -162,7 +162,7 @@ format = """
|
||||
# Wait 10 milliseconds for starship to check files under the current directory.
|
||||
scan_timeout = 10
|
||||
|
||||
# Disable the newline at the start of the prompt
|
||||
# Disable the blank line at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
@ -207,6 +207,7 @@ $purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vagrant\
|
||||
@ -237,15 +238,17 @@ $character"""
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var.
|
||||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
### 配置项
|
||||
|
||||
| Option | 默认值 | 描述 |
|
||||
| ---------------- | ------------------------------------------------ | ------------------------- |
|
||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | 组件格式化模板。 |
|
||||
| `symbol` | `"☁️ "` | 这个字段的内容会显示在当前 AWS 配置信息之前。 |
|
||||
| `region_aliases` | | 地区缩写列表,用来显示在 AWS 主机名之后。 |
|
||||
| `style` | `"bold yellow"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | 禁用 `AWS` 组件。 |
|
||||
| Option | 默认值 | 描述 |
|
||||
| ---------------- | --------------------------------------------------- | ------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | 组件格式化模板。 |
|
||||
| `symbol` | `"☁️ "` | 这个字段的内容会显示在当前 AWS 配置信息之前。 |
|
||||
| `region_aliases` | | 地区缩写列表,用来显示在 AWS 主机名之后。 |
|
||||
| `style` | `"bold yellow"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | 禁用 `AWS` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -266,7 +269,7 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[aws]
|
||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
||||
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||
style = "bold blue"
|
||||
symbol = "🅰 "
|
||||
[aws.region_aliases]
|
||||
@ -301,7 +304,7 @@ symbol = "🅰 "
|
||||
|
||||
## Battery
|
||||
|
||||
`battery` 组件显示电池充电情况和当前充电状态。 这个组件只会在当前电量低于 10% 时显示。
|
||||
The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -330,7 +333,7 @@ discharging_symbol = "💀"
|
||||
|
||||
### Battery 组件的显示
|
||||
|
||||
`display` 选项用于定义电池指示器的显示阈值(threshold)和显示效果(style)。 如果 `display` 没有设置, 默认设置如下:
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. 默认设置如下:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
@ -340,7 +343,7 @@ style = "bold red"
|
||||
|
||||
#### 配置项
|
||||
|
||||
`display` 字段的子字段如下:
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Option | 描述 |
|
||||
| ----------- | ---------------- |
|
||||
@ -364,9 +367,9 @@ style = "bold yellow"
|
||||
|
||||
## Character
|
||||
|
||||
`character` 组件用于在您输入终端的文本旁显示一个字符(通常是一个箭头)。
|
||||
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
|
||||
|
||||
这个字符可以告诉您最后一个命令是否执行成功。 It can do this in two ways:
|
||||
The character will tell you whether the last command was successful or not. It can do this in two ways:
|
||||
|
||||
- changing color (`red`/`green`)
|
||||
- changing shape (`❯`/`✖`)
|
||||
@ -434,7 +437,7 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
| Option | 默认值 | 描述 |
|
||||
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 |
|
||||
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
|
||||
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
@ -453,15 +456,15 @@ The `cmake` module shows the currently installed version of CMake. By default th
|
||||
|
||||
## Command Duration
|
||||
|
||||
`cmd_duration` 组件显示上一个命令执行的时间。 此组件只在命令执行时间长于两秒时显示,或者当其 `min_time` 字段被设置时,按此值为执行时间的显示下限。
|
||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||
|
||||
::: warning 不要在 Bash 里捕获 DEBUG 信号
|
||||
::: warning Do not hook the DEBUG trap in Bash
|
||||
|
||||
如果您正在 `bash` 上使用 Starship,在运行 `eval $(starship)` 后,不要捕获 `DEBUG` 信号,否则此组件**将会**坏掉。
|
||||
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
|
||||
|
||||
:::
|
||||
|
||||
需要在自动每一条命令前执行某些操作的 Bash 用户可以使用 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只需要在执行 `eval $(starship init $0)` 前简单地定义 `preexec_functions` 和 `precmd_functions` 两个列表,就可以照常运行了。
|
||||
Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -502,11 +505,11 @@ format = "underwent [$duration](bold yellow)"
|
||||
|
||||
## Conda
|
||||
|
||||
`conda` 组件在 `$CONDA_DEFAULT_ENV` 被设置时显示当前 conda 环境。
|
||||
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
|
||||
|
||||
::: tip
|
||||
|
||||
此组件没有禁用 conda 自带的提示符修改,您可能需要执行 `conda config --set changeps1 False`。
|
||||
This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
|
||||
|
||||
:::
|
||||
|
||||
@ -619,11 +622,11 @@ format = "via [🔰 $version](bold red) "
|
||||
|
||||
## Directory
|
||||
|
||||
`directory` 组件显示当前目录的路径,显示的路径会截断到三个父目录以内。 如果您处于一个 git 仓库中,显示的路径则最多会截断到该仓库的根目录。
|
||||
The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
|
||||
|
||||
当使用 fish 风格的当前目录显示样式时,您会看到基于您的设置的每个上级目录的短名称,而不是隐藏被截断的上级目录。
|
||||
When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
|
||||
|
||||
例如,对于 `~/Dev/Nix/nixpkgs/pkgs`,其中 `nixpkgs` 是 git 仓库根目录,fish 风格相关选项设置为 `1`。 您将会看到 `~/D/N/nixpkgs/pkgs`,而在设置 fish 风格之前,当前路径将显示成 `nixpkgs/pkgs`。
|
||||
For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -640,7 +643,7 @@ format = "via [🔰 $version](bold red) "
|
||||
| `home_symbol` | `"~"` | The symbol indicating home directory. |
|
||||
|
||||
<details>
|
||||
<summary>此组件有几个高级配置选项来控制当前目录路径的显示方式。</summary>
|
||||
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
|
||||
|
||||
| Advanced Option | 默认值 | 描述 |
|
||||
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
@ -717,7 +720,7 @@ format = "via [🐋 $context](blue bold)"
|
||||
|
||||
## Dotnet
|
||||
|
||||
`dotnet` 模块显示与当前目录下使用的 .NET Core SDK 相关联的版本。 如果当前目录已被绑定了一个版本的 SDK,则显示被帮定的版本。 否则此组件将显示最新安装的 SDK 版本。
|
||||
The `dotnet` module shows the relevant version of the .NET Core SDK for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
|
||||
|
||||
By default this module will only be shown in your prompt when one or more of the following files are present in the current directory:
|
||||
|
||||
@ -733,7 +736,7 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
|
||||
You'll also need the .NET Core SDK installed in order to use it correctly.
|
||||
|
||||
在内部,此组件使用自己的版本检测机制。 一般来说此组件是直接执行 `dotnet --version` 的两倍快,但当你的 .NET 项目使用了不常见的目录布局时此组件可能显示一个错误的版本。 如果相比于速度您更需要正确的版本号,您可以在组件设置中设置 `heuristic = false` 来禁用该机制。
|
||||
Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
|
||||
|
||||
The module will also show the Target Framework Moniker (<https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions>) when there is a csproj file in the current directory.
|
||||
|
||||
@ -853,7 +856,7 @@ format = "via [ $version](cyan bold) "
|
||||
|
||||
## Environment Variable
|
||||
|
||||
`env_var` 组件显示选定的环境变量的当前值。 此组件只有满足以下条件之一时才会被显示:
|
||||
The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met:
|
||||
|
||||
- 设置的 `variable` 是一个已存在的环境变量
|
||||
- 未定义 `variable`,但定义了 `default`
|
||||
@ -988,7 +991,7 @@ asia-northeast1 = "an1"
|
||||
|
||||
## Git Branch
|
||||
|
||||
`git_branch` 组件显示当前目录的 git 仓库的活动分支。
|
||||
The `git_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1063,7 +1066,7 @@ tag_symbol = "🔖 "
|
||||
|
||||
## Git State
|
||||
|
||||
`git_state` 组件会显示当前目录在哪个 git 仓库中,以及正在进行的操作,例如:_REBASING_,_BISECTING_ 等。 进度信息(例如 REBASING 3/10)如果存在则也会被显示。
|
||||
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1103,7 +1106,7 @@ cherry_pick = "[🍒 PICKING](bold red)"
|
||||
|
||||
## Git Status
|
||||
|
||||
`git_status`组件通过相应的符号显示您当前目录中 git 仓库的状态。
|
||||
The `git_status` module shows symbols representing the state of the repo in your current directory.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1186,7 +1189,7 @@ behind = "⇣${count}"
|
||||
|
||||
## Golang
|
||||
|
||||
`golang` 组件显示当前安装的 Golang 版本。 By default the module will be shown if any of the following conditions are met:
|
||||
The `golang` module shows the currently installed version of Golang. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- 当前目录包含 `go.mod` 文件
|
||||
- 当前目录包含 `go.sum` 文件
|
||||
@ -1268,7 +1271,7 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## Hostname
|
||||
|
||||
`hostname` 组件显示系统主机名。
|
||||
The `hostname` module shows the system hostname.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1303,7 +1306,7 @@ disabled = false
|
||||
|
||||
## Java
|
||||
|
||||
`java` 组件显示当前安装的 Java 版本。 By default the module will be shown if any of the following conditions are met:
|
||||
The `java` module shows the currently installed version of Java. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
|
||||
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
|
||||
@ -1341,7 +1344,13 @@ symbol = "🌟 "
|
||||
|
||||
## Jobs
|
||||
|
||||
`jobs` 组件显示当前正在运行的任务数量。 仅当有后台任务运行时,此组件才会显示。 如果有超过 1 个作业,模块将显示正在运行的作业数量,如果配置了 `threshold` 字段,则使用它作为显示作业数量的下限。
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. 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.
|
||||
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
:::
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1464,7 +1473,7 @@ Displays the current Kubernetes context name and, if set, the namespace from the
|
||||
|
||||
::: tip
|
||||
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1503,7 +1512,7 @@ disabled = false
|
||||
|
||||
## Line Break
|
||||
|
||||
`line_break` 组件将提示分隔为两行。
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1562,13 +1571,13 @@ format = "via [🌕 $version](bold blue) "
|
||||
|
||||
## Memory Usage
|
||||
|
||||
`memory_usage` 组件显示当前系统内存和交换区使用情况。
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
|
||||
默认情况下,如果系统交换区使用不为 0,则会显示交换区使用情况。
|
||||
By default the swap usage is displayed if the total system swap is non-zero.
|
||||
|
||||
::: tip
|
||||
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -1609,7 +1618,7 @@ style = "bold dimmed green"
|
||||
|
||||
## Mercurial Branch
|
||||
|
||||
`hg_branch` 组件显示当前目录的 hg 仓库的活动分支。
|
||||
The `hg_branch` module shows the active branch of the repo in your current directory.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1686,7 +1695,7 @@ symbol = "🎣 "
|
||||
|
||||
## Nix-shell
|
||||
|
||||
`nix_shell` 组件显示 nix-shell 环境。 当处于一个 nix-shell 环境中时,此组件会被显示。
|
||||
The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment.
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -1724,7 +1733,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
|
||||
|
||||
## NodeJS
|
||||
|
||||
`nodejs` 组件显示当前安装的 NodeJS 版本。 By default the module will be shown if any of the following conditions are met:
|
||||
The `nodejs` module shows the currently installed version of NodeJS. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- 当前目录包含 `package.json` 文件
|
||||
- The current directory contains a `.node-version` file
|
||||
@ -1737,7 +1746,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
|
||||
| Option | 默认值 | 描述 |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 |
|
||||
| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this moudle. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
@ -1843,7 +1852,7 @@ symbol = "☁️ "
|
||||
|
||||
## Package Version
|
||||
|
||||
当前目录是软件包的代码仓库时,将显示 `package` 组件,并显示软件包当前版本。 The module currently supports `npm`, `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`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
|
||||
|
||||
- **npm** —— `npm` 软件包版本从当前目录下的 `package.json` 中得到
|
||||
- **cargo** —— `cargo` 软件包的版本从当前目录下的 `Cargo.toml` 中得到
|
||||
@ -1928,7 +1937,7 @@ format = "via [🦪 $version]($style) "
|
||||
|
||||
## PHP
|
||||
|
||||
`php` 组件显示当前安装的 PHP 版本。 By default the module will be shown if any of the following conditions are met:
|
||||
The `php` module shows the currently installed version of PHP. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- 当前目录包含一个 `composer.json` 文件
|
||||
- The current directory contains a `.php-version` file
|
||||
@ -2005,9 +2014,9 @@ format = "via [$symbol$version](bold white)"
|
||||
|
||||
## Python
|
||||
|
||||
`python` 组件组件展示已经安装了的Python版本以及如果虚拟环境被激活则会显示当前Python虚拟环境
|
||||
The `python` module shows the currently installed version of Python and the current Python virtual environment if one is activated.
|
||||
|
||||
如果`pyenv_version_name`被设置为`true`, 本组件将会展示pyenv版本名。 否则则显示通过`python --version`获得的版本号
|
||||
If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`.
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
@ -2083,7 +2092,7 @@ detect_extensions = []
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of Ruby. 此组件将在符合以下任意条件之一时显示:
|
||||
By default the `ruby` module shows the currently installed version of Ruby. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- 当前目录包含 `Gemfile` 文件
|
||||
- The current directory contains a `.ruby-version` file
|
||||
@ -2122,7 +2131,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of Rust. 此组件将在符合以下任意条件之一时显示:
|
||||
By default the `rust` module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- 当前目录包含 `Cargo.toml` 文件
|
||||
- 当前目录包含一个使用 `.rs` 扩展名的文件
|
||||
@ -2158,13 +2167,55 @@ By default the `rust` module shows the currently installed version of Rust. 此
|
||||
format = "via [⚙️ $version](red bold)"
|
||||
```
|
||||
|
||||
|
||||
## Scala
|
||||
|
||||
The `scala` module shows the currently installed version of Scala. By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file
|
||||
- The current directory contains a file with the `.scala` or `.sbt` extension
|
||||
- The current directory contains a directory named `.metals`
|
||||
|
||||
### 配置项
|
||||
|
||||
|
||||
| Option | 默认值 | 描述 |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | 组件格式化模板。 |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. |
|
||||
| `style` | `"red dimmed"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| 字段 | 示例 | 描述 |
|
||||
| --------- | -------- | ---------------------- |
|
||||
| version | `2.13.5` | The version of `scala` |
|
||||
| symbol | | `symbol`对应值 |
|
||||
| style\* | | `style`对应值 |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### 示例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[scala]
|
||||
symbol = "🌟 "
|
||||
```
|
||||
|
||||
|
||||
## Shell
|
||||
|
||||
The `shell` module shows an indicator for currently used shell.
|
||||
|
||||
::: tip
|
||||
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2178,6 +2229,7 @@ The `shell` module shows an indicator for currently used shell.
|
||||
| `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. |
|
||||
| `format` | `$indicator` | 组件格式化模板。 |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
@ -2271,7 +2323,7 @@ The `status` module displays the exit code of the previous command. The module w
|
||||
|
||||
::: tip
|
||||
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2324,7 +2376,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of Swift. 此组件将在符合以下任意条件之一时显示:
|
||||
By default the `swift` module shows the currently installed version of Swift. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@ -2372,7 +2424,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:
|
||||
|
||||
- 当前目录包含 `.terraform` 目录
|
||||
- The current directory contains a `.terraform` folder
|
||||
- Current directory contains a file with the `.tf` or `.hcl` extensions
|
||||
|
||||
### 配置项
|
||||
@ -2424,7 +2476,7 @@ The `time` module shows the current **local** time. The `format` configuration v
|
||||
|
||||
::: tip
|
||||
|
||||
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
@ -2466,12 +2518,12 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## Username
|
||||
|
||||
The `username` module shows active user's username. 此组件将在符合以下任意条件之一时显示:
|
||||
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- 当前用户是 root
|
||||
- 当前用户与登录用户不相同
|
||||
- 用户正通过 SSH 会话连接访问
|
||||
- 字段 `show_always` 被设置为 true
|
||||
- The current user is root
|
||||
- The current user isn't the same as the one that is logged in
|
||||
- The user is currently connected as an SSH session
|
||||
- The variable `show_always` is set to true
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2548,7 +2600,7 @@ format = "via [⍱ $version](bold white) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of Zig. 此组件将在符合以下任意条件之一时显示:
|
||||
By default the the `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
|
@ -38,7 +38,7 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
内置于 Starship 的 [Bash 适配](https://github.com/starship/starship/blob/master/src/init/starship.bash) 稍微复杂一些,实现了像 [命令用时统计组件](https://starship.rs/config/#Command-Duration) 这样的功能,还确保 Starship 能与之前设置的 Bash 配置相兼容。
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
使用以下命令了解 `starship prompt` 所能接受的所有参数:
|
||||
|
||||
@ -56,6 +56,10 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship)
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
## 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:
|
||||
|
@ -2,18 +2,21 @@
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt" />
|
||||
alt="Starship – Cross-shell prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="GitHub Actions workflow status" /></a>
|
||||
alt="GitHub Actions workflow status"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io version" /></a>
|
||||
alt="Crates.io version"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
@ -22,11 +25,13 @@
|
||||
<a href="https://discord.gg/starship"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="加入 Discord" /></a>
|
||||
alt="加入 Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter" /></a>
|
||||
alt="Follow @StarshipPrompt on Twitter"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -42,63 +47,72 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English" /></a>
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語" /></a>
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文" /></a>
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский" /></a>
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch" /></a>
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文" /></a>
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español" /></a>
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français" /></a>
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt" /></a>
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
@ -107,7 +121,8 @@
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="使用 iTerm 和 Snazz 主题的 Starship"
|
||||
width="50%"
|
||||
align="right" />
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**轻量级、反应迅速,可定制的高颜值终端!**
|
||||
|
||||
@ -229,6 +244,17 @@
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝 贡献
|
||||
|
||||
我们一直在寻找贡献者!你都可以参与贡献 ** 不论你的技能如何 **。 如果您希望快速为项目作出贡献,请尝试解决 [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)。
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user