mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
docs(i18n): New Crowdin updates (#2834)
This commit is contained in:
@@ -102,7 +102,7 @@ A conditional format string wrapped in `(` and `)` will not render if all variab
|
||||
|
||||
For example:
|
||||
|
||||
- `(@$region)` will show nothing if the variable `region` is `None`, otherwise `@` followed by the value of region.
|
||||
- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region.
|
||||
- `(some text)` will always show nothing since there are no variables wrapped in the braces.
|
||||
- When `$all` is a shortcut for `\[$a$b\]`, `($all)` will show nothing only if `$a` and `$b` are both `None`. This works the same as `(\[$a$b\] )`.
|
||||
|
||||
@@ -185,6 +185,7 @@ $vcsh\
|
||||
$git_branch\
|
||||
$git_commit\
|
||||
$git_state\
|
||||
$git_metrics\
|
||||
$git_status\
|
||||
$hg_branch\
|
||||
$docker_context\
|
||||
@@ -391,7 +392,7 @@ By default it only changes color. If you also want to change its shape take a lo
|
||||
|
||||
::: warning
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
`error_symbol` is not supported on elvish and nu shell.
|
||||
|
||||
:::
|
||||
|
||||
@@ -745,7 +746,7 @@ truncation_symbol = "…/"
|
||||
|
||||
## Docker Context
|
||||
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`.
|
||||
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
|
||||
|
||||
### Options
|
||||
|
||||
@@ -804,7 +805,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. |
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
@@ -1169,6 +1170,46 @@ format = '[\($state( $progress_current of $progress_total)\)]($style) '
|
||||
cherry_pick = "[🍒 PICKING](bold red)"
|
||||
```
|
||||
|
||||
## Git Metrics
|
||||
|
||||
The `git_metrics` module will show the number of added and deleted lines in the current git repository.
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | -------------------------------------------------------- | ---------------------------------- |
|
||||
| `added_style` | `"bold green"` | The style for the added count. |
|
||||
| `deleted_style` | `"bold red"` | The style for the deleted count. |
|
||||
| `format` | `'[+$added]($added_style) [-$deleted]($deleted_style) '` | The format for the module. |
|
||||
| `disabled` | `true` | Disables the `git_metrics` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ----------------- | ------- | ------------------------------------------- |
|
||||
| added | `1` | The current number of added lines |
|
||||
| deleted | `2` | The current number of deleted lines |
|
||||
| added_style\* | | Mirrors the value of option `added_style` |
|
||||
| deleted_style\* | | Mirrors the value of option `deleted_style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[git_metrics]
|
||||
added_style = "bold blue"
|
||||
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
```
|
||||
|
||||
## Git Status
|
||||
|
||||
The `git_status` module shows symbols representing the state of the repo in your current directory.
|
||||
@@ -1416,7 +1457,7 @@ The `jobs` module shows the current number of jobs running. The module will be s
|
||||
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh.
|
||||
This module is not supported on tcsh and nu.
|
||||
|
||||
:::
|
||||
|
||||
@@ -2505,7 +2546,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
:::
|
||||
|
||||
::: warning This module is not supported on elvish shell. :::
|
||||
::: warning This module is not supported on elvish and nu shell. :::
|
||||
|
||||
### Options
|
||||
|
||||
|
||||
Reference in New Issue
Block a user