docs(i18n): New Crowdin updates (#2564)
* New translations README.md (French) * New translations README.md (Korean) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * 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 (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 (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (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 (French) * New translations README.md (Korean) * New translations README.md (French) * New translations README.md (Turkish) * New translations README.md (Turkish) * New translations README.md (Turkish) * New translations README.md (Turkish) * New translations README.md (Turkish) * New translations README.md (Turkish) * New translations README.md (Turkish) * New translations README.md (Turkish) * New translations README.md (Turkish) * New translations README.md (Turkish) * New translations README.md (Turkish) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (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 (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (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 (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 (Japanese) * New translations README.md (Spanish) * 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 (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 (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 (French) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (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 (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (German) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (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 (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 (French) * New translations README.md (Spanish) * New translations README.md (Arabic) * New translations README.md (Arabic) * New translations README.md (German) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Portuguese) * New translations README.md (Turkish) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Russian) * New translations README.md (Portuguese) * New translations README.md (Polish) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Dutch) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (French) * New translations README.md (Korean) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Simplified) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French)
This commit is contained in:
parent
0860baa8a0
commit
ffe1049c82
|
@ -28,6 +28,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. Install the **starship** binary:
|
||||
|
@ -38,7 +42,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
With Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -75,14 +75,15 @@ Style strings are a list of words, separated by whitespace. The words are not ca
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing , though this may change in the future. The order of words in the string does not matter.
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
|
|
|
@ -142,11 +142,12 @@ This is the list of prompt-wide configuration options.
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `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. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -190,6 +191,7 @@ $docker_context\
|
|||
$package\
|
||||
$cmake\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
$elixir\
|
||||
$elm\
|
||||
|
@ -206,6 +208,7 @@ $perl\
|
|||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
|
@ -241,6 +244,8 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
|||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
|
@ -333,7 +338,7 @@ discharging_symbol = "💀 "
|
|||
|
||||
### Battery 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. The default is as shown:
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
|
@ -341,25 +346,30 @@ threshold = 10
|
|||
style = "bold red"
|
||||
```
|
||||
|
||||
The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option.
|
||||
|
||||
#### Options
|
||||
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Option | Description |
|
||||
| ----------- | ----------------------------------------------- |
|
||||
| `threshold` | The upper bound for the display option. |
|
||||
| `style` | The style used if the display option is in use. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `threshold` | `10` | The upper bound for the display option. |
|
||||
| `style` | `bold red` | The style used if the display option is in use. |
|
||||
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
|
||||
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
|
||||
|
||||
#### Example
|
||||
|
||||
```toml
|
||||
[[battery.display]] # "bold red" style when capacity is between 0% and 10%
|
||||
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
|
||||
threshold = 10
|
||||
style = "bold red"
|
||||
|
||||
[[battery.display]] # "bold yellow" style when capacity is between 10% and 30%
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
|
@ -620,6 +630,40 @@ The `dart` module shows the currently installed version of Dart. By default the
|
|||
format = "via [🔰 $version](bold red) "
|
||||
```
|
||||
|
||||
## Deno
|
||||
|
||||
The `deno` module shows you your currently installed version of Deno. By default the module will be shown if any of the following conditions are met:
|
||||
- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦕 "` | A format string representing the symbol of Deno |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"green bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `deno` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v1.8.3` | The version of `deno` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[deno]
|
||||
format = "via [🦕 $version](green bold) "
|
||||
```
|
||||
|
||||
## Directory
|
||||
|
||||
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.
|
||||
|
@ -929,7 +973,7 @@ The `erlang` module shows the currently installed version of Erlang/OTP. By defa
|
|||
format = "via [e $version](bold red) "
|
||||
```
|
||||
|
||||
## Gcloud
|
||||
## Google Cloud (`gcloud`)
|
||||
|
||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||
|
||||
|
@ -1313,15 +1357,16 @@ The `java` module shows the currently installed version of Java. By default the
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1344,7 +1389,7 @@ symbol = "🌟 "
|
|||
|
||||
## Jobs
|
||||
|
||||
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.
|
||||
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. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: warning
|
||||
|
||||
|
@ -1583,13 +1628,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | --------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1737,22 +1782,24 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
|||
|
||||
- The current directory contains a `package.json` file
|
||||
- The current directory contains a `.node-version` file
|
||||
- The current directory contains a `.nvmrc` file
|
||||
- The current directory contains a `node_modules` directory
|
||||
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
|
||||
- The current directory contains a file with the `.ts` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in `package.json` does not match the NodeJS version. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the NodeJS version. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2039,6 +2086,7 @@ By default the module will be shown if any of the following conditions are met:
|
|||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
||||
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
|
@ -2093,6 +2141,44 @@ python_binary = "python3"
|
|||
detect_extensions = []
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of Red. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🔺 "` | A format string representing the symbol of Red. |
|
||||
| `detect_extensions` | `["red"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"red bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `red` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v2.5.1` | The version of `red` |
|
||||
| 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
|
||||
|
||||
[red]
|
||||
symbol = "🔴 "
|
||||
```
|
||||
|
||||
## 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:
|
||||
|
@ -2103,15 +2189,16 @@ By default the `ruby` module shows the currently installed version of Ruby. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2141,15 +2228,16 @@ By default the `rust` module shows the currently installed version of Rust. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ The prompt will use as much context as is provided, but no flags are "required".
|
|||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
@ -88,7 +88,7 @@ Starship is just as easy to uninstall as it is to install in the first place.
|
|||
|
||||
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:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### From prebuilt binary, with Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pkg install getconf
|
|||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
|
|
@ -28,6 +28,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. Install the **starship** binary:
|
||||
|
@ -38,7 +42,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
With Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -75,14 +75,15 @@ Style strings are a list of words, separated by whitespace. The words are not ca
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing , though this may change in the future. The order of words in the string does not matter.
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
|
|
|
@ -142,11 +142,12 @@ This is the list of prompt-wide configuration options.
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `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. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -190,6 +191,7 @@ $docker_context\
|
|||
$package\
|
||||
$cmake\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
$elixir\
|
||||
$elm\
|
||||
|
@ -206,6 +208,7 @@ $perl\
|
|||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
|
@ -241,6 +244,8 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
|||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
|
@ -333,7 +338,7 @@ discharging_symbol = "💀 "
|
|||
|
||||
### Battery 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. The default is as shown:
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
|
@ -341,25 +346,30 @@ threshold = 10
|
|||
style = "bold red"
|
||||
```
|
||||
|
||||
The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option.
|
||||
|
||||
#### Options
|
||||
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Option | Description |
|
||||
| ----------- | ----------------------------------------------- |
|
||||
| `threshold` | The upper bound for the display option. |
|
||||
| `style` | The style used if the display option is in use. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `threshold` | `10` | The upper bound for the display option. |
|
||||
| `style` | `bold red` | The style used if the display option is in use. |
|
||||
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
|
||||
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
|
||||
|
||||
#### Example
|
||||
|
||||
```toml
|
||||
[[battery.display]] # "bold red" style when capacity is between 0% and 10%
|
||||
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
|
||||
threshold = 10
|
||||
style = "bold red"
|
||||
|
||||
[[battery.display]] # "bold yellow" style when capacity is between 10% and 30%
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
|
@ -620,6 +630,40 @@ The `dart` module shows the currently installed version of Dart. By default the
|
|||
format = "via [🔰 $version](bold red) "
|
||||
```
|
||||
|
||||
## Deno
|
||||
|
||||
The `deno` module shows you your currently installed version of Deno. By default the module will be shown if any of the following conditions are met:
|
||||
- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦕 "` | A format string representing the symbol of Deno |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"green bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `deno` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v1.8.3` | The version of `deno` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[deno]
|
||||
format = "via [🦕 $version](green bold) "
|
||||
```
|
||||
|
||||
## Directory
|
||||
|
||||
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.
|
||||
|
@ -929,7 +973,7 @@ The `erlang` module shows the currently installed version of Erlang/OTP. By defa
|
|||
format = "via [e $version](bold red) "
|
||||
```
|
||||
|
||||
## Gcloud
|
||||
## Google Cloud (`gcloud`)
|
||||
|
||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||
|
||||
|
@ -1313,15 +1357,16 @@ The `java` module shows the currently installed version of Java. By default the
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1344,7 +1389,7 @@ symbol = "🌟 "
|
|||
|
||||
## Jobs
|
||||
|
||||
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.
|
||||
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. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: warning
|
||||
|
||||
|
@ -1583,13 +1628,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | --------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1737,22 +1782,24 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
|||
|
||||
- The current directory contains a `package.json` file
|
||||
- The current directory contains a `.node-version` file
|
||||
- The current directory contains a `.nvmrc` file
|
||||
- The current directory contains a `node_modules` directory
|
||||
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
|
||||
- The current directory contains a file with the `.ts` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in `package.json` does not match the NodeJS version. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the NodeJS version. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2039,6 +2086,7 @@ By default the module will be shown if any of the following conditions are met:
|
|||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
||||
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
|
@ -2093,6 +2141,44 @@ python_binary = "python3"
|
|||
detect_extensions = []
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of Red. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🔺 "` | A format string representing the symbol of Red. |
|
||||
| `detect_extensions` | `["red"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"red bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `red` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v2.5.1` | The version of `red` |
|
||||
| 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
|
||||
|
||||
[red]
|
||||
symbol = "🔴 "
|
||||
```
|
||||
|
||||
## 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:
|
||||
|
@ -2103,15 +2189,16 @@ By default the `ruby` module shows the currently installed version of Ruby. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2141,15 +2228,16 @@ By default the `rust` module shows the currently installed version of Rust. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ The prompt will use as much context as is provided, but no flags are "required".
|
|||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
@ -88,7 +88,7 @@ Starship is just as easy to uninstall as it is to install in the first place.
|
|||
|
||||
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:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### From prebuilt binary, with Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pkg install getconf
|
|||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
|
|
@ -28,6 +28,10 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### Voraussetzungen
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Schnellinstallation
|
||||
|
||||
1. Installiere die Binärversion von **starship**:
|
||||
|
@ -38,7 +42,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
|
|||
Mit Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ function blastoff(){
|
|||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- Um eine benutzerdefinierte Funktion direkt vor der Ausführung eines Befehls auszulösen, kann man den [`DEBUG` trap](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/) Mechanismus verwenden. Allerdings **muss** das DEBUG Signal *vor* der Initialisierung von Starship getrapped werden! Starship kann den Wert der DEBUG-trap speichern. Wenn der Wert der DEBUG-trap überschrieben wird nachdem Starship gestartet ist kann es zu Fehlern im Bezug auf die verwendete DEBUG-trap kommen.
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Allerdings **muss** das DEBUG Signal *vor* der Initialisierung von Starship getrapped werden! Starship kann den Wert der DEBUG-trap speichern. Wenn der Wert der DEBUG-trap überschrieben wird nachdem Starship gestartet ist kann es zu Fehlern im Bezug auf die verwendete DEBUG-trap kommen.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
|
@ -33,7 +33,7 @@ eval $(starship init bash)
|
|||
|
||||
## Fenstertitel anpassen
|
||||
|
||||
Manche shell prompts können den Fenstertitel ändern. Fish ist standardmäßig so konfiguriert. Starship ändert standardmäßig den Fenstertitel nicht, aber es ist sehr einfach die Funktion zu `bash` oder `zsh` hinzuzufügen.
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish ist standardmäßig so konfiguriert. Starship ändert standardmäßig den Fenstertitel nicht, aber es ist sehr einfach die Funktion zu `bash` oder `zsh` hinzuzufügen.
|
||||
|
||||
Zuerst wird eine Funktion definiert um den Fenstertitel zu ändern ( für bash und zsh ist die Funktion identisch):
|
||||
|
||||
|
@ -57,7 +57,7 @@ Füge dies in `Zsh` zum `precmd_functions`-Array hinzu:
|
|||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
Wenn Sie das Resultat für gut empfinden, fügen Sie diese Zeilen zu ihrer Shell Konfigurationsdatei hinzu (`~/.bashrc` oder `~/.zshrc`) um das Ergebnis permanent zu machen.
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
Zum Beispiel, wenn sie ihr aktuelles Verzeichnis als Terminal Title anzeigen wollen, fügen Sie folgenden Code-Schnipsel zu ihrer `~/.bashrc` oder `~/.zshrc` hinzu:
|
||||
|
||||
|
@ -75,14 +75,15 @@ Style-String sind Wortlisten, getrennt durch Leerzeichen. Die Wörter haben kein
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
wobei `<color>` eine Farbspezifikation ist (siehe unten). `fg:<color>` und `<color>` tun derzeit dasselbe , das kann sich in Zukunft aber ändern. Die Reihenfolge der Wörter in der Liste spielt keine Rolle.
|
||||
wobei `<color>` eine Farbspezifikation ist (siehe unten). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
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`. In der Zukunft könnte die Unterstützung von `none` in Verbindung mit anderen Tokens fallen gelassen werden.
|
||||
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`. In der Zukunft könnte die Unterstützung von `none` in Verbindung mit anderen Tokens fallen gelassen werden.
|
||||
|
||||
Eine Farbspezifikation kann wie folgt aussehen:
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -53,7 +53,7 @@ Die Eingabeaufforderung verwendet so viel Kontext wie möglich, aber keine Flagg
|
|||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
@ -88,7 +88,7 @@ Starship is just as easy to uninstall as it is to install in the first place.
|
|||
|
||||
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:
|
||||
Wenn Starship mittels Script installiert wurde, der folgende Befehl entfernt Starship:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### Neuster GitHub Release über die Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
@ -166,7 +166,7 @@
|
|||
#### Installation mithilfe eines Paket-Managers
|
||||
|
||||
|
||||
##### Example: [Homebrew](https://brew.sh/):
|
||||
##### Beispiel: [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
|
|
|
@ -32,7 +32,7 @@ pkg install getconf
|
|||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
|
|
@ -28,6 +28,10 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### Prerequisitos
|
||||
|
||||
- Una [Nerd Font](https://www.nerdfonts.com/) instalada y habilitada en tu terminal.
|
||||
|
||||
### Instalación rápida
|
||||
|
||||
1. Instalar el binario de **Starship**:
|
||||
|
@ -38,7 +42,7 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
|
|||
Con el intérprete de comandos:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
Para actualizar Starship, vuelve a ejecutar el guión anterior. Reemplazará la versión actual sin tocar la configuración de Starship.
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ function blastoff(){
|
|||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- Para ejecutar una función personalizada antes de que un comando sea ejecutado, es posible usar el [mecanismo de trampa `DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). No obstante, ¡**debes** atrapar la señal DEBUG *antes* de inicializar Starship! Starship puede preservar el valor de la trampa DEBUG, pero si la trampa es reemplazada después de que Starship inicie, alguna funcionalidad fallará.
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). No obstante, ¡**debes** atrapar la señal DEBUG *antes* de inicializar Starship! Starship puede preservar el valor de la trampa DEBUG, pero si la trampa es reemplazada después de que Starship inicie, alguna funcionalidad fallará.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
|
@ -33,7 +33,7 @@ eval $(starship init bash)
|
|||
|
||||
## Cambiar el Título de la Ventana
|
||||
|
||||
Algunos intérpretes de comandos van a cambiar automáticamente el título de la ventana por ti (p. ej., para mostrar tu directorio actual). Fish incluso lo hace por defecto. Starship no hace esto, pero es bastante sencillo añadir esta funcionalidad a `Bash` o `zsh`.
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish incluso lo hace por defecto. Starship no hace esto, pero es bastante sencillo añadir esta funcionalidad a `Bash` o `zsh`.
|
||||
|
||||
Primero, define una función para el cambio de título de la ventana (idéntico en Bash y zsh):
|
||||
|
||||
|
@ -57,7 +57,7 @@ En `zsh`, añade esto al array `precmd_functions`:
|
|||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
Si te gusta el resultado, añade estas líneas a tu archivo de configuración del intérprete de comandos (`~/.bashrc` o `~/.zsrhc`) para hacerlo permanente.
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
Por ejemplo, si quieres mostrar tu directorio actual en el título de la pestaña de la terminal, añade el siguiente fragmento a tu `~/.bashrc` o `~/.zshrc`:
|
||||
|
||||
|
@ -75,14 +75,15 @@ Las cadenas de estilo son una lista de palabras, separadas por espacios en blanc
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
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.
|
||||
donde `<color>` es un especificador de color (discutido a continuación). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
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.
|
||||
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` 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`. 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
|
@ -53,7 +53,7 @@ El símbolo de sistema usará tanto contexto como le proveas, pero no hay parám
|
|||
Si obtienes un error como "_version 'GLIBC_2.18' not found (required by starship)_" al usar el binario precompilado (por ejemplo, en CentOS 6 o 7), puedes usar el binario compilado con `musl` en vez de `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Veo símbolos que no entiendo ni espero, ¿qué significan?
|
||||
|
@ -88,7 +88,7 @@ Starship es tan fácil de desinstalar como de instalar en primer lugar.
|
|||
|
||||
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:
|
||||
Si Starship fue instalado usando el guión de instalación, el siguiente comando eliminará el binario:
|
||||
|
||||
```sh
|
||||
# Localiza y elimina el binario de starship
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### Desde un binario preconstruido, con el intérprete de comandos:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
Para actualizar Starship, vuelve a ejecutar el guión anterior. Reemplazará la versión actual sin tocar la configuración de Starship.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pkg install getconf
|
|||
### Instalación
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
|
|
@ -11,14 +11,14 @@ features:
|
|||
details: Fonctionne sur tous les principaux shells et système d'exploitation. Utilisez-le partout !
|
||||
-
|
||||
title: Propulsé par Rust
|
||||
details: Profiter de toute la rapidité et la sécurité de Rust pour rendre votre invite de commandes le plus rapide et fiable possible.
|
||||
details: Profitez de toute la rapidité et la sécurité de Rust pour rendre votre invite de commandes la plus rapide et fiable possible.
|
||||
-
|
||||
title: Personnalisable
|
||||
details: Tous les petits détails sont personnalisable à votre goût, pour rendre votre invite de commandes aussi léger ou complet que le vous souhaitez.
|
||||
details: Tous les petits détails sont personnalisable à votre goût, pour rendre votre invite de commandes aussi légère ou complète que le vous souhaitez.
|
||||
footer: Licence ISC | Copyright © 2019-présent Contributeurs Starship
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship : Invite Multi-Shell"
|
||||
description: Starship est un invite minimaliste, ultra-rapide et hautement personnalisable pour n'importe quel shell ! Montre les informations dont vous avez besoin tout en restant élégant et minimaliste. Installation rapide disponible pour Bash, Fish, ZSH, Ion et PowerShell.
|
||||
description: Starship est une invite minimaliste, ultra-rapide et hautement personnalisable pour n'importe quel shell ! Montre les informations dont vous avez besoin tout en restant élégante et minimaliste. Installation rapide disponible pour Bash, Fish, ZSH, Ion et PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
|
@ -28,7 +28,11 @@ description: Starship est un invite minimaliste, ultra-rapide et hautement perso
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### Installation
|
||||
### Pré-requis
|
||||
|
||||
- Une [Nerd Font](https://www.nerdfonts.com/) est installée et activée dans votre terminal.
|
||||
|
||||
### Installation rapide
|
||||
|
||||
1. Installer le binaire **starship** :
|
||||
|
||||
|
@ -38,9 +42,9 @@ description: Starship est un invite minimaliste, ultra-rapide et hautement perso
|
|||
Avec Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
Pour mettre à jour Starship, relancez le script ci-dessus. Cela remplacera la version actuelle sans toucher à la configuration de Starship.
|
||||
|
||||
|
||||
#### Installer via le gestionnaire de paquets
|
||||
|
@ -95,7 +99,7 @@ description: Starship est un invite minimaliste, ultra-rapide et hautement perso
|
|||
|
||||
#### Powershell
|
||||
|
||||
Ajoutez ce qui suit à la fin de `Microsoft.PowerShell_profile.ps1`. Vous pouvez vérifier l'emplacement de ce fichier en regardant la variable `$PROFILE` dans PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
Ajoutez ce qui suit à la fin de `Microsoft.PowerShell_profile.ps1`. Vous pouvez vérifier l'emplacement de ce fichier en regardant la variable `$PROFILE` dans PowerShell. Habituellement, son chemin est `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` ou `~/.config/powershell/Microsoft.PowerShell_profile.ps1` sur -Nix.
|
||||
|
||||
```sh
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
@ -114,9 +118,9 @@ description: Starship est un invite minimaliste, ultra-rapide et hautement perso
|
|||
|
||||
#### Elvish
|
||||
|
||||
::: warning Only elvish v0.15 or higher is supported. :::
|
||||
::: warning Seul elvish v0.15 ou supérieur est pris en charge. :::
|
||||
|
||||
Add the following to the end of `~/.elvish/rc.elv`:
|
||||
Ajoutez ce qui suit à la fin de `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
|
@ -127,7 +131,7 @@ description: Starship est un invite minimaliste, ultra-rapide et hautement perso
|
|||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
Ajoutez ce qui suit à la fin de `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
|
|
@ -8,11 +8,11 @@ Les configurations dans cette section sont sujettes à modification dans les fut
|
|||
|
||||
:::
|
||||
|
||||
## Personnalisation des commandes pré-commande et pré-exécution en Bash
|
||||
## Commandes pré-commande et pré-exécution personnalisées en Bash
|
||||
|
||||
Bash n'a pas de structure officielle préexec/précmd comme la plupart des autres shells. C'est pourquoi il est difficile de fournir des hooks entièrement personnalisables dans `bash`. Cependant, Starship vous donne une capacité limitée à insérer vos propres fonctions dans la procédure de rendu commande :
|
||||
Bash n'a pas de structure officielle préexec/précmd comme la plupart des autres shells. C'est pourquoi il est difficile de fournir des hooks entièrement personnalisables dans `bash`. Cependant, Starship vous permet dans une certaine mesure d'insérer vos propres fonctions dans la procédure de rendu du prompt :
|
||||
|
||||
- Pour exécuter une fonction personnalisée juste avant que commande soit dessinée, définissez une nouvelle fonction et assignez son nom à `starship_precmd_user_func`. Par exemple, pour dessiner une fusée avant la commande, vous feriez
|
||||
- Pour exécuter une fonction personnalisée juste avant que le prompt ne soit dessiné, définissez une nouvelle fonction et assignez son nom à `starship_precmd_user_func`. Par exemple, pour dessiner une fusée avant la commande, vous feriez
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
|
@ -21,45 +21,45 @@ function blastoff(){
|
|||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- Pour exécuter une fonction personnalisée juste avant l'exécution d'une commande, vous pouvez utiliser le [` DEBUG` mécanisme d'interruption ](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Cependant, vous **devez** piéger le signal DEBUG *avant* initialisation du Starship ! Starship peut préserver la valeur du piège DEBUG, mais si le piège est écrasé après le démarrage de Starship, certaines fonctionnalités vont casser.
|
||||
- Pour exécuter une fonction personnalisée juste avant l'exécution d'une commande, vous pouvez utiliser le [ mécanisme d'interruption du signal ` DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Cependant, vous **devez** piéger le signal DEBUG *avant* l'initialisation de Starship ! Starship peut préserver la valeur du piège DEBUG, mais si le piège est écrasé après le démarrage de Starship, certaines fonctionnalités vont casser.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
trap blastoff DEBUG # Pièger DEBUG *avant* l'initiation de starship
|
||||
trap blastoff DEBUG # Pièger DEBUG *avant* l'initialisation de starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
## Modifier le style des fenêtres commande
|
||||
## Modifier le titre des fenêtres
|
||||
|
||||
Certaines commandes du shell changeront automatiquement le titre de la fenêtre (par exemple, refléter votre répertoire de travail). Fish le fait par défaut. Starship ne le fait pas, mais il est assez simple d'ajouter cette fonctionnalité à `bash` ou `zsh`.
|
||||
Certaines commandes du shell changeront automatiquement le titre de la fenêtre (par exemple, pour refléter votre répertoire de travail). Fish le fait même par défaut. Starship ne le fait pas, mais il est assez simple d'ajouter cette fonctionnalité à `bash` ou `zsh`.
|
||||
|
||||
Tout d'abord, définir une fonction de changement de titre de fenêtre (identique en bash et zsh) :
|
||||
Tout d'abord, définissez une fonction de changement de titre de fenêtre (identique en bash et zsh) :
|
||||
|
||||
```bash
|
||||
function set_titre_fenetre(){
|
||||
echo -ne "\033]0; TON_TITRE_FENETRE_ICI \007"
|
||||
echo -ne "\033]0; VOTRE_TITRE_ICI\007"
|
||||
}
|
||||
```
|
||||
|
||||
Vous pouvez utiliser des variables pour personnaliser ce titre (`$USER`, `$HOSTNAME`, et `$PWD` sont des choix populaires).
|
||||
|
||||
Dans `bash`, définissez cette fonction comme la fonction precmd Starship :
|
||||
Dans `bash`, définissez cette fonction comme la fonction précommande Starship :
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_titre_gagnante"
|
||||
starship_precmd_user_func="set_titre_fenetre"
|
||||
```
|
||||
|
||||
Dans `zsh`, ajoutez ceci au tableau `precmd_functions` :
|
||||
|
||||
```bash
|
||||
précmd_functions+=(set_titre_gagnant)
|
||||
precmd_functions+=(set_titre_fenetre)
|
||||
```
|
||||
|
||||
Si vous aimez le résultat, ajoutez ces lignes à votre fichier de configuration shell (`~/.bashrc` ou `~/.zshrc`) pour le rendre permanent.
|
||||
|
||||
Par exemple, si vous voulez afficher votre répertoire actuel dans votre titre d'onglets de terminal, ajoutez le snippet suivant à votre `~/.bashrc` ou `~/.zshrc`:
|
||||
Par exemple, si vous voulez afficher votre répertoire actuel dans le titre de l'onglet de votre terminal, ajoutez le code suivant à votre `~/.bashrc` ou `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
|
@ -75,19 +75,20 @@ Les chaînes de style sont une liste de mots, séparés par des espaces. Les mot
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
où `<color>` est un spécificateur de couleur (discuté ci-dessous). `fg:<color>` et `<color>` font actuellement la même chose, même si cela peut changer plus tard. L'ordre des mots dans le string n'a pas d'importance.
|
||||
où `<couleur>` est un spécificateur de couleur (discuté ci-dessous). `fg:<color>` et `<color>` font actuellement la même chose, bien que cela puisse changer dans le futur. `inverted` permute les couleurs de fond et de premier plan. L'ordre des mots dans la chaîne n'a pas d'importance.
|
||||
|
||||
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`. Il peut devenir une erreur d'utiliser `none` en conjonction avec d'autres jetons dans le futur.
|
||||
La valeur `none` remplace toutes les autres valeurs si elle n'est pas incluse dans un spécificateur `bg:`, de sorte que par exemple `fg: red none fg:blue` créera une chaîne sans style. `bg:none` définit l'arrière plan sur la couleur par défaut, donc `fg:red bg:none` est équivalent à `red` ou `fg:red` et `bg:green fg:red bg:none` est aussi équivalent à `fg:red` ou `red`. Utiliser `none` avec d'autres valeurs peut éventuellement devenir une erreur dans le futur.
|
||||
|
||||
Un spécificateur de couleur peut être l'un des éléments suivants :
|
||||
|
||||
- Une des couleurs standard du terminal : `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Vous pouvez éventuellement les préfixer avec `bright-` pour obtenir la version lumineuse (par exemple `bright-white`).
|
||||
- Un `#` suivi d'un nombre hexadécimal de six chiffres. Ceci spécifie un [ Code hexadécimal de couleur RVB ](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- Un nombre entre 0-255. Ceci spécifie un [code de couleur ANSI 8 bits](https://i.stack.imgur.com/KTSQa.png).
|
||||
- Un nombre entre 0 et 255. Ceci spécifie un [code de couleur ANSI 8 bits](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
Si plusieurs couleurs sont spécifiées pour le premier plan/arrière-plan, la dernière dans le string prendra la priorité.
|
||||
Si plusieurs couleurs sont spécifiées pour le premier plan ou l'arrière-plan, celle spécifiée en dernier sera prioritaire.
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -21,9 +21,9 @@ Oui, ils peuvent tous deux être utilisés pour désactiver les modules dans l'i
|
|||
- Désactiver les modules est plus explicite que de les omettre du `format global`
|
||||
- Les modules nouvellement créés seront ajoutés à l'invite de commande au fur et à mesure que Starship sera mis à jour
|
||||
|
||||
## The docs say Starship is cross-shell. Why isn't my preferred shell supported?
|
||||
## La documentation dit que Starship est shell-agnostique. Pourquoi mon shell préféré n'est-il pas pris en charge ?
|
||||
|
||||
Étant donné la façon dont Starship est construit, il devrait être possible d'ajouter le support pour pratiquement n'importe quel shell. Starship est sans état et agnostique, donc tant que votre shell supporte la personnalisation rapide et l'expansion, Starship peut être utilisé.
|
||||
Étant donné la façon dont Starship est construit, il devrait être possible d'ajouter le support pour pratiquement n'importe quel shell. Starship est sans état et agnostique, donc tant que votre shell supporte la personnalisation de l'invite de commande et l'expansion, Starship peut être utilisé.
|
||||
|
||||
Voici un petit exemple pour que Starship fonctionne avec bash :
|
||||
|
||||
|
@ -53,12 +53,12 @@ L'invite utilisera autant de contexte que possible, mais aucun paramètre n'est
|
|||
Si vous obtenez une erreur du type "_version 'GLIBC_2.18' not found (required by starship)_" lors de l'utilisation de l'exécutable précompilé (par exemple sur CentOS 6 ou 7), vous pouvez utiliser un exécutable compilé avec `musl` au lieu de `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
## Je vois des symboles que je ne comprends pas et auxquels je ne m'attendais pas, que signifient-t-ils ?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
Si vous voyez des symboles que vous ne reconnaissez pas, vous pouvez utiliser `starship explain` pour obtenir des explications concernant les modules actuellement affichés.
|
||||
|
||||
## Pourquoi ne vois-je pas de glyphe dans mon invite?
|
||||
|
||||
|
@ -81,16 +81,16 @@ Si l'un ou l'autre des symboles ne parvient pas à s'afficher correctement, votr
|
|||
|
||||
## Comment désinstaller Starship ?
|
||||
|
||||
Starship est tout aussi facile à désinstaller que d'installer.
|
||||
Starship est tout aussi facile à désinstaller qu'à installer.
|
||||
|
||||
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.
|
||||
1. Supprimez l'exécutable de Starship.
|
||||
|
||||
Si Starship a été installé à l'aide d'un gestionnaire de paquets, veuillez vous référer à leur documentation pour les instructions de désinstallation.
|
||||
|
||||
Si Starship a été installé en utilisant le script `curl | bash` , la commande suivante supprimera l'exécutable :
|
||||
Si Starship a été installé en utilisant le script d'installation, la commande suivante supprimera l'exécutable :
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
# Trouver et supprimer l'exécutable starship
|
||||
sh -c 'rm "$(which starship)"'
|
||||
```
|
||||
|
|
|
@ -127,14 +127,14 @@
|
|||
**L'invite minimaliste, ultra-rapide et personnalisable à l'infini pour n'importe quel shell !**
|
||||
|
||||
- **Rapide** : il est rapide - _vraiment vraiment_ rapide ! 🚀
|
||||
- **Personnalisable:** configurer chaque élément de votre invite.
|
||||
- **Personnalisable:** configurez chaque élément de votre invite.
|
||||
- **Universel:** fonctionne avec n'importe quel shell, sur n'importe quel système d'exploitation.
|
||||
- **Intelligent:** affiche les informations utiles en un coup d'œil.
|
||||
- **Riche en fonctionnalités:** supporte tous vos outils favoris.
|
||||
- **Facile:** rapide à installer - commencer à l'utiliser en quelques minutes.
|
||||
- **Facile:** rapide à installer - commencez à l'utiliser en quelques minutes.
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/config/"><strong>Consulter la documentation de Starship ▶</strong></a>
|
||||
<a href="https://starship.rs/config/"><strong>Consultez la documentation de Starship ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
@ -147,7 +147,7 @@
|
|||
|
||||
### Démarrage rapide
|
||||
|
||||
**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/).
|
||||
**Remarque**: en raison de la prolifération des plates-formes, seul un sous ensemble des plates-formes prises en charge sont montrées ci-dessous. Vous ne trouvez pas la vôtre? Jetez un œil aux [instructions pour les autres plates-formes](https://starship.rs/installing/).
|
||||
|
||||
1. Installer l'exécutable **starship** :
|
||||
|
||||
|
@ -158,15 +158,15 @@
|
|||
##### Depuis une version pré-compilée, depuis le shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
Pour mettre à jour Starship, relancez le script ci-dessus. Cela remplacera la version actuelle sans toucher à la configuration de Starship.
|
||||
|
||||
|
||||
#### Installer via le gestionnaire de paquets
|
||||
|
||||
|
||||
##### Example: [Homebrew](https://brew.sh/):
|
||||
##### Exemple: [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
|
@ -179,12 +179,12 @@
|
|||
scoop install starship
|
||||
```
|
||||
|
||||
2. Ajouter le script d’initialisation au fichier de configuration de votre shell:
|
||||
2. Ajoutez le script d’initialisation au fichier de configuration de votre shell:
|
||||
|
||||
|
||||
#### Bash
|
||||
|
||||
Ajouter ce qui suit à la fin de `~/.bashrc`:
|
||||
Ajoutez ce qui suit à la fin de `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
|
@ -195,7 +195,7 @@
|
|||
|
||||
#### Fish
|
||||
|
||||
Ajoute ce qui suit à la fin de `~/.config/fish/config.fish`:
|
||||
Ajoutez ce qui suit à la fin de `~/.config/fish/config.fish`:
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
|
@ -206,7 +206,7 @@
|
|||
|
||||
#### Zsh
|
||||
|
||||
Ajouter ce qui suit à la fin de `~/.zshrc`:
|
||||
Ajoutez ce qui suit à la fin de `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
|
@ -217,7 +217,7 @@
|
|||
|
||||
#### PowerShell
|
||||
|
||||
Ajouter ce qui suit à la fin de `Microsoft.PowerShell_profile.ps1`. Vous pouvez vérifier l'emplacement de ce fichier en regardant la variable `$PROFILE` dans PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
Ajoutez ce qui suit à la fin de `Microsoft.PowerShell_profile.ps1`. Vous pouvez vérifier l'emplacement de ce fichier en regardant la variable `$PROFILE` dans PowerShell. Habituellement, son chemin est `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` ou `~/.config/powershell/Microsoft.PowerShell_profile.ps1` sur -Nix.
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
@ -226,7 +226,7 @@
|
|||
|
||||
#### Ion
|
||||
|
||||
Ajouter ce qui suit à la fin de `~/.config/ion/initrc`:
|
||||
Ajoutez ce qui suit à la fin de `~/.config/ion/initrc`:
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
|
@ -237,7 +237,7 @@
|
|||
|
||||
#### Elvish
|
||||
|
||||
**Warning** Only elvish v0.15 or higher is supported. Add the following to the end of `~/.elvish/rc.elv`:
|
||||
**Avertissement** Seul elvish v0.15 ou supérieur est pris en charge. Ajoutez ce qui suit à la fin de `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
|
@ -248,7 +248,7 @@
|
|||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
Ajoutez ce qui suit à la fin de `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
@ -256,11 +256,11 @@
|
|||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
## 🤝Contribution
|
||||
## 🤝 Contribuer
|
||||
|
||||
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).
|
||||
|
||||
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/).
|
||||
Si vous parlez couramment une langue autre que l'anglais, nous apprécions grandement toute aide pour que nos documents soient traduits et mis à jour dans d'autres langues. Si vous souhaitez nous aider, les traductions peuvent êtres suggérées sur le [Crowdin de Starship](https://translate.starship.rs/).
|
||||
|
||||
Si vous êtes intéressé pour aider et contribuer à Starship, veuillez jeter un coup d'œil à notre [Guide de contribution](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Aussi, n'hésitez pas à vous rendre sur notre [serveur Discord](https://discord.gg/8Jzqu3T) pour dire bonjour. 👋
|
||||
|
||||
|
@ -294,13 +294,13 @@ Soutenez ce projet avec votre organisation. Votre logo apparaîtra ici avec un l
|
|||
|
||||
## 💭Inspiré par
|
||||
|
||||
Voyez ces travaux précédents qui ont contribué à inspirer la création de vaisseau. 🙏
|
||||
Voyez ces travaux précédents qui ont contribué à inspirer la création de Starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un invite de commandes ZSH pour les astronautes.
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Une invite de commande ZSH pour les astronautes.
|
||||
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Thème multi-shell robbyrussell écrit en JavaScript.
|
||||
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** - Un shell multi-platformes de type powerline personnalisable avec des icônes.
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** - Un shell multi-plateformes de type powerline personnalisable avec des icônes.
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
|
|
|
@ -3,17 +3,17 @@
|
|||
Pour installer starship, vous devez faire deux choses:
|
||||
|
||||
1. Installez le binaire **starship** sur votre ordinateur
|
||||
1. Dites à votre shell d'utiliser le binaire de starship comme invite en modifiant ses scripts d'initialisation
|
||||
1. Dire à votre shell d'utiliser le binaire de starship comme invite en modifiant ses scripts d'initialisation
|
||||
|
||||
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 !
|
||||
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, écrites par la communauté. La vôtre n'est pas là ? S'il vous plaît, ajoutez-la ici pour les suivants !
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Pré-requis
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
Rendez-vous sur la [page d'installation de Chocolatey](https://chocolatey.org/install) et suivez leurs instructions pour installer Chocolatey.
|
||||
|
||||
### Installation
|
||||
|
||||
|
@ -32,7 +32,7 @@ pkg install getconf
|
|||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
@ -47,14 +47,14 @@ nix-env -iA nixos.starship
|
|||
|
||||
#### Déclaration, utilisateur unique, via [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
Activez le module `programs.starship` dans votre fichier `home.nix`, et ajoutez vos paramètres
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
# Configuration écrite dans ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
|
@ -69,7 +69,7 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett
|
|||
}
|
||||
```
|
||||
|
||||
then run
|
||||
puis lancez
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
# Migrating to v0.45.0
|
||||
# Migrer vers la 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.
|
||||
La version 0.45.0 de Starship contient des changements non rétro-compatibles, en préparation de la v1.0.0. Nous avons apporté des changements majeurs à la manière de configurer l'invite, afin de permettre une personnalisation bien plus poussée.
|
||||
|
||||
This guide is intended to walk you through the breaking changes.
|
||||
Ce guide a pour but de vous guider à travers les changements majeurs qui ont eu lieu.
|
||||
|
||||
## `prompt_order` has been replaced by a root-level `format`
|
||||
## `prompt_order` a été remplacé par `format`, situé à la racine
|
||||
|
||||
Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship.
|
||||
Avant la v0.45.0, `prompt_order` acceptait un tableau de noms de modules dans l'ordre dans lequel ils devaient être affichés par 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 accepte à la place une valeur de `format` permettant la personnalisation de l'invite en dehors des modules eux-mêmes.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
**Exemple de configuration pré-v0.45.0**
|
||||
|
||||
```toml
|
||||
prompt_order = [
|
||||
|
@ -31,7 +31,7 @@ prompt_order = [
|
|||
]
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
**Exemple de configuration post-v0.45.0**
|
||||
|
||||
```toml
|
||||
format = """\
|
||||
|
@ -52,40 +52,40 @@ format = """\
|
|||
"""
|
||||
```
|
||||
|
||||
## Module `prefix` and `suffix` have been replaced by `format`
|
||||
## Les modules `prefix` et `suffix` ont été remplacés par `format`
|
||||
|
||||
Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered.
|
||||
Antérieurement à la v0.45.0, certains modules acceptaient un `prefix` et/ou un `suffix` afin de personnaliser la façon dont les modules sont affichés.
|
||||
|
||||
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 accepte à la place une valeur de `format` permettant une personnalisation supplémentaire de la façon dont les modules sont rendus. Au lieu de définir un préfixe et un suffixe pour les variables contextuelles, les variables peuvent maintenant être remplacées dans une chaîne de format, qui représente la sortie du module.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
**Exemple de configuration pré-v0.45.0**
|
||||
|
||||
```toml
|
||||
[cmd_duration]
|
||||
prefix = "took "
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
**Exemple de configuration post-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 – La durée de la commande (p. ex. "15s")
|
||||
# $style – Le style par défaut du module (p. ex. "bold yellow")
|
||||
format = "took [$duration]($style) "
|
||||
```
|
||||
|
||||
### Affected Modules
|
||||
### Modules affectés
|
||||
|
||||
#### Caractères
|
||||
#### Character
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| Propriété supprimée | Remplacement |
|
||||
| ----------------------- | ---------------- |
|
||||
| `symbol` | `success_symbol` |
|
||||
| `use_symbol_for_status` | `error_symbol` |
|
||||
| `style_success` | `success_symbol` |
|
||||
| `style_failure` | `error_symbol` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Modifications de la configuration par défaut**
|
||||
|
||||
```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.
|
||||
Précédemment, la propriété `use_symbol_for_status` était utilisée pour configurer l'invite afin d'afficher le `error_symbol` lorsque la dernière commande aboutissait à un résultat non-nul.
|
||||
|
||||
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.
|
||||
Depuis la version v0.45.0, nous utilisons désormais systématiquement `error_symbol` après une commande dont le résultat est non-nul, fusionnant ainsi les propriétés `use_symbol_for_status` et `error_symbol`.
|
||||
|
||||
To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file:
|
||||
Pour que l'invite utilise l'ancienne configuration `use_symbol_for_status = true`, ajoutez la ligne suivante à votre configuration:
|
||||
|
||||
```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.
|
||||
*Note:* L'élément `character` est automatiquement suivi d'un espace, donc à la différence des autres valeurs `format`, nous n'en ajoutons pas dans les exemples précédents.
|
||||
|
||||
#### Temps d'exécution
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| Propriété supprimée | Remplacement |
|
||||
| ------------------- | ------------ |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Modifications de la configuration par défaut**
|
||||
|
||||
```diff
|
||||
[cmd_duration]
|
||||
|
@ -127,11 +127,11 @@ error_symbol = "[✖](bold red)"
|
|||
|
||||
#### Dossier
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| Propriété supprimée | Remplacement |
|
||||
| ------------------- | ------------ |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Modifications de la configuration par défaut**
|
||||
|
||||
```diff
|
||||
[directory]
|
||||
|
@ -139,14 +139,14 @@ error_symbol = "[✖](bold red)"
|
|||
++ format = "[$path]($style)[$read_only]($read_only_style) "
|
||||
```
|
||||
|
||||
#### Environment Variable
|
||||
#### Variable d'environnement
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Propriété supprimée | Remplacement |
|
||||
| ------------------- | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Modifications de la configuration par défaut**
|
||||
|
||||
```diff
|
||||
[env_var]
|
||||
|
@ -155,14 +155,14 @@ error_symbol = "[✖](bold red)"
|
|||
++ format = "with [$env_value]($style) "
|
||||
```
|
||||
|
||||
#### Git Commit
|
||||
#### Commit Git
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Propriété supprimée | Remplacement |
|
||||
| ------------------- | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Modifications de la configuration par défaut**
|
||||
|
||||
```diff
|
||||
[git_commit]
|
||||
|
@ -171,15 +171,15 @@ error_symbol = "[✖](bold red)"
|
|||
++ format = '[\($hash\)]($style) '
|
||||
```
|
||||
|
||||
#### Git Status
|
||||
#### Statut Git
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ----------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| `show_sync_count` | `format` |
|
||||
| Propriété supprimée | Remplacement |
|
||||
| ------------------- | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| `show_sync_count` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Modifications de la configuration par défaut**
|
||||
|
||||
```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.
|
||||
Précédemment, la propriété `show_sync_count` était utilisée pour configurer l'invite de manière à afficher le nombre de commits en avance ou en retard de la branche locale par rapport à la branche distante.
|
||||
|
||||
With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`.
|
||||
Avec l'arrivée de la v0.45.0, cela a été séparé en trois propriétés distinctes, `ahead`, `behind`, et `diverged`.
|
||||
|
||||
To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file:
|
||||
Pour que l'invite utilise l'ancienne configuration `show_sync_count = true`, ajoutez la ligne suivante à votre configuration:
|
||||
|
||||
```toml
|
||||
[git_status]
|
||||
|
@ -202,14 +202,14 @@ diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
|||
behind = "⇣${count}"
|
||||
```
|
||||
|
||||
#### Hostname
|
||||
#### Nom d'hôte
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Propriété supprimée | Remplacement |
|
||||
| ------------------- | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Modifications de la configuration par défaut**
|
||||
|
||||
```diff
|
||||
[hostname]
|
||||
|
@ -220,13 +220,13 @@ behind = "⇣${count}"
|
|||
|
||||
#### Singularity
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `label` | `format` |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Propriété supprimée | Remplacement |
|
||||
| ------------------- | ------------ |
|
||||
| `label` | `format` |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Modifications de la configuration par défaut**
|
||||
|
||||
```diff
|
||||
[singularity]
|
||||
|
@ -235,13 +235,13 @@ behind = "⇣${count}"
|
|||
++ format = '[$symbol\[$env\]]($style) '
|
||||
```
|
||||
|
||||
#### Temps
|
||||
#### Date et Heure
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ------------- |
|
||||
| `format` | `time_format` |
|
||||
| Propriété supprimée | Remplacement |
|
||||
| ------------------- | ------------- |
|
||||
| `format` | `time_format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Modifications de la configuration par défaut**
|
||||
|
||||
```diff
|
||||
[time]
|
||||
|
@ -250,14 +250,14 @@ behind = "⇣${count}"
|
|||
++ format = "at 🕙[$time]($style) "
|
||||
```
|
||||
|
||||
#### Custom Commands
|
||||
#### Commandes personnalisées
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Propriété supprimée | Remplacement |
|
||||
| ------------------- | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Modifications de la configuration par défaut**
|
||||
|
||||
```diff
|
||||
[custom.example]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Paramètres par défaut
|
||||
|
||||
Voici un ensemble de configuration par défaut soumis par la communauté pour Starship. Si vous avez une configuration à partager, veuillez [proposer une PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) pour mettre à jour ce fichier! 😊
|
||||
Voici un ensemble de configurations soumises par la communauté pour Starship. Si vous avez une configuration à partager, veuillez [proposer une PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) pour mettre à jour ce fichier! 😊
|
||||
|
||||
## Nerd Font Symbols
|
||||
## Symboles Nerd Font
|
||||
|
||||
Cette configuration ne modifie rien sauf les symboles utilisés pour chaque module. Si les émoticônes ne sont pas votre tasse de thé, elle pourrait retenir votre attention!
|
||||
|
||||
|
|
|
@ -28,7 +28,11 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### Installazione Veloce
|
||||
### Prerequisiti
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. Installa il binario **starship**:
|
||||
|
||||
|
@ -38,7 +42,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
|
|||
Con Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh <unk> bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ function blastoff(){
|
|||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- Per eseguire una funzione personalizzata prima dell'esecuzione di un comando, è possibile utilizzare il meccanismo trappola [`DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Tuttavia, **devi** intrappolare il segnale DEBUG *prima di* inizializzare Starship! Starship può preservare il valore trappola di DEBUG, ma se la trappola viene sovrascritta dopo l'avvio di Starship, alcune funzionalità non funzioneranno.
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Tuttavia, **devi** intrappolare il segnale DEBUG *prima di* inizializzare Starship! Starship può preservare il valore trappola di DEBUG, ma se la trappola viene sovrascritta dopo l'avvio di Starship, alcune funzionalità non funzioneranno.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
|
@ -33,7 +33,7 @@ eval $(starship bash)
|
|||
|
||||
## 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`.
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish lo fa per impostazione predefinita. Starship non lo fa, ma è abbastanza semplice aggiungere questa funzionalità a `bash` o `zsh`.
|
||||
|
||||
Innanzitutto, bisogna definire una funzione per il cambio del titolo della finestra (identica sia per bash che zsh):
|
||||
|
||||
|
@ -57,7 +57,7 @@ In `zsh`, aggiungi questo `precmd_functions` all'array:
|
|||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
Se ti piace il risultato, aggiungi queste righe al tuo file shell di configurazione (`~/. ashrc` o `~/.zshrc`) per renderlo permanente.
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
Ad esempio, se desideri visualizzare la directory corrente nel titolo della scheda del terminale, aggiungi la seguente snippet al tuo `~/. ashrc` or `~/.zshrc`:
|
||||
|
||||
|
@ -75,14 +75,15 @@ Le stringhe di stile sono un elenco di parole, separate da spazi bianchi. Le par
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
dove `<color>` è un colore specifico (discusso in seguito). `fg:<color>` e `<color>` attualmente fanno la stessa cosa , anche se questo potrebbe cambiare in futuro. L'ordine delle parole nella stringa non conta.
|
||||
dove `<color>` è un colore specifico (discusso in seguito). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
Il token `none` sovrascrive tutti gli altri token in una stringa se non fa parte di uno specificatore `bg:`, così ad esempio `fg:red none fg:blue` creerà una stringa senza stile. `bg:none` imposta come colore di sfondo quello predefinito così `fg:red bg:none` è equivalente a `red` o `fg:red` e `bg:green fg:red bg:none` è equivalente a `fg:red` o `rosso`. Potrà diventare un errore usare `nessuno` in combinazione con altri token in futuro.
|
||||
Il token `none` sovrascrive tutti gli altri token in una stringa se non fa parte di uno specificatore `bg:`, così ad esempio `fg:red none fg:blue` creerà una stringa senza stile. `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`. Potrà diventare un errore usare `nessuno` in combinazione con altri token in futuro.
|
||||
|
||||
Uno colore specifico può essere uno di questi:
|
||||
|
||||
|
|
|
@ -142,11 +142,12 @@ This is the list of prompt-wide configuration options.
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `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. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -190,6 +191,7 @@ $docker_context\
|
|||
$package\
|
||||
$cmake\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
$elixir\
|
||||
$elm\
|
||||
|
@ -206,6 +208,7 @@ $perl\
|
|||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
|
@ -241,6 +244,8 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
|||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
|
@ -333,7 +338,7 @@ discharging_symbol = "💀 "
|
|||
|
||||
### Battery 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. The default is as shown:
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
|
@ -341,25 +346,30 @@ threshold = 10
|
|||
style = "bold red"
|
||||
```
|
||||
|
||||
The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option.
|
||||
|
||||
#### Options
|
||||
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Option | Description |
|
||||
| ----------- | ----------------------------------------------- |
|
||||
| `threshold` | The upper bound for the display option. |
|
||||
| `style` | The style used if the display option is in use. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `threshold` | `10` | The upper bound for the display option. |
|
||||
| `style` | `bold red` | The style used if the display option is in use. |
|
||||
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
|
||||
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
|
||||
|
||||
#### Example
|
||||
|
||||
```toml
|
||||
[[battery.display]] # "bold red" style when capacity is between 0% and 10%
|
||||
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
|
||||
threshold = 10
|
||||
style = "bold red"
|
||||
|
||||
[[battery.display]] # "bold yellow" style when capacity is between 10% and 30%
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
|
@ -620,6 +630,40 @@ The `dart` module shows the currently installed version of Dart. By default the
|
|||
format = "via [🔰 $version](bold red) "
|
||||
```
|
||||
|
||||
## Deno
|
||||
|
||||
The `deno` module shows you your currently installed version of Deno. By default the module will be shown if any of the following conditions are met:
|
||||
- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦕 "` | A format string representing the symbol of Deno |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"green bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `deno` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v1.8.3` | The version of `deno` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[deno]
|
||||
format = "via [🦕 $version](green bold) "
|
||||
```
|
||||
|
||||
## Directory
|
||||
|
||||
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.
|
||||
|
@ -929,7 +973,7 @@ The `erlang` module shows the currently installed version of Erlang/OTP. By defa
|
|||
format = "via [e $version](bold red) "
|
||||
```
|
||||
|
||||
## Gcloud
|
||||
## Google Cloud (`gcloud`)
|
||||
|
||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||
|
||||
|
@ -1313,15 +1357,16 @@ The `java` module shows the currently installed version of Java. By default the
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1344,7 +1389,7 @@ symbol = "🌟 "
|
|||
|
||||
## Jobs
|
||||
|
||||
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.
|
||||
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. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: Attenzione
|
||||
|
||||
|
@ -1583,13 +1628,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | --------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1737,22 +1782,24 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
|||
|
||||
- The current directory contains a `package.json` file
|
||||
- The current directory contains a `.node-version` file
|
||||
- The current directory contains a `.nvmrc` file
|
||||
- The current directory contains a `node_modules` directory
|
||||
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
|
||||
- The current directory contains a file with the `.ts` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in `package.json` does not match the NodeJS version. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the NodeJS version. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1867,7 +1914,7 @@ The `package` module is shown when the current directory is the repository for a
|
|||
- **mix** - The `mix` package version is extracted from the `mix.exs` present
|
||||
- **helm** - The `helm` chart version is extracted from the `Chart.yaml` present
|
||||
- **maven** - The `maven` package version is extracted from the `pom.xml` present
|
||||
- **meson** - La versione del pacchetto `meson` è estratta dal `meson.build` presente
|
||||
- **meson** - The `meson` package version is extracted from the `meson.build` present
|
||||
|
||||
> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager.
|
||||
|
||||
|
@ -2039,6 +2086,7 @@ By default the module will be shown if any of the following conditions are met:
|
|||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
||||
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
|
@ -2093,6 +2141,44 @@ python_binary = "python3"
|
|||
detect_extensions = []
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of Red. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🔺 "` | A format string representing the symbol of Red. |
|
||||
| `detect_extensions` | `["red"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"red bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `red` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v2.5.1` | The version of `red` |
|
||||
| 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
|
||||
|
||||
[red]
|
||||
symbol = "🔴 "
|
||||
```
|
||||
|
||||
## 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:
|
||||
|
@ -2103,15 +2189,16 @@ By default the `ruby` module shows the currently installed version of Ruby. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2141,15 +2228,16 @@ By default the `rust` module shows the currently installed version of Rust. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ The prompt will use as much context as is provided, but no flags are "required".
|
|||
Se si ottiene un errore come "_versione 'GLIBC_2. 8' non trovato (richiesta da Starship)_" quando si utilizza il binario precostruito (per esempio, su CentOS 6 o 7), puoi usare un binario compilato con `musl` invece di `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
@ -88,7 +88,7 @@ Starship è altrettanto facile da disinstallare come lo è da installare.
|
|||
|
||||
Se Starship è stato installato utilizzando un gestore di pacchetti, fai riferimento alla documentazione per le istruzioni di disinstallazione.
|
||||
|
||||
If Starship was installed using the `curl | bash` script, the following command will delete the binary:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### Da un binario precompilato, con Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pkg install getconf
|
|||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
|
|
@ -28,7 +28,11 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### クイックインストール
|
||||
### 必要なもの
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. **Starship** のバイナリをインストール
|
||||
|
||||
|
@ -38,7 +42,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
|
|||
Shellを利用する
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ function blastoff(){
|
|||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- コマンドの直前に関数を実行するために、[`DEBUG` トラップの仕組み](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/)を使うことができます。 しかし、Starship を初期化する前に DEBUG シグナルをトラップ*しなければいけません*! Starship は DEBUGトラップの値を保護できますが、 starship の起動後にトラップが上書きされると、いくつかの機能は壊れてしまうでしょう。
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). しかし、Starship を初期化する前に DEBUG シグナルをトラップ*しなければいけません*! Starship は DEBUGトラップの値を保護できますが、 starship の起動後にトラップが上書きされると、いくつかの機能は壊れてしまうでしょう。
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
|
@ -33,7 +33,7 @@ eval $(starship init bash)
|
|||
|
||||
## ウィンドウのタイトルの変更
|
||||
|
||||
いくつかのシェルプロンプトはあなたのためにウィンドウのタイトルを自動的に変更します(例えば、カレントディレクトリを反映するために)。 特に Fish はデフォルトで変更を行います。 Starship はこれをしませんが、この機能を `bash` や `zsh` に追加することは簡単にできます。
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). 特に Fish はデフォルトで変更を行います。 Starship はこれをしませんが、この機能を `bash` や `zsh` に追加することは簡単にできます。
|
||||
|
||||
まず、ウィンドウのタイトルを変更する関数を定義してください( bash も zsh も同様に)
|
||||
|
||||
|
@ -57,7 +57,7 @@ starship_precmd_user_func="set_win_title"
|
|||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
もし結果に満足したら、永続化のためそれぞれの行を (`~/.bashrc` もしくは `~/.zshrc`) に追加してください。
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
たとえば、現在のディレクトリをターミナルタブのタイトルに表示したい場合は、 `~/.bashrc`または`~/.zshrc`に以下のスニペットを追加します。
|
||||
|
||||
|
@ -75,14 +75,15 @@ starship_precmd_user_func="set_win_title"
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
ここで、 `<color>` は色を指定します(以下で述べます)。 `fg:<color>` と `<color>` は現在同様の動作ですが、将来変更される可能性があります。 文字列中の単語の順序は関係ありません。
|
||||
ここで、 `<color>` は色を指定します(以下で述べます)。 `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
`none` トークンは、文字列中の`bg:` 指定子の一部でない場合、他のすべてのトークンをオーバーライドします。そのため、たとえば、`fg:red none fg:blue` と指定した場合、スタイルなしの文字列が作られます。 `bg:none` は背景色をデフォルトの色にセットするので、`fg:red bg:none` は `red` や `fg:red` と同じ意味になり、`bg:green fg:red bg:none` も `fg:red` や `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つを指定できます。
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -53,7 +53,7 @@ starship prompt --help
|
|||
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
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## よくわからない記号を見つけました。これはどういった意味ですか?
|
||||
|
@ -88,9 +88,9 @@ Starshipのアンインストールはインストールと同じぐらい簡単
|
|||
|
||||
パッケージマネージャーを使用してStarshipをインストールした場合は、パッケージマネージャーのアンインストールガイドを参照してください。
|
||||
|
||||
`curl | bash` スクリプトを使用してStarshipをインストールした場合は、以下のコマンドでバイナリを削除してください。
|
||||
Starship をインストールスクリプトを使用してインストールした場合、次のコマンドでバイナリが削除されます。
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
sh -c 'rm "$(which starship)"'
|
||||
# starshipバイナリを見つけて削除
|
||||
sh -c 'rm "$(which starship)"''
|
||||
```
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### ビルド済みのバイナリをインストール
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
# 🚀 Advanced Installation
|
||||
# 🚀 高度なインストール
|
||||
|
||||
To install starship, you need to do two things:
|
||||
Starship をインストールするには、以下の2つのことを行う必要があります。
|
||||
|
||||
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
|
||||
1. ** starship ** のバイナリをコンピューター上に取得する
|
||||
1. Init スクリプトを修正することで、Starship バイナリをプロンプトとして使用するようシェルに指示する
|
||||
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
ほとんどのユーザーの場合、[メインページ](/guide/#🚀-installation)の説明でうまく動作します。 しかし、より特殊なプラットフォームでは、別の操作が必要になることがあります。
|
||||
|
||||
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!
|
||||
プラットフォームは無数に存在するため、メインの README.md ファイルには書ききれません。そこで、このページでは、コミュニティにより提供された他のプラットフォーム向けのインストール方法について紹介します。 あなたが使用しているプラットフォームが見当たりませんか? その場合は是非、見つけた方法をここに追加してください。
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### 必要なもの
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
[Chocolatey インストールページ](https://chocolatey.org/install)にアクセスし、Chocolatey のインストール手順に従ってください。
|
||||
|
||||
### Installation
|
||||
### インストール
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
|
@ -29,15 +29,15 @@ choco install starship
|
|||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
### インストール
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
### バイナリの取得
|
||||
|
||||
#### Imperatively
|
||||
|
||||
|
|
|
@ -28,7 +28,11 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### 빠른 설치
|
||||
### Prerequisites
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. **starship** 바이러니 설치:
|
||||
|
||||
|
@ -38,7 +42,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
With Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -75,14 +75,15 @@ Style strings are a list of words, separated by whitespace. The words are not ca
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing , though this may change in the future. The order of words in the string does not matter.
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
|
|
|
@ -142,11 +142,12 @@ This is the list of prompt-wide configuration options.
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `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. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -190,6 +191,7 @@ $docker_context\
|
|||
$package\
|
||||
$cmake\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
$elixir\
|
||||
$elm\
|
||||
|
@ -206,6 +208,7 @@ $perl\
|
|||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
|
@ -241,6 +244,8 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
|||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
|
@ -333,7 +338,7 @@ discharging_symbol = "💀 "
|
|||
|
||||
### Battery 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. The default is as shown:
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
|
@ -341,25 +346,30 @@ threshold = 10
|
|||
style = "bold red"
|
||||
```
|
||||
|
||||
The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option.
|
||||
|
||||
#### Options
|
||||
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Option | Description |
|
||||
| ----------- | ----------------------------------------------- |
|
||||
| `threshold` | The upper bound for the display option. |
|
||||
| `style` | The style used if the display option is in use. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `threshold` | `10` | The upper bound for the display option. |
|
||||
| `style` | `bold red` | The style used if the display option is in use. |
|
||||
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
|
||||
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
|
||||
|
||||
#### Example
|
||||
|
||||
```toml
|
||||
[[battery.display]] # "bold red" style when capacity is between 0% and 10%
|
||||
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
|
||||
threshold = 10
|
||||
style = "bold red"
|
||||
|
||||
[[battery.display]] # "bold yellow" style when capacity is between 10% and 30%
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
|
@ -620,6 +630,40 @@ The `dart` module shows the currently installed version of Dart. By default the
|
|||
format = "via [🔰 $version](bold red) "
|
||||
```
|
||||
|
||||
## Deno
|
||||
|
||||
The `deno` module shows you your currently installed version of Deno. By default the module will be shown if any of the following conditions are met:
|
||||
- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦕 "` | A format string representing the symbol of Deno |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"green bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `deno` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v1.8.3` | The version of `deno` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[deno]
|
||||
format = "via [🦕 $version](green bold) "
|
||||
```
|
||||
|
||||
## Directory
|
||||
|
||||
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.
|
||||
|
@ -929,7 +973,7 @@ The `erlang` module shows the currently installed version of Erlang/OTP. By defa
|
|||
format = "via [e $version](bold red) "
|
||||
```
|
||||
|
||||
## Gcloud
|
||||
## Google Cloud (`gcloud`)
|
||||
|
||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||
|
||||
|
@ -1313,15 +1357,16 @@ The `java` module shows the currently installed version of Java. By default the
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1344,7 +1389,7 @@ symbol = "🌟 "
|
|||
|
||||
## Jobs
|
||||
|
||||
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.
|
||||
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. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: warning
|
||||
|
||||
|
@ -1583,13 +1628,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | --------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1737,22 +1782,24 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
|||
|
||||
- The current directory contains a `package.json` file
|
||||
- The current directory contains a `.node-version` file
|
||||
- The current directory contains a `.nvmrc` file
|
||||
- The current directory contains a `node_modules` directory
|
||||
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
|
||||
- The current directory contains a file with the `.ts` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in `package.json` does not match the NodeJS version. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the NodeJS version. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2039,6 +2086,7 @@ By default the module will be shown if any of the following conditions are met:
|
|||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
||||
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
|
@ -2093,6 +2141,44 @@ python_binary = "python3"
|
|||
detect_extensions = []
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of Red. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🔺 "` | A format string representing the symbol of Red. |
|
||||
| `detect_extensions` | `["red"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"red bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `red` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v2.5.1` | The version of `red` |
|
||||
| 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
|
||||
|
||||
[red]
|
||||
symbol = "🔴 "
|
||||
```
|
||||
|
||||
## 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:
|
||||
|
@ -2103,15 +2189,16 @@ By default the `ruby` module shows the currently installed version of Ruby. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2141,15 +2228,16 @@ By default the `rust` module shows the currently installed version of Rust. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ The prompt will use as much context as is provided, but no flags are "required".
|
|||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
@ -88,7 +88,7 @@ Starship is just as easy to uninstall as it is to install in the first place.
|
|||
|
||||
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:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### From prebuilt binary, with Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pkg install getconf
|
|||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
|
|
@ -28,6 +28,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. Install the **starship** binary:
|
||||
|
@ -38,7 +42,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
With Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -75,14 +75,15 @@ Style strings are a list of words, separated by whitespace. The words are not ca
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing , though this may change in the future. The order of words in the string does not matter.
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
|
|
|
@ -142,11 +142,12 @@ This is the list of prompt-wide configuration options.
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `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. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -190,6 +191,7 @@ $docker_context\
|
|||
$package\
|
||||
$cmake\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
$elixir\
|
||||
$elm\
|
||||
|
@ -206,6 +208,7 @@ $perl\
|
|||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
|
@ -241,6 +244,8 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
|||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
|
@ -333,7 +338,7 @@ discharging_symbol = "💀 "
|
|||
|
||||
### Battery 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. The default is as shown:
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
|
@ -341,25 +346,30 @@ threshold = 10
|
|||
style = "bold red"
|
||||
```
|
||||
|
||||
The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option.
|
||||
|
||||
#### Options
|
||||
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Option | Description |
|
||||
| ----------- | ----------------------------------------------- |
|
||||
| `threshold` | The upper bound for the display option. |
|
||||
| `style` | The style used if the display option is in use. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `threshold` | `10` | The upper bound for the display option. |
|
||||
| `style` | `bold red` | The style used if the display option is in use. |
|
||||
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
|
||||
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
|
||||
|
||||
#### Example
|
||||
|
||||
```toml
|
||||
[[battery.display]] # "bold red" style when capacity is between 0% and 10%
|
||||
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
|
||||
threshold = 10
|
||||
style = "bold red"
|
||||
|
||||
[[battery.display]] # "bold yellow" style when capacity is between 10% and 30%
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
|
@ -620,6 +630,40 @@ The `dart` module shows the currently installed version of Dart. By default the
|
|||
format = "via [🔰 $version](bold red) "
|
||||
```
|
||||
|
||||
## Deno
|
||||
|
||||
The `deno` module shows you your currently installed version of Deno. By default the module will be shown if any of the following conditions are met:
|
||||
- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦕 "` | A format string representing the symbol of Deno |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"green bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `deno` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v1.8.3` | The version of `deno` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[deno]
|
||||
format = "via [🦕 $version](green bold) "
|
||||
```
|
||||
|
||||
## Directory
|
||||
|
||||
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.
|
||||
|
@ -929,7 +973,7 @@ The `erlang` module shows the currently installed version of Erlang/OTP. By defa
|
|||
format = "via [e $version](bold red) "
|
||||
```
|
||||
|
||||
## Gcloud
|
||||
## Google Cloud (`gcloud`)
|
||||
|
||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||
|
||||
|
@ -1313,15 +1357,16 @@ The `java` module shows the currently installed version of Java. By default the
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1344,7 +1389,7 @@ symbol = "🌟 "
|
|||
|
||||
## Jobs
|
||||
|
||||
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.
|
||||
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. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: warning
|
||||
|
||||
|
@ -1583,13 +1628,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | --------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1737,22 +1782,24 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
|||
|
||||
- The current directory contains a `package.json` file
|
||||
- The current directory contains a `.node-version` file
|
||||
- The current directory contains a `.nvmrc` file
|
||||
- The current directory contains a `node_modules` directory
|
||||
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
|
||||
- The current directory contains a file with the `.ts` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in `package.json` does not match the NodeJS version. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the NodeJS version. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2039,6 +2086,7 @@ By default the module will be shown if any of the following conditions are met:
|
|||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
||||
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
|
@ -2093,6 +2141,44 @@ python_binary = "python3"
|
|||
detect_extensions = []
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of Red. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🔺 "` | A format string representing the symbol of Red. |
|
||||
| `detect_extensions` | `["red"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"red bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `red` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v2.5.1` | The version of `red` |
|
||||
| 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
|
||||
|
||||
[red]
|
||||
symbol = "🔴 "
|
||||
```
|
||||
|
||||
## 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:
|
||||
|
@ -2103,15 +2189,16 @@ By default the `ruby` module shows the currently installed version of Ruby. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2141,15 +2228,16 @@ By default the `rust` module shows the currently installed version of Rust. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ The prompt will use as much context as is provided, but no flags are "required".
|
|||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
@ -88,7 +88,7 @@ Starship is just as easy to uninstall as it is to install in the first place.
|
|||
|
||||
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:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### From prebuilt binary, with Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pkg install getconf
|
|||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
|
|
@ -28,6 +28,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. Install the **starship** binary:
|
||||
|
@ -38,7 +42,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
With Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -75,14 +75,15 @@ Style strings are a list of words, separated by whitespace. The words are not ca
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing , though this may change in the future. The order of words in the string does not matter.
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
|
|
|
@ -142,11 +142,12 @@ This is the list of prompt-wide configuration options.
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `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. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -190,6 +191,7 @@ $docker_context\
|
|||
$package\
|
||||
$cmake\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
$elixir\
|
||||
$elm\
|
||||
|
@ -206,6 +208,7 @@ $perl\
|
|||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
|
@ -241,6 +244,8 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
|||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
|
@ -333,7 +338,7 @@ discharging_symbol = "💀 "
|
|||
|
||||
### Battery 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. The default is as shown:
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
|
@ -341,25 +346,30 @@ threshold = 10
|
|||
style = "bold red"
|
||||
```
|
||||
|
||||
The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option.
|
||||
|
||||
#### Options
|
||||
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Option | Description |
|
||||
| ----------- | ----------------------------------------------- |
|
||||
| `threshold` | The upper bound for the display option. |
|
||||
| `style` | The style used if the display option is in use. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `threshold` | `10` | The upper bound for the display option. |
|
||||
| `style` | `bold red` | The style used if the display option is in use. |
|
||||
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
|
||||
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
|
||||
|
||||
#### Example
|
||||
|
||||
```toml
|
||||
[[battery.display]] # "bold red" style when capacity is between 0% and 10%
|
||||
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
|
||||
threshold = 10
|
||||
style = "bold red"
|
||||
|
||||
[[battery.display]] # "bold yellow" style when capacity is between 10% and 30%
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
|
@ -620,6 +630,40 @@ The `dart` module shows the currently installed version of Dart. By default the
|
|||
format = "via [🔰 $version](bold red) "
|
||||
```
|
||||
|
||||
## Deno
|
||||
|
||||
The `deno` module shows you your currently installed version of Deno. By default the module will be shown if any of the following conditions are met:
|
||||
- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦕 "` | A format string representing the symbol of Deno |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"green bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `deno` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v1.8.3` | The version of `deno` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[deno]
|
||||
format = "via [🦕 $version](green bold) "
|
||||
```
|
||||
|
||||
## Directory
|
||||
|
||||
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.
|
||||
|
@ -929,7 +973,7 @@ The `erlang` module shows the currently installed version of Erlang/OTP. By defa
|
|||
format = "via [e $version](bold red) "
|
||||
```
|
||||
|
||||
## Gcloud
|
||||
## Google Cloud (`gcloud`)
|
||||
|
||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||
|
||||
|
@ -1313,15 +1357,16 @@ The `java` module shows the currently installed version of Java. By default the
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1344,7 +1389,7 @@ symbol = "🌟 "
|
|||
|
||||
## Jobs
|
||||
|
||||
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.
|
||||
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. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: warning
|
||||
|
||||
|
@ -1583,13 +1628,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | --------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1737,22 +1782,24 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
|||
|
||||
- The current directory contains a `package.json` file
|
||||
- The current directory contains a `.node-version` file
|
||||
- The current directory contains a `.nvmrc` file
|
||||
- The current directory contains a `node_modules` directory
|
||||
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
|
||||
- The current directory contains a file with the `.ts` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in `package.json` does not match the NodeJS version. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the NodeJS version. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2039,6 +2086,7 @@ By default the module will be shown if any of the following conditions are met:
|
|||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
||||
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
|
@ -2093,6 +2141,44 @@ python_binary = "python3"
|
|||
detect_extensions = []
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of Red. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🔺 "` | A format string representing the symbol of Red. |
|
||||
| `detect_extensions` | `["red"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"red bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `red` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v2.5.1` | The version of `red` |
|
||||
| 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
|
||||
|
||||
[red]
|
||||
symbol = "🔴 "
|
||||
```
|
||||
|
||||
## 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:
|
||||
|
@ -2103,15 +2189,16 @@ By default the `ruby` module shows the currently installed version of Ruby. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2141,15 +2228,16 @@ By default the `rust` module shows the currently installed version of Rust. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ The prompt will use as much context as is provided, but no flags are "required".
|
|||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
@ -88,7 +88,7 @@ Starship is just as easy to uninstall as it is to install in the first place.
|
|||
|
||||
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:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### From prebuilt binary, with Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pkg install getconf
|
|||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
|
|
@ -28,7 +28,11 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### Instalação
|
||||
### Pré-requisitos
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. Instale o binário do **starship**:
|
||||
|
||||
|
@ -38,7 +42,7 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
|
|||
Com o Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -75,14 +75,15 @@ Style strings are a list of words, separated by whitespace. The words are not ca
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing , though this may change in the future. The order of words in the string does not matter.
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
|
|
|
@ -142,11 +142,12 @@ 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` | Inserts blank line between shell prompts. |
|
||||
| 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). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Exemplo
|
||||
|
||||
|
@ -190,6 +191,7 @@ $docker_context\
|
|||
$package\
|
||||
$cmake\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
$elixir\
|
||||
$elm\
|
||||
|
@ -206,6 +208,7 @@ $perl\
|
|||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
|
@ -241,6 +244,8 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
|||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var.
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
|
@ -333,7 +338,7 @@ discharging_symbol = "💀 "
|
|||
|
||||
### Indicador de bateria
|
||||
|
||||
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. Os valores padrão são os seguintes:
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. Os valores padrão são os seguintes:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
|
@ -341,25 +346,30 @@ threshold = 10
|
|||
style = "bold red"
|
||||
```
|
||||
|
||||
The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option.
|
||||
|
||||
#### Opções
|
||||
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Option | Descrição |
|
||||
| ----------- | ----------------------------------------------- |
|
||||
| `threshold` | The upper bound for the display option. |
|
||||
| `style` | The style used if the display option is in use. |
|
||||
| Option | Padrão | Descrição |
|
||||
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `threshold` | `10` | The upper bound for the display option. |
|
||||
| `style` | `bold red` | The style used if the display option is in use. |
|
||||
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
|
||||
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
|
||||
|
||||
#### Exemplo
|
||||
|
||||
```toml
|
||||
[[battery.display]] # "bold red" style when capacity is between 0% and 10%
|
||||
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
|
||||
threshold = 10
|
||||
style = "bold red"
|
||||
|
||||
[[battery.display]] # "bold yellow" style when capacity is between 10% and 30%
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
|
@ -458,7 +468,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.
|
||||
|
||||
|
@ -620,6 +630,40 @@ The `dart` module shows the currently installed version of Dart. By default the
|
|||
format = "via [🔰 $version](bold red) "
|
||||
```
|
||||
|
||||
## Deno
|
||||
|
||||
The `deno` module shows you your currently installed version of Deno. By default the module will be shown if any of the following conditions are met:
|
||||
- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------------- | -------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦕 "` | A format string representing the symbol of Deno |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"green bold"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `deno` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variável | Exemplo | Descrição |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v1.8.3` | The version of `deno` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
### Exemplo
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[deno]
|
||||
format = "via [🦕 $version](green bold) "
|
||||
```
|
||||
|
||||
## Diretório
|
||||
|
||||
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.
|
||||
|
@ -929,7 +973,7 @@ The `erlang` module shows the currently installed version of Erlang/OTP. By defa
|
|||
format = "via [e $version](bold red) "
|
||||
```
|
||||
|
||||
## Gcloud
|
||||
## Google Cloud (`gcloud`)
|
||||
|
||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||
|
||||
|
@ -1313,15 +1357,16 @@ The `java` module shows the currently installed version of Java. By default the
|
|||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1344,7 +1389,7 @@ symbol = "🌟 "
|
|||
|
||||
## Jobs
|
||||
|
||||
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.
|
||||
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. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: warning
|
||||
|
||||
|
@ -1510,7 +1555,7 @@ disabled = false
|
|||
"dev.local.cluster.k8s" = "dev"
|
||||
```
|
||||
|
||||
## Quebra de linha
|
||||
## Line Break
|
||||
|
||||
The `line_break` module separates the prompt into two lines.
|
||||
|
||||
|
@ -1569,7 +1614,7 @@ The `lua` module shows the currently installed version of Lua. By default the mo
|
|||
format = "via [🌕 $version](bold blue) "
|
||||
```
|
||||
|
||||
## Uso de memória
|
||||
## Memory Usage
|
||||
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
|
||||
|
@ -1583,13 +1628,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| ----------- | --------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | O estilo do módulo. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
| Option | Padrão | Descrição |
|
||||
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | O estilo do módulo. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1737,22 +1782,24 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
|||
|
||||
- The current directory contains a `package.json` file
|
||||
- The current directory contains a `.node-version` file
|
||||
- The current directory contains a `.nvmrc` file
|
||||
- The current directory contains a `node_modules` directory
|
||||
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
|
||||
- The current directory contains a file with the `.ts` extension
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in `package.json` does not match the NodeJS version. |
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the NodeJS version. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2039,6 +2086,7 @@ By default the module will be shown if any of the following conditions are met:
|
|||
| Option | Padrão | Descrição |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
||||
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
|
||||
| `style` | `"yellow bold"` | O estilo do módulo. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
|
@ -2093,6 +2141,44 @@ python_binary = "python3"
|
|||
detect_extensions = []
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of Red. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🔺 "` | A format string representing the symbol of Red. |
|
||||
| `detect_extensions` | `["red"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"red bold"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `red` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variável | Exemplo | Descrição |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v2.5.1` | The version of `red` |
|
||||
| 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
|
||||
|
||||
[red]
|
||||
symbol = "🔴 "
|
||||
```
|
||||
|
||||
## 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:
|
||||
|
@ -2103,15 +2189,16 @@ By default the `ruby` module shows the currently installed version of Ruby. The
|
|||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2141,15 +2228,16 @@ By default the `rust` module shows the currently installed version of Rust. The
|
|||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ The prompt will use as much context as is provided, but no flags are "required".
|
|||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
@ -88,7 +88,7 @@ Starship is just as easy to uninstall as it is to install in the first place.
|
|||
|
||||
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:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### Binário pré-compilado, utilizando o shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pkg install getconf
|
|||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
|
|
@ -28,6 +28,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. Install the **starship** binary:
|
||||
|
@ -38,7 +42,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
With Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -75,14 +75,15 @@ Style strings are a list of words, separated by whitespace. The words are not ca
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing , though this may change in the future. The order of words in the string does not matter.
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
|
|
|
@ -142,11 +142,12 @@ This is the list of prompt-wide configuration options.
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `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. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -190,6 +191,7 @@ $docker_context\
|
|||
$package\
|
||||
$cmake\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
$elixir\
|
||||
$elm\
|
||||
|
@ -206,6 +208,7 @@ $perl\
|
|||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
|
@ -241,6 +244,8 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
|||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
|
@ -333,7 +338,7 @@ discharging_symbol = "💀 "
|
|||
|
||||
### Battery 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. The default is as shown:
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
|
@ -341,25 +346,30 @@ threshold = 10
|
|||
style = "bold red"
|
||||
```
|
||||
|
||||
The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option.
|
||||
|
||||
#### Options
|
||||
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Option | Description |
|
||||
| ----------- | ----------------------------------------------- |
|
||||
| `threshold` | The upper bound for the display option. |
|
||||
| `style` | The style used if the display option is in use. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `threshold` | `10` | The upper bound for the display option. |
|
||||
| `style` | `bold red` | The style used if the display option is in use. |
|
||||
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
|
||||
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
|
||||
|
||||
#### Example
|
||||
|
||||
```toml
|
||||
[[battery.display]] # "bold red" style when capacity is between 0% and 10%
|
||||
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
|
||||
threshold = 10
|
||||
style = "bold red"
|
||||
|
||||
[[battery.display]] # "bold yellow" style when capacity is between 10% and 30%
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
|
@ -620,6 +630,40 @@ The `dart` module shows the currently installed version of Dart. By default the
|
|||
format = "via [🔰 $version](bold red) "
|
||||
```
|
||||
|
||||
## Deno
|
||||
|
||||
The `deno` module shows you your currently installed version of Deno. By default the module will be shown if any of the following conditions are met:
|
||||
- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦕 "` | A format string representing the symbol of Deno |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"green bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `deno` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v1.8.3` | The version of `deno` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[deno]
|
||||
format = "via [🦕 $version](green bold) "
|
||||
```
|
||||
|
||||
## Directory
|
||||
|
||||
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.
|
||||
|
@ -929,7 +973,7 @@ The `erlang` module shows the currently installed version of Erlang/OTP. By defa
|
|||
format = "via [e $version](bold red) "
|
||||
```
|
||||
|
||||
## Gcloud
|
||||
## Google Cloud (`gcloud`)
|
||||
|
||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||
|
||||
|
@ -1313,15 +1357,16 @@ The `java` module shows the currently installed version of Java. By default the
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1344,7 +1389,7 @@ symbol = "🌟 "
|
|||
|
||||
## Jobs
|
||||
|
||||
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.
|
||||
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. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: warning
|
||||
|
||||
|
@ -1583,13 +1628,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | --------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1737,22 +1782,24 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
|||
|
||||
- The current directory contains a `package.json` file
|
||||
- The current directory contains a `.node-version` file
|
||||
- The current directory contains a `.nvmrc` file
|
||||
- The current directory contains a `node_modules` directory
|
||||
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
|
||||
- The current directory contains a file with the `.ts` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in `package.json` does not match the NodeJS version. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the NodeJS version. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2039,6 +2086,7 @@ By default the module will be shown if any of the following conditions are met:
|
|||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
||||
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
|
@ -2093,6 +2141,44 @@ python_binary = "python3"
|
|||
detect_extensions = []
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of Red. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🔺 "` | A format string representing the symbol of Red. |
|
||||
| `detect_extensions` | `["red"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"red bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `red` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v2.5.1` | The version of `red` |
|
||||
| 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
|
||||
|
||||
[red]
|
||||
symbol = "🔴 "
|
||||
```
|
||||
|
||||
## 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:
|
||||
|
@ -2103,15 +2189,16 @@ By default the `ruby` module shows the currently installed version of Ruby. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2141,15 +2228,16 @@ By default the `rust` module shows the currently installed version of Rust. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ The prompt will use as much context as is provided, but no flags are "required".
|
|||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
@ -88,7 +88,7 @@ Starship is just as easy to uninstall as it is to install in the first place.
|
|||
|
||||
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:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### From prebuilt binary, with Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pkg install getconf
|
|||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
|
|
@ -28,7 +28,11 @@ description: Starship - минимальная, быстрая и бесконе
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### Быстрая установка
|
||||
### Требования
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. Установите двоичный файл **starship**:
|
||||
|
||||
|
@ -38,7 +42,7 @@ description: Starship - минимальная, быстрая и бесконе
|
|||
Через Bash:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ function blastoff(){
|
|||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- Чтобы запустить пользовательскую функцию перед запуском команды, вы можете использовать [механизм ловушки `DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Тем не менее, вы **должны** поймать сигнал DEBUG *перед* инициализацией Starship! Starship может сохранить значение ловушки DEBUG, но если ловушка перезаписана после запуска Starship, некоторая функциональность сломается.
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Тем не менее, вы **должны** поймать сигнал DEBUG *перед* инициализацией Starship! Starship может сохранить значение ловушки DEBUG, но если ловушка перезаписана после запуска Starship, некоторая функциональность сломается.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
|
@ -33,7 +33,7 @@ eval $(starship init bash)
|
|||
|
||||
## Изменение заголовка окна
|
||||
|
||||
Некоторые подсказки к оболочке автоматически меняют заголовок окна для вас (например, отражая ваш рабочий каталог). Fish даже делает это по умолчанию. Starship не делает этого, но достаточно легко добавить эту функциональность к `bash` или `zsh`.
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish даже делает это по умолчанию. Starship не делает этого, но достаточно легко добавить эту функциональность к `bash` или `zsh`.
|
||||
|
||||
Сначала задайте функцию изменения заголовка окна (идентичную в bash и zsh):
|
||||
|
||||
|
@ -57,7 +57,7 @@ starship_precmd_user_func="set_win_title"
|
|||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
Если вам нравится результат, добавьте эти строки в конфигурационный файл оболочки (`~/.bashrc` или `~/.zsrhc`), чтобы оставить это навсегда.
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
Например, если вы хотите отобразить ваш текущий каталог в заголовке вкладки терминала, добавьте следующие строки в `~/. bashrc` или `~/.zshrc`:
|
||||
|
||||
|
@ -75,14 +75,15 @@ starship_precmd_user_func="set_win_title"
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
где `<color>` является цветовым спецификатором (обсуждается ниже). `fg:<color>` и `<color>` в настоящее время делают одно и то же, хотя это может измениться в будущем. Порядок слов в строке не имеет значения.
|
||||
где `<color>` является цветовым спецификатором (обсуждается ниже). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
Токен `none` переопределяет все остальные токены в строке, если он не является частью спецификатора `bg:` так, например, `fg:red none fg:blue` все равно создаст строку без стиля. `bg:none` устанавливает цвет фона по умолчанию, поэтому `fg:red bg:none` эквивалентен `red` или `fg:red` и `bg:green fg:red bg:none` тоже самое, что `fg:red` или `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` в сочетании с другими токенами может стать ошибкой в будущем.
|
||||
|
||||
Цветовой спецификатор может быть одним из следующих:
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -53,7 +53,7 @@ starship prompt --help
|
|||
Если вы получаете ошибку типа "_version 'GLIBC_2.18' not found (required by starship)_" при использовании заранее собранного бинарного файла (например, на CentOS 6 или 7), вы можете использовать бинарный файл, скомпилированый с `musl` вместо `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
@ -88,7 +88,7 @@ Starship is just as easy to uninstall as it is to install in the first place.
|
|||
|
||||
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:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### Из прекомпилированного двоичного файла, с Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pkg install getconf
|
|||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
|
|
@ -28,6 +28,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. Install the **starship** binary:
|
||||
|
@ -38,7 +42,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
With Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
# Advanced Configuration
|
||||
# Gelişmiş Yapılandırma
|
||||
|
||||
While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship.
|
||||
Starship çok yönlü bir kabuk olsa da, yine de belirli şeyleri yapması için `starship.toml`'u düzenlemek gerekebilir. Bu sayfa, Starship'i daha fazla yapılandırma tekniklerini anlatır.
|
||||
|
||||
::: warning
|
||||
::: uyarı
|
||||
|
||||
The configurations in this section are subject to change in future releases of Starship.
|
||||
Bu bölümdeki yapılandırmalar, Starship'in gelecekteki sürümlerinde değişiklik gösterebilir.
|
||||
|
||||
:::
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Bash
|
||||
## Bash'e Özel ön-komut istemi(pre-prompt) ve ön-çalıştırma(pre-execution) Komutları
|
||||
|
||||
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
Bash, çoğu diğer kabuklar gibi resmi bir preexec/precmd çerçevesine sahip değildir. Bu yüzden, `Bash'i` tamamen özelleştirmek zordur. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
|
||||
|
||||
|
@ -75,14 +75,15 @@ Style strings are a list of words, separated by whitespace. The words are not ca
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing , though this may change in the future. The order of words in the string does not matter.
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Configuration
|
||||
# Yapılandırma
|
||||
|
||||
To get started configuring starship, create the following file: `~/.config/starship.toml`.
|
||||
|
||||
|
@ -142,11 +142,12 @@ This is the list of prompt-wide configuration options.
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------- | ------------------------------ | ----------------------------------------------------- |
|
||||
| `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. |
|
||||
| Option | Default | Description |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `add_newline` | `true` | Inserts blank line between shell prompts. |
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -190,6 +191,7 @@ $docker_context\
|
|||
$package\
|
||||
$cmake\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
$elixir\
|
||||
$elm\
|
||||
|
@ -206,6 +208,7 @@ $perl\
|
|||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$red\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
|
@ -241,6 +244,8 @@ When using [aws-vault](https://github.com/99designs/aws-vault) the profile is re
|
|||
|
||||
When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var.
|
||||
|
||||
When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
|
@ -333,7 +338,7 @@ discharging_symbol = "💀 "
|
|||
|
||||
### Battery 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. The default is as shown:
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
|
@ -341,25 +346,30 @@ threshold = 10
|
|||
style = "bold red"
|
||||
```
|
||||
|
||||
The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option.
|
||||
|
||||
#### Options
|
||||
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Option | Description |
|
||||
| ----------- | ----------------------------------------------- |
|
||||
| `threshold` | The upper bound for the display option. |
|
||||
| `style` | The style used if the display option is in use. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `threshold` | `10` | The upper bound for the display option. |
|
||||
| `style` | `bold red` | The style used if the display option is in use. |
|
||||
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
|
||||
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
|
||||
|
||||
#### Example
|
||||
|
||||
```toml
|
||||
[[battery.display]] # "bold red" style when capacity is between 0% and 10%
|
||||
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
|
||||
threshold = 10
|
||||
style = "bold red"
|
||||
|
||||
[[battery.display]] # "bold yellow" style when capacity is between 10% and 30%
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
|
||||
|
@ -620,6 +630,40 @@ The `dart` module shows the currently installed version of Dart. By default the
|
|||
format = "via [🔰 $version](bold red) "
|
||||
```
|
||||
|
||||
## Deno
|
||||
|
||||
The `deno` module shows you your currently installed version of Deno. By default the module will be shown if any of the following conditions are met:
|
||||
- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦕 "` | A format string representing the symbol of Deno |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"green bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `deno` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v1.8.3` | The version of `deno` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[deno]
|
||||
format = "via [🦕 $version](green bold) "
|
||||
```
|
||||
|
||||
## Directory
|
||||
|
||||
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.
|
||||
|
@ -929,7 +973,7 @@ The `erlang` module shows the currently installed version of Erlang/OTP. By defa
|
|||
format = "via [e $version](bold red) "
|
||||
```
|
||||
|
||||
## Gcloud
|
||||
## Google Cloud (`gcloud`)
|
||||
|
||||
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
|
||||
|
||||
|
@ -1313,15 +1357,16 @@ The `java` module shows the currently installed version of Java. By default the
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
|
||||
| `style` | `"red dimmed"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1344,9 +1389,9 @@ symbol = "🌟 "
|
|||
|
||||
## Jobs
|
||||
|
||||
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.
|
||||
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. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: warning
|
||||
::: uyarı
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
|
@ -1583,13 +1628,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | --------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
| Option | Default | Description |
|
||||
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1737,22 +1782,24 @@ The `nodejs` module shows the currently installed version of NodeJS. By default
|
|||
|
||||
- The current directory contains a `package.json` file
|
||||
- The current directory contains a `.node-version` file
|
||||
- The current directory contains a `.nvmrc` file
|
||||
- The current directory contains a `node_modules` directory
|
||||
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
|
||||
- The current directory contains a file with the `.ts` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in `package.json` does not match the NodeJS version. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string representing the symbol of NodeJS. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `nodejs` module. |
|
||||
| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the NodeJS version. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2039,6 +2086,7 @@ By default the module will be shown if any of the following conditions are met:
|
|||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
||||
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
|
||||
| `style` | `"yellow bold"` | The style for the module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
|
@ -2093,6 +2141,44 @@ python_binary = "python3"
|
|||
detect_extensions = []
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of Red. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🔺 "` | A format string representing the symbol of Red. |
|
||||
| `detect_extensions` | `["red"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"red bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `red` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | -------- | ------------------------------------ |
|
||||
| version | `v2.5.1` | The version of `red` |
|
||||
| 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
|
||||
|
||||
[red]
|
||||
symbol = "🔴 "
|
||||
```
|
||||
|
||||
## 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:
|
||||
|
@ -2103,15 +2189,16 @@ By default the `ruby` module shows the currently installed version of Ruby. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------ |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ruby` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -2141,15 +2228,16 @@ By default the `rust` module shows the currently installed version of Rust. The
|
|||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `v{raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold red"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `rust` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ The prompt will use as much context as is provided, but no flags are "required".
|
|||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
@ -88,7 +88,7 @@ Starship is just as easy to uninstall as it is to install in the first place.
|
|||
|
||||
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:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### From prebuilt binary, with Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
# 🚀 Advanced Installation
|
||||
# 🚀 Gelişmiş Kurulum
|
||||
|
||||
To install starship, you need to do two things:
|
||||
Starship'i kurmak için, 2 şeye ihtiyacınız var:
|
||||
|
||||
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
|
||||
1. **Starship** binary dosyalarını bilgisayarınıza alın
|
||||
1. Kabuğunuza Starship binary scriptini kullanmasını söyleyin
|
||||
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
Çoğu kullanıcı için, [ana sayfadaki](/guide/#🚀-installation) talimatlar gayet iyi çalışacaktır. Fakat, bazı özel platformlar için, farklı talimatlara ihtiyaç vardır.
|
||||
|
||||
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!
|
||||
Birçok platform var ki ana sisteme uymuyorlar. README.md belgesi ile diğer platformlar için bazı kurulum talimatları. Seninki burada değil mi? Anlarsan lütfen buraya ekle!
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
## [Chocolatey ](https://chocolatey.org)
|
||||
|
||||
### Prerequisites
|
||||
### Ön gereklilikler
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
[Chocolatey kurulum sayfasına](https://chocolatey.org/install) gidin ve Chocolatey'i yüklemek için talimatları izleyin.
|
||||
|
||||
### Installation
|
||||
### Kurulum
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
|
@ -23,31 +23,31 @@ choco install starship
|
|||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### Prerequisites
|
||||
### Ön gereklilikler
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
### Kurulum
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
### Binary Alma
|
||||
|
||||
#### Imperatively
|
||||
#### Zorunlu olarak
|
||||
|
||||
```sh
|
||||
nix-env -iA nixos.starship
|
||||
```
|
||||
|
||||
#### Declarative, single user, via [home-manager](https://github.com/nix-community/home-manager)
|
||||
#### Açıklayıcı, tek kullanıcı, via [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
`home.nix` dosyanızda, `programs.starship` modülünü etkinleştirin, ayarlarınızı ekleyin
|
||||
|
||||
```nix
|
||||
{
|
||||
|
@ -69,13 +69,13 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett
|
|||
}
|
||||
```
|
||||
|
||||
then run
|
||||
sonra çalıştırın
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
#### NixOS ile sistem genelinde, açıklama
|
||||
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
# Presets
|
||||
# Hazır Ayarlar
|
||||
|
||||
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
|
||||
Topluluk tarafından gönderilen Starship için yapılandırma ön ayarları koleksiyonu. Paylaşacak bir ön ayarınız varsa, lütfen bu dosyayı güncelleyerek [PR gönderin](https://github.com/starship/starship/edit/master/docs/presets/README.md)! 😊
|
||||
|
||||
## Nerd Font Symbols
|
||||
## Nerd Yazı Tipi Sembolleri
|
||||
|
||||
This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye!
|
||||
Bu ön ayar, her modül için kullanılan semboller dışında hiçbir şeyi değiştirmez. Emojiler size göre değilse, bunlar dikkatinizi çekebilir!
|
||||
|
||||
![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png)
|
||||
|
||||
### Prerequisites
|
||||
### Ön koşullar
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
||||
- Terminalinizde kurulu ve etkinleştirilmiş bir [Nerd Yazı Tipi](https://www.nerdfonts.com/) (örnekte Fira Code Nerd Yazı Tipi kullanılır)
|
||||
|
||||
### Configuration
|
||||
### Yapılandırma
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
|
|
|
@ -28,7 +28,11 @@ description: Starship là prompt nhỏ, cực nhanh, và khả năng tuỳ biế
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### Cài đặt nhanh chóng
|
||||
### Yêu cầu
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. Cài đặt **starship** nhị phân:
|
||||
|
||||
|
@ -38,7 +42,7 @@ description: Starship là prompt nhỏ, cực nhanh, và khả năng tuỳ biế
|
|||
Với Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ function blastoff(){
|
|||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- Để chạy một hàm tuỳ biến trước khi một câu lệnh chạy, bạn có thể sử dụng cơ chế bẫy [`DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Tuy nhiên, bạn **phải** đặt bẫy tín hiệu DEBUG *trước* khởi tạo Starship! Starship có thể giữ giá trị của DEBUG trap, nhưng nếu trap được ghi đè sau khi starship khởi động, một vài chức năng sẽ không hoạt động.
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Tuy nhiên, bạn **phải** đặt bẫy tín hiệu DEBUG *trước* khởi tạo Starship! Starship có thể giữ giá trị của DEBUG trap, nhưng nếu trap được ghi đè sau khi starship khởi động, một vài chức năng sẽ không hoạt động.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
|
@ -33,7 +33,7 @@ eval $(starship init bash)
|
|||
|
||||
## Thay đổi tiêu đề của sổ
|
||||
|
||||
Một vào prompts sẽ tự động thay đổi tiêu đề cửa sổ cho bạn (ví dụ phản ánh thư mục hiện hành của bạn). Fish thậm chí là nó một cách mặc định. Starship không làm điều này, nhưng nó khá đơn giản để thêm điều này vào chức năng cho `bash` hoặc `zsh`.
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish thậm chí là nó một cách mặc định. Starship không làm điều này, nhưng nó khá đơn giản để thêm điều này vào chức năng cho `bash` hoặc `zsh`.
|
||||
|
||||
Đầu tiên, định nghĩa một hàm thay đổi tiêu đề cửa sổ (giống hệt trong bash và zsh):
|
||||
|
||||
|
@ -57,7 +57,7 @@ Trong `zsh`, thêm cái này vào mảng `precmd_functions`:
|
|||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
Nếu bạn thích thành quả, thêm những giòng này vào tập tin cấu hình shell của bạn (`~/.bashrc` or `~/.zshrc`) để cấu hình nó vĩnh viễn.
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
Ví dụ, nếu bạn muốn hiển thị đường dẫn hiện tại của bạn trong tiêu đề tab terminal, thêm snippet sau vào `~/.bashrc` hoặc `~/.zshrc` của bạn:
|
||||
|
||||
|
@ -75,14 +75,15 @@ Chuỗi kiểu là một danh sách các từ, được phân cách bởi khoả
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
`<color>` là một nơi quy định màu (được bàn luận ở phía dưới). `fg:<color>` và `<color>` hiện tại thực hiện công việc như nhau, tuy nhiên, điều này có thể thay đổi trong tương lai. Thứ tự các từ trong chuỗi là không quan trọng.
|
||||
`<color>` là một nơi quy định màu (được bàn luận ở phía dưới). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
Từ mã `none` ghi đè tất cả các từ mã khác trong chuỗi nếu nó không là một phần của `bg:` specifier, vậy nên `fg:red none fg:blue` sẽ vẫn tạo một chuỗi mà không có kiểu. `bg:none` thiết lập màu nền do đó `fg:red bg:none` là tương đương với `red` hoặc `fg:red` và `bg:green fg:red bg:none` cũng tương đương với `fg:red` hoặc `red`. Nó có thể trở thành một lỗi để sử dụng `none` trong việc kết hợp với các từ mã khác trong tương lai.
|
||||
Từ mã `none` ghi đè tất cả các từ mã khác trong chuỗi nếu nó không là một phần của `bg:` specifier, vậy nên `fg:red none fg:blue` sẽ vẫn tạo một chuỗi mà không có kiểu. `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`. Nó có thể trở thành một lỗi để sử dụng `none` trong việc kết hợp với các từ mã khác trong tương lai.
|
||||
|
||||
Một quy định màu có thể là một trong các thứ sau:
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -53,7 +53,7 @@ Prompt sẽ sử dụng nhiều ngữ cảnh được cung câos, nhưng không
|
|||
Nếu bạn nhận được một lỗi giống như "_version 'GLIBC_2.18' not found (required by starship)_" khi sử dụng prebuilt binary (ví dụ trên CentOS 6 hoặc 7), bạn có thể sử dụng tập tin đã được dịch với `musl` thay vì `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Tôi thấy các biểu tượng tôi không hiểu hoặc không mong muốn, chúng có nghĩa là gì?
|
||||
|
@ -88,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ài đặt bằng việc sử dụng `curl | bash`, theo câu lệnh sau để xoá tập tin nhị phân:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### Từ bản nhị phân có sẵn, với Shell:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pkg install getconf
|
|||
### Cài đặt
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
|
|
@ -28,7 +28,11 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### 快速安装
|
||||
### 前置要求
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. 安装 **starship** 二进制文件:
|
||||
|
||||
|
@ -38,7 +42,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
|||
使用 Shell 命令:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ function blastoff(){
|
|||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- 要在一个命令运行前运行自定义函数,您可以使用 [`DEBUG` trap 机制](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/)。 然而,您**必须**在捕捉 DEBUG 信号*之前*启动 Starship! Starship 可以保留 DEBUG trap 的值,但如果该 trap 在 starship 启动后被覆盖,一些功能将会被破坏。
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). 然而,您**必须**在捕捉 DEBUG 信号*之前*启动 Starship! Starship 可以保留 DEBUG trap 的值,但如果该 trap 在 starship 启动后被覆盖,一些功能将会被破坏。
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
|
@ -33,7 +33,7 @@ eval $(starship init bash)
|
|||
|
||||
## 更改窗口标题
|
||||
|
||||
一些 shell 提示符会自动更改您的窗口标题(比如改成您的工作目录)。 Fish 甚至默认会执行此功能。 Starship 没有实现此功能,但将这个功能添加到 `bash` 或 `zsh` 是相当简单的。
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish 甚至默认会执行此功能。 Starship 没有实现此功能,但将这个功能添加到 `bash` 或 `zsh` 是相当简单的。
|
||||
|
||||
首先,定义窗口标题更改函数(在 bash 和 zsh 中相同):
|
||||
|
||||
|
@ -75,14 +75,15 @@ starship_precmd_user_func="set_win_title"
|
|||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
`<color>` 是颜色说明符(下面解释)。 `fg:<color>` 和 `<color>` 当前产生一样的效果,尽管未来可能会改变。 字符串中的单词顺序不影响显示结果。
|
||||
`<color>` 是颜色说明符(下面解释)。 `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
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` 与其它标识符一起使用视为一种错误。
|
||||
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` 与其它标识符一起使用视为一种错误。
|
||||
|
||||
颜色说明符可以是以下内容之一:
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -53,7 +53,7 @@ Starship 会处理所提供的全部上下文参数并在提示符中显示,
|
|||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
@ -88,7 +88,7 @@ Starship is just as easy to uninstall as it is to install in the first place.
|
|||
|
||||
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:
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
##### 下载预构建的二进制文件,使用 Shell 命令:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pkg install getconf
|
|||
### Installation
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash -s -- -b /data/data/com.termux/files/usr/bin
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
|
|
@ -28,7 +28,11 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化
|
|||
</video>
|
||||
</div>
|
||||
|
||||
### 快速安裝
|
||||
### 先決要求
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. 安裝 **starship** 執行檔:
|
||||
|
||||
|
@ -38,7 +42,7 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化
|
|||
使用 Shell 安裝:
|
||||
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue