1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-28 07:46:28 +00:00

docs(i18n): New Crowdin updates (#2834)

This commit is contained in:
Matan Kushner 2021-07-10 17:15:23 -04:00 committed by GitHub
parent 9f337d15e7
commit cc32c7214b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
56 changed files with 1658 additions and 503 deletions

View File

@ -138,3 +138,16 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -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

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 Contributing
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).

View File

@ -138,3 +138,16 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -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

View File

@ -259,6 +259,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 بەژداریکردن
ئێمە هەموو کات ئەگەڕێین بۆ بەژداریکەرێک لە هەر **ئاست و توانایەکدا بێت**! ئەگەر بەدوای ئەوەوەی کە بێیتە ئەم پڕۆژەیەوە [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue) تاقیبکەرەوە.

View File

@ -138,3 +138,16 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -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
::: Warnung
`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).
### Optionen
@ -804,7 +805,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| Option | Standardwert | Beschreibung |
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `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 "` | Symbol das vor der dotnet-Version angezeigt wird. |
| `heuristic` | `true` | Schnelle Versionserkennung nutzen um Starship bedienbar zu halten. |
@ -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.
::: Tipp
Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren.
:::
### Optionen
| Option | Standardwert | Beschreibung |
| --------------- | -------------------------------------------------------- | ---------------------------------- |
| `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 | Beispiel | Beschreibung |
| ----------------- | -------- | ------------------------------------------- |
| 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
### Beispiel
```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
::: Warnung
This module is not supported on tcsh.
This module is not supported on tcsh and nu.
:::
@ -2505,7 +2546,7 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
:::
::: warning This module is not supported on elvish shell. :::
::: warning This module is not supported on elvish and nu shell. :::
### Optionen

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 Mitwirken
Wir laden Leute **aller Erfahrungsstufen** herzlich ein mitzumachen! Falls du dich mit dem Projekt vertaut machen willst, versuche ein [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).

View File

@ -2,7 +2,7 @@
Um starship zu installieren, musst du zwei Dinge tun:
1. Get the **starship** binary onto your computer
1. Holen Sie sich das **starship** Binary auf Ihren Computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.

View File

@ -138,3 +138,16 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -102,7 +102,7 @@ Una cadena de formato condicional envuelto en `(` y `)` no se renderizará si to
Por ejemplo:
- `(@$region)` no mostrará nada si la variable `region` es `None`, de lo contrario `@` seguido por el valor de la región.
- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region.
- `(algún texto)` siempre mostrará nada ya que no hay variables envueltas entre llaves.
- Cuando `$all` es un atajo para `\[$a$b\]`, `($all)` no mostrará nada solo si `$a` y `$b` ambos son `None`. Esto funciona igual que `(\[$a$b\] )`.
@ -174,7 +174,7 @@ La varieble `format` por defecto se utiliza para definir el formato del prompt,
```toml
format = "$all"
# El cual es equivalente a
# Which is equivalent to
format = """
$username\
$hostname\
@ -185,6 +185,7 @@ $vcsh\
$git_branch\
$git_commit\
$git_state\
$git_metrics\
$git_status\
$hg_branch\
$docker_context\
@ -390,7 +391,7 @@ Por defecto sólo cambia el color. Si también se quiere cambiar su forma, ver [
::: aviso
`error_symbol` no es compatible con el intérprete de comandos Elvish.
`error_symbol` is not supported on elvish and nu shell.
:::
@ -744,7 +745,7 @@ truncation_symbol = "…/"
## Docker Context
El módulo `docker_context` muestra el [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) activo si no está a `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).
### Opciones
@ -803,7 +804,7 @@ El módulo también mostrará el Target Framework Moniker ([https://docs.microso
| Opción | Por defecto | Descripción |
| ------------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | El formato del módulo. |
| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | El formato del módulo. |
| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
| `symbol` | `".NET "` | Símbolo usado antes de mostrar la versión de .NET |
| `heuristic` | `true` | Usa una detección de versiones más rápida para mantener a starship veloz. |
@ -1168,6 +1169,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.
::: consejo
Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración.
:::
### Opciones
| Opción | Por defecto | Descripción |
| --------------- | -------------------------------------------------------- | ---------------------------------- |
| `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) '` | El formato del módulo. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
| Variable | Ejemplo | Descripción |
| ----------------- | ------- | ------------------------------------------- |
| 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` |
\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
### Ejemplo
```toml
# ~/.config/starship.toml
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
```
## Git status
El módulo `git_status` muestra símbolos que representan el estado del repositorio en su directorio actual.
@ -1188,7 +1229,7 @@ El módulo `git_status` muestra símbolos que representan el estado del reposito
| `renamed` | `"»"` | El formato de `renamed` |
| `deleted` | `"✘"` | El formato de `deleted` |
| `style` | `"bold red"` | El estilo del módulo. |
| `disabled` | `false` | Deshabilita el módulo `git_status`. |
| `disabled` | `false` | Desactiva el módulo `git_status`. |
### Variables
@ -1200,11 +1241,11 @@ Las siguientes variables se pueden utilizar en `format`:
| `ahead_behind` | Muestra la cadena de formato de `diverged` `ahead` o `behind` basado en el estado actual del repositorio |
| `conflicted` | Muestra `conflicted` cuando esta rama tiene conflictos de fusión. |
| `untracked` | Muestra `untracked` cuando hay archivos sin rastrear en el directorio de trabajo. |
| `stashed` | Muestra `stashed` cuando existe un archivo en el área de preparación para el repositorio local. |
| `stashed` | Muestra `stashed` cuando existe un "stash" para el repositorio local. |
| `modified` | Muestra `modified` cuando hay modificaciones de archivo en el directorio de trabajo. |
| `staged` | Muestra `staged` cuando se ha añadido un nuevo archivo al área de preparación. |
| `renamed` | Muestra `renamed` cuando un archivo renombrado ha sido añadido al área de preparación. |
| `deleted` | Muestra `deleted` cuando un archivo ha sido añadido al área de preparación. |
| `staged` | Muestra `staged` cuando se ha añadido un nuevo archivo al área de "stash". |
| `renamed` | Muestra `renamed` cuando un archivo renombrado ha sido añadido al área de "stash". |
| `deleted` | Muestra `deleted` cuando un archivo ha sido añadido al área de "stash". |
| style\* | Refleja el valor de la opción `style` |
\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
@ -1212,9 +1253,9 @@ Las siguientes variables se pueden utilizar en `format`:
Las siguientes variables pueden ser usadas en `diverged`:
| Variable | Descripción |
| -------------- | -------------------------------------------------------------- |
| `ahead_count` | Número de confirmaciones por delante de la rama de seguimiento |
| `behind_count` | Número de confirmaciones detrás de la rama de seguimiento |
| -------------- | ------------------------------------------------------- |
| `ahead_count` | Número de commits por delante de la rama de seguimiento |
| `behind_count` | Número de commits detrás de la rama de seguimiento |
Las siguientes variales pueden ser usadas en `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` y `deleted`:
@ -1342,12 +1383,12 @@ El módulo `hostname` muestra el nombre de host del sistema.
### Opciones
| Opción | Por defecto | Descripción |
| ---------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ---------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ssh_only` | `true` | Mostrar sólo el nombre de host cuando esté conectado a una sesión SSH. |
| `trim_at` | `"."` | Cadena en la que el nombre de host se corta, después de la primera coincidencia. `"."` se detendrá después del primer punto. `""` deshabilitará cualquier truncamiento |
| `trim_at` | `"."` | Cadena en la que el nombre de host se corta, después de la primera partida. `"."` se detendrá después del primer punto. `""` deshabilitará cualquier truncamiento |
| `format` | `"[$hostname]($style) in "` | El formato del módulo. |
| `style` | `"bold dimmed green"` | El estilo del módulo. |
| `disabled` | `false` | Deshabilita el módulo `hostname`. |
| `disabled` | `false` | Desactiva el módulo `hostname`. |
### Variables
@ -1415,7 +1456,7 @@ El módulo `jobs` muestra el número actual de tareas en ejecución. El módulo
::: aviso
Este módulo no está soportado en tcsh.
This module is not supported on tcsh and nu.
:::
@ -1586,8 +1627,8 @@ El módulo `line_break` separa el indicador en dos líneas.
### Opciones
| Opción | Por defecto | Descripción |
| ---------- | ----------- | ------------------------------------------------------------------------------ |
| `disabled` | `false` | Deshabilita el módulo `line_break`, haciendo que el prompt sea una sola línea. |
| ---------- | ----------- | ------------------------------------------------------------------------------- |
| `disabled` | `false` | Deshabilita el módulo `line_break`, haciendo que el mensaje sea una sola línea. |
### Ejemplo
@ -1617,8 +1658,8 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
| `detect_files` | `[".lua-version"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `["lua"]` | Qué carpetas deberían activar este módulo. |
| `style` | `"bold blue"` | El estilo del módulo. |
| `lua_binary` | `"lua"` | Configura el binario lua que Starship ejecuta al obtener la versión. |
| `disabled` | `false` | Deshabilita el módulo `lua`. |
| `lua_binary` | `"lua"` | Configura el binario de lua que Starship ejecuta al obtener la versión. |
| `disabled` | `false` | Desactiva el módulo `lua`. |
### Variables
@ -1742,7 +1783,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
| `detect_files` | `["nim.cfg"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
| `style` | `"bold yellow"` | El estilo del módulo. |
| `disabled` | `false` | Deshabilita el módulo `nim`. |
| `disabled` | `false` | Desactiva el módulo `nim`. |
### Variables
@ -1824,7 +1865,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| `detect_files` | `["package.json", ".node-version"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `["node_modules"]` | Qué carpetas deberían activar este módulo. |
| `style` | `"bold green"` | El estilo del módulo. |
| `disabled` | `false` | Deshabilita el módulo `nodejs`. |
| `disabled` | `false` | Desactiva el módulo `nodejs`. |
| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. |
### Variables
@ -1870,7 +1911,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `["_opam", "esy.lock"]` | Qué carpetas deberían activar este módulo. |
| `style` | `"bold yellow"` | El estilo del módulo. |
| `disabled` | `false` | Deshabilita el módulo `ocaml`. |
| `disabled` | `false` | Desactiva el módulo `ocaml`. |
### Variables
@ -2074,7 +2115,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| `detect_files` | `["spago.dhall"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
| `style` | `"bold white"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `purescript`. |
| `disabled` | `false` | Deshabilita el módulo `purescript`. |
### Variables
@ -2504,7 +2545,7 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
:::
::: advertencia Este módulo no es compatible con el intérprete de comandos Elvish. :::
::: warning This module is not supported on elvish and nu shell. :::
### Opciones

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 Colaborando
¡Siempre estamos buscando colaboradores de **todos los niveles y habilidades**! Si estas buscando una manera fácil de ayudar este proyecto, puedes intentar resolver un problema con la etiqueta "[good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)".

View File

@ -138,3 +138,16 @@ description: Starship est une invite minimaliste, ultra-rapide et hautement pers
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -102,7 +102,7 @@ Une chaîne de formatage conditionnel enveloppée dans `(` et `)` ne sera pas re
Par exemple :
- `(@$region)` ne montrera rien si la variable `région` est `None`, sinon `@` suivi de la valeur de la région.
- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region.
- `(some text)` ne montrera toujours rien puisqu'il n'y a pas de variables enveloppées dans les accolades.
- Lorsque `$all` est un raccourci pour `\[$a$b\]`, `($all)` ne montrera rien que si `$a` et `$b` sont tous les deux `None`. Cela fonctionne comme `(\[$a$b\] )`.
@ -174,7 +174,7 @@ Le `format` par défaut est utilisé pour définir le format de l'invite, si il
```toml
format = "$all"
# Est équivalent à
# Which is equivalent to
format = """
$username\
$hostname\
@ -185,6 +185,7 @@ $vcsh\
$git_branch\
$git_commit\
$git_state\
$git_metrics\
$git_status\
$hg_branch\
$docker_context\
@ -391,7 +392,7 @@ Par défaut, seule la couleur change. Si vous désirez également changer sa for
::: warning
Attention, `error_symbol` n'est pas supporté avec elvish.
`error_symbol` is not supported on elvish and nu shell.
:::
@ -745,7 +746,7 @@ truncation_symbol = "…/"
## Contexte Docker
Le module `docker_context` affiche le [contexte Docker](https://docs.docker.com/engine/context/working-with-contexts/) actuellement actif s'il n'est pas réglé à `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 | Défaut | Description |
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | Format du module. |
| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | Format du module. |
| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
| `symbol` | `".NET "` | Le symbole utilisé avant d'afficher la version de dotnet. |
| `heuristic` | `true` | Utilisez la détection de versions plus rapide pour garder starship instantané. |
@ -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
Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration.
:::
### Options
| Option | Défaut | Description |
| --------------- | -------------------------------------------------------- | ---------------------------------- |
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold green"` | The style for the deleted count. |
| `format` | `'[+$added]($added_style) [-$deleted]($deleted_style) '` | Format du module. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
| Variable | Exemple | 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` |
\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style
### Exemple
```toml
# ~/.config/starship.toml
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
```
## Statut Git
Le module `git_status` affiche des symboles représentant l'état du dépôt dans votre répertoire courant.
@ -1416,7 +1457,7 @@ Le module `jobs` affiche le nombre de tâches en cours d'exécution. Le module n
::: warning
Ce module n'est pas pris en charge sur tcsh.
This module is not supported on tcsh and nu.
:::
@ -2188,7 +2229,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
## R
Le module `rlang` vous montre votre version de R actuellement installée. Le module sera affiché si l'une des conditions suivantes est remplie :
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
- Le répertoire actuel contient un fichier avec l'extension `.R`.
- Le répertoire actuel contient un fichier avec l'extension `.Rd`.
@ -2506,7 +2547,7 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
:::
::: warning Ce module n'est pas supporté avec elvish. :::
::: warning This module is not supported on elvish and nu shell. :::
### Options
@ -2670,7 +2711,7 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
| `time_format` | voir plus bas | Le [format chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) utilisé pour formater l'heure. |
| `style` | `"bold yellow"` | Le style utilisé par le module |
| `utc_time_offset` | `"local"` | Définir le décalage horaire UTC à utiliser. Range from -24 &lt; x &lt; 24. Accepte des nombres décimaux pour s'adapter aux décalages de 30/45 minutes. |
| `disabled` | `true` | Désactive le module `time`. |
| `disabled` | `true` | Désactiver le module `time`. |
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Sinon, il est défini comme `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
@ -2720,7 +2761,7 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
| `style_user` | `"bold yellow"` | Le style utilisé pour les utilisateurs non-root. |
| `format` | `"[$user]($style) in "` | Format du module. |
| `show_always` | `false` | Toujours afficher le module `username`. |
| `disabled` | `false` | Désactive le module `username`. |
| `disabled` | `false` | Désactiver le module `username`. |
### Variables

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 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).

View File

@ -138,3 +138,16 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -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

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 Contribuire
Siamo sempre alla ricerca di collaboratori di **tutti i livelli**! Se stai cercando di entrare facilmente nel progetto, prova un [buon primo problema](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).

View File

@ -30,7 +30,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
### 必要なもの
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
- [Nerd Font](https://www.nerdfonts.com/)の一つがインストールされていて、ターミナルで有効になっていること。
### クイックインストール
@ -44,7 +44,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
Starship自体を更新するには、上記のスクリプトを再度実行してください。 最新のバージョンに置き換わり、設定ファイルには変更を加えません。
#### パッケージマネージャー経由でインストール
@ -118,7 +118,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
#### Elvish
::: warning Only elvish v0.15 or higher is supported. :::
::: warning elvish v0.15以上のみサポートされています。 :::
`~/.elvish/rc.elv` の最後に以下を追記してください。
@ -138,3 +138,16 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -102,7 +102,7 @@ Starshipのほとんどのモジュールでは、表示スタイルを設定で
例:
- `(@$region)` `region``None` の場合何も表示せず、そうでなければ `@` とその後ろに region の値を表示します。
- `(@$region)``region`が`None`または空だった場合表示されませんが、値がある場合は`@` に続いてregionの値が表示されます。
- `(some text)` は括弧の中に変数がないので、常に何も表示しません。
- `$all``\[$a$b\]` のショートカットである時、 `$a``$b` が両方とも `None` である場合に限り、`($all)` は何も表示しません。 これは `(\[$a$b\] )` と同じ動作をします。
@ -186,6 +186,7 @@ $vcsh\
$git_branch\
$git_commit\
$git_state\
$git_metrics\
$git_status\
$hg_branch\
$docker_context\
@ -342,7 +343,7 @@ discharging_symbol = "💀 "
### バッテリーの表示
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). `display` が提供されない場合、 デフォルトは次のとおりです。
`display`オプションを使用して、バッテリーインジケーターを表示するタイミングthreshold、どのシンボルが使われるか(symbol) と外観styleを定義します。 `display` が提供されない場合、 デフォルトは次のとおりです。
```toml
[[battery.display]]
@ -350,32 +351,32 @@ 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.
`charging_symbol`と`discharging_symbol`オプションのデフォルト値はそれぞれ`battery`の `charging_symbol`と`discharging_symbol`になります。
#### オプション
`display`オプションは、次の表の通りです。
| オプション | デフォルト | 説明 |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
| -------------------- | ---------- | -------------------------------------------------------------------------------------- |
| `threshold` | `10` | バッテリーが表示される上限です。 |
| `style` | `bold red` | displayオプションが使用されている場合のスタイルです。 |
| `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. |
| `charging_symbol` | `-` | displayオプションが使用されている場合はこののシンボルが表示されます。デフォルトはバッテリーの `charging_symbol` オプションと同じになります。 |
| `discharging_symbol` | `-` | displayオプションが使用されている場合はこののシンボルが表示されます。デフォルトはバッテリーの `discharging_symbol` オプションと同じになります。 |
#### 設定例
```toml
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
[[battery.display]] # "bold red"のスタイルとバッテリー残量が0%~10%の放電時のシンボル
threshold = 10
style = "bold red"
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
[[battery.display]] # "bold yellow"のスタイルとバッテリー残量が10%~30%の放電時の💦シンボル
threshold = 30
style = "bold yellow"
discharging_symbol = 💦
# when capacity is over 30%, the battery indicator will not be displayed
# 残量が30%以上の場合バッテリーインジケータは表示されません
```
@ -388,17 +389,17 @@ discharging_symbol = 💦
- 色の変更 (`赤`/`緑`)
- プロンプトの表示の変更 (``/`✖`)
デフォルトでは、色だけが変更されます。 If you also want to change its shape take a look at [this example](#with-custom-error-shape).
デフォルトでは、色だけが変更されます。 形も変えてみたい場合は[このサンプル](#with-custom-error-shape)も参考にしてください。
::: warning
`error_symbol` is not supported on elvish shell.
`error_symbol` is not supported on elvish and nu shell.
:::
::: warning
`vicmd_symbol` is only supported in fish and zsh.
`vicmd_symbol`はfishとzshのみでサポートされています。
:::
@ -451,7 +452,7 @@ vicmd_symbol = "[V](bold green) "
## CMake
The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). デフォルトでは次のいずれかの条件が満たされると、モジュールがアクティブになります。
`cmake`モジュールは、現在インストールされている[Cmake](https://cmake.org/)のバージョンを表示します。 デフォルトでは次のいずれかの条件が満たされると、モジュールがアクティブになります。
- カレントディレクトリに `CMakeLists.txt` ファイルが含まれている
- カレントディレクトリに `CMakeCache.txt` ファイルが含まれている
@ -459,9 +460,9 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | -------------------------------------- | ------------------------------------------------------------------------- |
| ------------------- | -------------------------------------- | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"△ "` | cmakeのバージョンの前に使用される記号 |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -570,7 +571,7 @@ format = "[$symbol$environment](dimmed green) "
## Crystal
The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
`crystal`モジュールは、現在インストールされている[Crystal](https://crystal-lang.org/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`shard.yml`ファイルが含まれている
- カレントディレクトリに`.cr`の拡張子のファイルが含まれている
@ -578,10 +579,10 @@ The `crystal` module shows the currently installed version of [Crystal](https://
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `symbol` | `"🔮 "` | Crystalのバージョンを表示する前に使用される記号です。 |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `detect_extensions` | `["cr"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["shard.yml"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -609,18 +610,18 @@ format = "via [✨ $version](bold blue) "
## Dart
The `dart` module shows the currently installed version of [Dart](https://dart.dev/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
`dart`モジュールは、現在インストールされている[Dart](https://dart.dev/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a file with `.dart` extension
- The current directory contains a `.dart_tool` directory
- カレントディレクトリに`.dart`の拡張子のファイルが含まれている
- カレントディレクトリに`.dart_tool`ディレクトリが含まれている
- カレントディレクトリに`pubspec.yaml`, `pubspec.yml`,もしくは`pubspec.lock`が含まれている
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------------------- | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"🎯 "` | Dartのシンボルを表すフォーマット文字列 |
| `detect_extensions` | `["dart"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -649,27 +650,27 @@ format = "via [🔰 $version](bold red) "
## Deno
The `deno` module shows you your currently installed version of [Deno](https://deno.land/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
`deno`モジュールは、現在インストールされている[Deno](https://deno.land/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`mod.ts`、`mod.js`、`deps.ts`か`deps.js`が含まれている
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| ------------------- | -------------------------------------------- | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"🦕 "` | Dart のシンボルを表すフォーマット文字列 |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
| `style` | `"green bold"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `deno` module. |
| `disabled` | `false` | `deno`モジュールを無効化します。 |
### 変数
| 変数 | 設定例 | 説明 |
| --------- | -------- | ---------------------- |
| version | `v1.8.3` | The version of `deno` |
| version | `v1.8.3` | `deno`のバージョン |
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
@ -746,18 +747,18 @@ truncation_symbol = "…/"
## Docker Context
`docker_context`モジュールは、 [Dockerコンテキスト](https://docs.docker.com/engine/context/working-with-contexts/)が`デフォルト`に設定されていない場合、現在アクティブな <1>Dockerコンテキストを表示します。
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ---------------------------------- | --------------------------------------------------------------------------------- |
| ------------------- | ---------------------------------- | -------------------------------------------------------------- |
| `format` | `"via [$symbol$context]($style) "` | moduleのフォーマットです。 |
| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. |
| `only_with_files` | `true` | Only show when there's a match |
| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). |
| `detect_files` | `The format for the module.` | Which filenames should trigger this module (needs `only_with_files` to be true). |
| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). |
| `symbol` | `"🐳 "` | Dockerコンテキストを表示する前に使用される記号です。 |
| `only_with_files` | `true` | ファイルに一致する場合にのみ表示 |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 |
| `detect_files` | `The format for the module.` | どんなファイル名がこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 |
| `detect_folders` | `[]` | どんなフォルダがこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 |
| `style` | `"blue bold"` | モジュールのスタイルです。 |
| `disabled` | `false` | `docker_context`モジュールを無効にします。 |
@ -782,7 +783,7 @@ format = "via [🐋 $context](blue bold)"
## Dotnet
The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. もし SDKは現在のディレクトリに固定されているのであれば、その固定されたバージョンが表示されます。 それ以外の場合、モジュール SDKの最新のインストールバージョンを示します。
`dotnet`モジュールはカレントディレクトリに関係する[.NET Core SDK](https://dotnet.microsoft.com/)のバージョンを表示します。 もし SDKは現在のディレクトリに固定されているのであれば、その固定されたバージョンが表示されます。 それ以外の場合、モジュール SDKの最新のインストールバージョンを示します。
By default this module will only be shown in your prompt when one or more of the following files are present in the current directory:
@ -804,9 +805,9 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `".NET "` | dotnetのバージョンを表示する前に使用される記号です。 |
| `heuristic` | `true` | より高速なバージョン検出を使用して、starshipの動作を維持します。 |
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | どの拡張子がこのモジュールをアクティブにするか |
@ -846,9 +847,9 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------- |
| ------------------- | ----------------------------------------------------------- | --------------------------------------------------------------- |
| `format` | `'via [$symbol($version \(OTP $otp_version\) )]($style)'` | The format for the module elixir. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["mix.exs"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -889,9 +890,9 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------------- |
| ------------------- | -------------------------------------------------- | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. |
| `detect_extensions` | `["elm"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["elm.json", "elm-package.json", ".elm-version"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -965,9 +966,9 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | -------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `" "` | The symbol used before displaying the version of erlang. |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
@ -1170,6 +1171,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
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
:::
### オプション
| オプション | デフォルト | 説明 |
| --------------- | -------------------------------------------------------- | ---------------------------------- |
| `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) '` | moduleのフォーマットです。 |
| `disabled` | `true` | Disables the `git_metrics` module. |
### 変数
| 変数 | 設定例 | 説明 |
| ----------------- | --- | ------------------------------------------- |
| 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` |
\*: この変数はスタイル文字列の一部としてのみ使用できます
### 設定例
```toml
# ~/.config/starship.toml
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
```
## Git Status
`git_status`モジュールは、現在のディレクトリのリポジトリの状態を表すシンボルを表示します。
@ -1269,9 +1310,9 @@ The `golang` module shows the currently installed version of [Golang](https://go
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"🐹 "` | A format string representing the symbol of Go. |
| `detect_extensions` | `["go"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["go.mod", "go.sum", "glide.yaml", "Gopkg.yml", "Gopkg.lock", ".go-version"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -1308,9 +1349,9 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["helmfile.yaml", "Chart.yaml"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
@ -1382,15 +1423,15 @@ The `java` module shows the currently installed version of [Java](https://www.or
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| `format` | `"via [${symbol}(${version} )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | モジュールのスタイルです。 |
| `disabled` | `false` | `java`モジュールを無効にします。 |
| `disabled` | `false` | `Java`モジュールを無効にします。 |
### 変数
@ -1417,7 +1458,7 @@ symbol = "🌟 "
::: warning
このモジュールは tcsh ではサポートされていません。
This module is not supported on tcsh and nu.
:::
@ -1462,9 +1503,9 @@ The `julia` module shows the currently installed version of [Julia](https://juli
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `detect_extensions` | `["jl"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["Project.toml", "Manifest.toml"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
@ -1493,29 +1534,29 @@ symbol = "∴ "
## Kotlin
The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
`kotlin`モジュールは、現在インストールされている[Kotlin](https://kotlinlang.org/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
- The current directory contains a `.kt` or a `.kts` file
- カレントディレクトリに`.kt`もしくは`.kts`ファイルが含まれている
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `detect_extensions` | `["kt", "kts"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. |
| `symbol` | `"🅺 "` | Kotlinのシンボルを表すフォーマット文字列 |
| `style` | `"bold blue"` | モジュールのスタイルです。 |
| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. |
| `kotlin_binary` | `"kotlin"` | Starshipがバージョンを取得するときに実行するkotlinバイナリを設定します。 |
| `disabled` | `false` | `kotlin`モジュールを無効にします。 |
### 変数
| 変数 | 設定例 | 説明 |
| --------- | --------- | ----------------------- |
| version | `v1.4.21` | The version of `kotlin` |
| --------- | --------- | ---------------------- |
| version | `v1.4.21` | `kotlin`のバージョン |
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
@ -1534,7 +1575,7 @@ symbol = "🅺 "
# ~/.config/starship.toml
[kotlin]
# Uses the Kotlin Compiler binary to get the installed version
# Kotlinコンパイラバイナリを使用してバージョンを確認する
kotlin_binary = "kotlinc"
```
@ -1588,8 +1629,8 @@ disabled = false
### オプション
| オプション | デフォルト | 説明 |
| ---------- | ------- | -------------------------------------- |
| `disabled` | `false` | `line_break` モジュールを無効にして、プロンプトを1行にします。 |
| ---------- | ------- | ------------------------------------- |
| `disabled` | `false` | `line_break`モジュールを無効にして、プロンプトを1行にします。 |
### 設定例
@ -1613,7 +1654,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | -------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. |
| `detect_extensions` | `["lua"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `[".lua-version"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -1643,14 +1684,13 @@ format = "via [🌕 $version](bold blue) "
## メモリ使用量
`memory_usage</ 0>モジュールは、現在のシステムメモリとスワップ使用量を示します。</p>
`memory_usage` モジュールは、現在のシステムメモリとスワップ使用量を示します。
<p spaces-before="0">デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。</p>
デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。
<p spaces-before="0">::: tip</p>
::: tip
<p spaces-before="0">このモジュールはデフォルトで無効になっています。
有効にするには、設定ファイルで<code>disabled`を`false`に設定します。
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
:::
@ -1737,9 +1777,9 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. |
| `detect_extensions` | `["nim", "nims", "nimble"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["nim.cfg"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -1821,7 +1861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `" "` | A format string representing the symbol of Node.js. |
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["package.json", ".node-version"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -1863,9 +1903,9 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
### オプション
| オプション | デフォルト | 説明 |
| ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------- |
| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. |
| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. |
| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. |
@ -1958,7 +1998,7 @@ symbol = "☁️ "
| `symbol` | `"📦 "` | パッケージのバージョンを表示する前に使用される記号です。 |
| `style` | `"bold 208"` | モジュールのスタイルです。 |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | `package` モジュールを無効にします。 |
| `disabled` | `false` | `package`モジュールを無効にします。 |
### 変数
@ -1992,9 +2032,9 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl |
| `detect_extensions` | `["pl", "pm", "pod"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -2030,9 +2070,9 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"🐘 "` | PHPのバージョンを表示する前に使用される記号です。 |
| `detect_extensions` | `["php"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["composer.json", ".php-version"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -2069,9 +2109,9 @@ The `purescript` module shows the currently installed version of [PureScript](ht
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
| `detect_extensions` | `["purs"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["spago.dhall"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -2121,7 +2161,7 @@ The `python` module shows the currently installed version of [Python](https://ww
| オプション | デフォルト | 説明 |
| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
| `style` | `"yellow bold"` | モジュールのスタイルです。 |
| `pyenv_version_name` | `false` | pyenvを使用してPythonバージョンを取得します |
@ -2202,9 +2242,9 @@ The `rlang` module shows the currently installed version of R. The module will b
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"📐"` | A format string representing the symbol of R. |
| `style` | `"blue bold"` | モジュールのスタイルです。 |
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | どの拡張子がこのモジュールをアクティブにするか |
@ -2238,9 +2278,9 @@ By default the `red` module shows the currently installed version of [Red](https
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"🔺 "` | A format string representing the symbol of Red. |
| `detect_extensions` | `["red"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか |
@ -2278,9 +2318,9 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
| `detect_extensions` | `["rb"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["Gemfile", ".ruby-version"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -2309,7 +2349,7 @@ symbol = "🔺 "
## Rust
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 次の条件のいずれかが満たされると、モジュールが表示されます。
デフォルトでは`rust`モジュールは現在インストールされている[Rust](https://www.rust-lang.org/)のバージョンを表示します。 次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`Cargo.toml`ファイルが含まれている
- カレントディレクトリに`.rs`の拡張子のファイルが含まれている
@ -2317,10 +2357,10 @@ By default the `rust` module shows the currently installed version of [Rust](htt
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"🦀 "` | Rustのシンボルを表すフォーマット文字列 |
| `detect_extensions` | `["rs"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["Cargo.toml"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
@ -2331,7 +2371,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| 変数 | 設定例 | 説明 |
| --------- | ----------------- | ---------------------- |
| version | `v1.43.0-nightly` | The version of `rustc` |
| version | `v1.43.0-nightly` | `rustc`のバージョン |
| symbol | | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
@ -2357,9 +2397,9 @@ The `scala` module shows the currently installed version of [Scala](https://www.
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- |
| ------------------- | ---------------------------------------- | ------------------------------------------------------ |
| `format` | `"via [${symbol}(${version} )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `detect_extensions` | `["sbt", "scala"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[".metals"]` | どのフォルダーがこのモジュールをアクティブにするか |
@ -2507,7 +2547,7 @@ The `status` module displays the exit code of the previous command. The module w
:::
::: warning This module is not supported on elvish shell. :::
::: warning This module is not supported on elvish and nu shell. :::
### オプション
@ -2564,9 +2604,9 @@ By default the `swift` module shows the currently installed version of [Swift](h
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"🐦 "` | A format string representing the symbol of Swift |
| `detect_extensions` | `["swift"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["Package.swift"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -2611,9 +2651,9 @@ By default the Terraform version is not shown, since this is slow for current ve
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"💠"` | A format string shown before the terraform workspace. |
| `detect_extensions` | `["tf", "hcl"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか |
@ -2752,9 +2792,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["Vagrantfile"]` | どのファイル名がこのモジュールをアクティブにするか |
@ -2856,9 +2896,9 @@ By default the the `zig` module shows the currently installed version of [Zig](h
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `zig` module. |

View File

@ -160,10 +160,10 @@
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
```
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
Starship自体を更新するには、上記のスクリプトを再度実行してください。 最新のバージョンに置き換わり、設定ファイルには変更を加えません。
**Note** - The defaults of the install script can be overridden see the built-in help.
**※**インストールスクリプトのデフォルト値は上書きすることができます。詳しくはヘルプを参照してください。
```sh
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 貢献
私たちは常に**すべてのスキルレベル**の貢献者を探しています! もし簡単にプロジェクトへ参加する方法をお探しなら、 [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue) に取り組んでみてください。

View File

@ -47,14 +47,14 @@ nix-env -iA nixos.starship
#### Declarative, single user, 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`ファイルで`programs.starship`を有効にして、設定を追加してください。
```nix
{
programs.starship = {
enable = true;
enableZshIntegration = true;
# Configuration written to ~/.config/starship.toml
# ~/.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
そして、次を実行してください
```sh
home-manager switch
@ -77,7 +77,7 @@ home-manager switch
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
`configuration.nix`で`environment.systemPackages`に`pkgs.starship`を追加して、次を実行してください
```sh
sudo nixos-rebuild switch

View File

@ -191,7 +191,7 @@ error_symbol = "[✖](bold red)"
以前は `show_sync_count` プロパティを使用して、 ブランチが先行またはリモートブランチの後ろにあるコミット数を表示するようにプロンプトを設定していました。
With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`.
v0.45.0からは、`ahead`、`behind`と`diverged`に分けて設定するように変更されました。
以前の `show_sync_count = true` 設定を使用するようにプロンプトを構成するには、次の設定ファイルを設定します。

View File

@ -6,7 +6,7 @@
このプリセットは、各モジュールに使用されるシンボル以外は何も変更しません。 絵文字が気に食わない場合、これはあなたの目を引くかもしれません!
![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png)
![Nerd Font Symbolsプリセットのスクリーンショット](/presets/nerd-font-symbols.png)
### 必要なもの
@ -90,15 +90,15 @@ symbol = "ﯣ "
## Bracketed Segments
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
このプリセットは付属のモジュール全てのフォーマットを変更し、デフォルトのStarshipの表示("via", "on", etc.)から、それぞれの情報を括弧で区分けするように変更します。
Before:
変更前:
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
![Starshipのデフォルト設定のスクリーンショット](/presets/bracketed-segments-before.png)
After:
変更後:
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
![Bracketed Segmentsプリセットのスクリーンショット](/presets/bracketed-segments-after.png)
### 設定
@ -241,15 +241,15 @@ format = '\[[$symbol($version)]($style)\]'
## Plain Text Symbols
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
このプリセットは記号をプレーンテキストに変更します。 あなたのターミナルのフォントでNerdFontsまたは絵文字が使えない場合は、これを試してみるといいかもしれません
Before (default setting with Fixedsys font):
変更前 (デフォルトの設定でFixedsysフォント):
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
![Fixedsysフォントを用いたStarshipのデフォルト設定のスクリーンショット](/presets/plain-text-symbols-before.png)
After (Plain Text Symbols):
変更後 (プレーンテキストの記号):
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
![Plain Text Symbolsプリセットのスクリーンショット](/presets/plain-text-symbols-after.png)
### 設定

View File

@ -138,3 +138,16 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -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

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 기여
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).

View File

@ -138,3 +138,16 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -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

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 Contributing
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).

View File

@ -138,3 +138,16 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -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

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 Contributing
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).

View File

@ -138,3 +138,16 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -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\] )`.
@ -174,7 +174,7 @@ O `formato` padrão é usado para definir o formato do prompt, se um valor vazio
```toml
format = "$all"
# Que é equivalente a
# Which is equivalent to
format = """
$username\
$hostname\
@ -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).
### Opções
@ -804,7 +805,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| Opções | Padrão | Descrição |
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | O formato do módulo. |
| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | O formato do módulo. |
| `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.
:::
### Opções
| Opções | Padrão | Descrição |
| --------------- | -------------------------------------------------------- | ---------------------------------- |
| `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) '` | O formato do módulo. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
| Variável | Exemplo | Descrição |
| ----------------- | ------- | ------------------------------------------- |
| 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
### Exemplo
```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. :::
### Opções

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 Contribuindo
Nós estamos sempre procurando contribuidores de **todos os níveis de conhecimento**! Se você está buscando um caminho mais fácil para começar no projeto, veja essas [boas issues para começar](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).

View File

@ -138,3 +138,16 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -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

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 Contributing
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).

View File

@ -138,3 +138,16 @@ description: Starship - минимальная, быстрая и бесконе
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -102,7 +102,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
Например:
- `(@$region)` ничего не будет показывать, если переменная `регион` в значении `None`, иначе `@` будет использовать значение этой переменной.
- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region.
- `(некоторый текст)` всегда не показывает ничего, поскольку в скобках нет переменных.
- Когда `$all` является ярлыком для `\[$a$b\]`, `($all)` будет показываться только если `$a` и `$b` не являются `None`. Это работает так же, как `(\[$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
Модуль `docker_context` показывает текущий активный [контекст Docker](https://docs.docker.com/engine/context/working-with-contexts/), если он не установлен как `default`.
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
### Опции
@ -804,7 +805,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| Параметр | По умолчанию | Описание |
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | Формат модуля. |
| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | Формат модуля. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `".NET "` | Символ перед отображением текущей версии dotnet. |
| `heuristic` | `true` | Использовать быстрое определение версии, для сохранения скорости. |
@ -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
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
:::
### Опции
| Параметр | По умолчанию | Описание |
| --------------- | -------------------------------------------------------- | ---------------------------------- |
| `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) '` | Формат модуля. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Переменные
| Переменная | Пример | Описание |
| ----------------- | ------ | ------------------------------------------- |
| 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` |
\*: Эта переменная может использоваться только в качестве части строки style
### Пример
```toml
# ~/.config/starship.toml
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
```
## Статус Git
Модуль `git_status` отображает символы, представляющие состояние репозитория в вашей текущей директории.
@ -1343,9 +1384,9 @@ format = "via [⎈ $version](bold white) "
### Опции
| Параметр | По умолчанию | Описание |
| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| ---------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `ssh_only` | `true` | Показывать имя хоста только при подключении к SSH-сессии. |
| `trim_at` | `"."` | Символы, по которую имя хоста будет сокращено после первого совпадения. `"."` остановится после первой точки. `""` отключит любое усечение |
| `trim_at` | `"."` | Строка, по которую имя хоста будет сокращено после первого совпадения. `"."` остановится после первой точки. `"` отключит любое усечение |
| `format` | `"[$hostname]($style) in "` | Формат модуля. |
| `style` | `"bold dimmed green"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `hostname`. |
@ -1416,7 +1457,7 @@ symbol = "🌟 "
::: warning
This module is not supported on tcsh.
This module is not supported on tcsh and nu.
:::
@ -2505,7 +2546,7 @@ The `status` module displays the exit code of the previous command. The module w
:::
::: warning This module is not supported on elvish shell. :::
::: warning This module is not supported on elvish and nu shell. :::
### Опции

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 Помощь
Мы всегда ищем помощь людей **всех уровней навыков**! Если вы хотите облегчить свой путь к проекту, посмотрите хорошие первые ошибки ([first good issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)).

View File

@ -138,3 +138,16 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -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
::: uyarı
`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
::: uyarı
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

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 Contributing
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).

View File

@ -138,3 +138,16 @@ eval $(starship init ion)
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -1,18 +1,18 @@
# Cấu hình nâng cao
Trong khi Starship là một shell linh hoạt, đôi khi bạn vẫn cần làm nhiều hơn là chỉnh sửa `starship.toml` để có thể là được những việc nhất định. Trang này chi tiết một vài cấu hình kĩ thuật nâng cao hơn được sử dụng trong starship.
Trong khi Starship là một shell linh hoạt, đôi khi bạn vẫn cần làm nhiều hơn là chỉnh sửa `starship.toml` để có thể là được những việc nhất định. Tài liệu này sẽ mô tả chi tiết các tùy chỉnh nâng cao trong starship.
::: cảnh báo
Các cấu hình trong phần này có thể thay đổi trong các bản phát hành Starship trong tương lai.
Các tùy chỉnh được mô tả trong phần này có thể sẽ thay đổi trong các phiên bản tương lai của Starship.
:::
## Tuỳ biến pre-prompt và pre-execution Commands trong Bash
## Tùy chỉnh các hàm được thực thi trước prompt và các lệnh Linux mặc định của bash shell
Bash không có một preexec/precmd framwork chính thống giống như các shells khác. Bởi vì điều này, nó là khó để cung cấp các hook cho việc tuỳ biến được đầy đủ trong `bash`. Tuy nhiên, Starship cung cấp cho bạn khả năng hạn chế để chèn các chức năng của riêng bạn vào trong thủ tục prompt-rendering:
Bash không có một preexec/precmd framework chính thống giống như các shells khác. Do đó rất khó để cung cấp các hook với khả năng tuỳ biến hoàn toàn cho `bash` shell. Tuy nhiên, Starship cho phép bạn viết các hàm riêng của bạn để tùy biến việc render prompt:
- Để chạy một hàm tuỳ biến trước khi prompt được vẽ ra, định nghĩa một hàm mới và sau đó gán tên của nó tới `starship_precmd_user_func`. Ví dụ, để vẽ một tên lửa trước prompt, bạn sẽ làm
- Để thực thi một hàm custom trước khi prompt được render, ta cần định nghĩa một hàm mới và gán `starship_precmd_user_func` cho tên của hàm này. Ví dụ, để vẽ một tên lửa trước prompt
```bash
function blastoff(){
@ -21,7 +21,7 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). 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.
- Để thực thi một hàm custom trước khi một câu lệnh Linux chạy, ta có thể sử dụng cơ chế bẫy tín hiệu [`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 bị ghi đè sau khi starship khởi động, một vài chức năng sẽ không hoạt động.
```bash
function blastoff(){
@ -31,11 +31,11 @@ trap blastoff DEBUG # Bẫy DEBUG *trước khi* starship chạy
eval $(starship init bash)
```
## Thay đổi tiêu đề của sổ
## Thay đổi tên gọi trên cửa sổ của chương trình terminal
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`.
Một vài shell có khả năng tự động thay đổi tên hiển thị (chẳng hạn như tên của thư mục hiện thời) trên cửa số của trình mô phỏng terminal. Fish shell mặc định thực hiện thay đổi này. Tuy không được set mặc định trên Starship, chức năng này có thể được tích hợp dễ dàng trên `bash` shell và `zsh` shell.
Đầ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):
Đầu tiên, ta cần định nghĩa một hàm thay đổi tiêu đề cửa sổ (dùng chung cho cả bash và zsh):
```bash
function set_win_title(){
@ -43,23 +43,23 @@ function set_win_title(){
}
```
Bạn có thể tuỳ biến để tuỳ biến tiêu đề này (`$USER`, `$HOSTNAME`, và `$PWD` là những lựa chọn phổ biến).
Ta có thể sử dụng biến số để tuỳ chỉnh tên hiển thị này (`$USER`, `$HOSTNAME`, và `$PWD` là những biến số thường được dùng).
Trong `bash`, thiết lập hàm này thành hàm precmd của starship:
Với `bash` shell, set precmd của starship bằng tên của hàm này:
```bash
starship_precmd_user_func="set_win_title"
```
Trong `zsh`, thêm cái này vào mảng `precmd_functions`:
Với `zsh` shell, thêm hàm này vào mảng `precmd_functions`:
```bash
precmd_functions+=(set_win_title)
```
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
Nếu ta hài lòng với các tùy biến đã được thiết lập, thêm những dòng sau vào cấu hình shell (`~/.bashrc` hoặc `~/.zshrc`) để thực thi chúng mỗi khi ta khởi tạo một shell mới.
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:
Ví dụ, nếu ta muốn hiển thị đường dẫn thư mục hiện tại trong tiêu đề của một terminal tab, thêm đoạn code sau vào `~/.bashrc` hoặc `~/.zshrc`:
```bash
function set_win_title(){

View File

@ -102,7 +102,7 @@ Một điều kiện định dạng chuỗi bọc trong `(` và `)` sẽ không
Ví dụ:
- `(@$region)` sẽ không hiển thị gì nếu biến `region``None`, ngược lại `@` theo sao bởi giá trị của region.
- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region.
- `(một vài văn bản)` sẽ không hiển thị thứ gì khi không có những biến bọc trong các dấu ngoặc.
- Khi `$all` là một shortcut cho `\[$a$b\]`, `($all)` sẽ không hiển thị chỉ khi `$a``$b` đều là `None`. Cái này làm việc giống như `(\[$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 @@ Mặc định, nó chỉ thay đổi màu. If you also want to change its shape
::: cảnh báo
`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
Mô đun `docker_context` hiển thị [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) hiện tại được kích hoạt nếu nó không được thiết lập `mặc định`.
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).
### Các tuỳ chọn
@ -804,7 +805,7 @@ Mô đun cũng sẽ hiện Target Framework Moniker (<https://docs.microsoft.com
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | Định dạng cho module. |
| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | Định dạng cho module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `".NET "` | Biểu tượng sử dụng để hiển thị trước phiên bản của dotnet. |
| `heuristic` | `true` | Sử dụng phiên bản phát hiện thông minh hơn. |
@ -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.
::: thử thuật
Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn.
:::
### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
| --------------- | -------------------------------------------------------- | ---------------------------------- |
| `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) '` | Định dạng cho module. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Các biến
| Biến | Ví dụ | Mô tả |
| ----------------- | ----- | ------------------------------------------- |
| 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` |
\*: Biến này có thể chỉ được sử dụng như một phần của style string
### Ví dụ
```toml
# ~/.config/starship.toml
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
```
## Git Status
Mô đun `git_status` hiển thị các biểu tượng đại diện cho trạng thái của repo trong thư mục hiện tại của bạn.
@ -1416,7 +1457,7 @@ symbol = "🌟 "
::: cảnh báo
Mô đun này không hỗ trợ trên tcsh.
This module is not supported on tcsh and nu.
:::
@ -2505,7 +2546,7 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế
:::
::: warning This module is not supported on elvish shell. :::
::: warning This module is not supported on elvish and nu shell. :::
### Các tuỳ chọn

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 Đóng góp
Chúng tôi luôn luôn tìm kiếm những cộng tác viên ở **tất cả các các mức độ về kĩ năng**! Nếu bạn đang tìm kiếm cách dễ dàng để tham gia vào dự án, thử một [good issue đầu tiên](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).

View File

@ -138,3 +138,16 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -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).
### 配置项
@ -804,7 +805,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| Option | 默认值 | 描述 |
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | 组件格式化模板。 |
| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | 组件格式化模板。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `".NET "` | 这个字段的内容会显示在当前 .NET 版本之前。 |
| `heuristic` | `true` | 使用更快的版本探测机制以保证 starship 的运行速度。 |
@ -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
此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`
:::
### 配置项
| Option | 默认值 | 描述 |
| --------------- | -------------------------------------------------------- | ---------------------------------- |
| `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) '` | 组件格式化模板。 |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
| 字段 | 示例 | 描述 |
| ----------------- | --- | ------------------------------------------- |
| 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
### 示例
```toml
# ~/.config/starship.toml
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
```
## Git Status
`git_status`组件通过相应的符号显示您当前目录中 git 仓库的状态。
@ -1416,7 +1457,7 @@ symbol = "🌟 "
::: warning
This module is not supported on tcsh.
This module is not supported on tcsh and nu.
:::
@ -2505,7 +2546,7 @@ The `status` module displays the exit code of the previous command. The module w
:::
::: warning This module is not supported on elvish shell. :::
::: warning This module is not supported on elvish and nu shell. :::
### 配置项

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 贡献
我们一直在寻找贡献者!你都可以参与贡献 ** 不论你的技能如何 **。 如果您希望快速为项目作出贡献,请尝试解决 [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)。

View File

@ -138,3 +138,16 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```

View File

@ -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).
### 選項
@ -804,7 +805,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| Option | 預設 | 說明 |
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `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 "` | 在顯示 dotnet 版本之前用的符號。 |
| `heuristic` | `true` | 使用更快速的版本偵測法來保持 starship 的速度。 |
@ -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
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
:::
### 選項
| Option | 預設 | 說明 |
| --------------- | -------------------------------------------------------- | ---------------------------------- |
| `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
| 變數 | 範例 | 說明 |
| ----------------- | --- | ------------------------------------------- |
| 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
### 範例
```toml
# ~/.config/starship.toml
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
```
## Git Status
`git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。
@ -1416,7 +1457,7 @@ symbol = "🌟 "
::: warning
This module is not supported on tcsh.
This module is not supported on tcsh and nu.
:::
@ -2505,7 +2546,7 @@ The `status` module displays the exit code of the previous command. The module w
:::
::: warning This module is not supported on elvish shell. :::
::: warning This module is not supported on elvish and nu shell. :::
### 選項

View File

@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 貢獻
我們歡迎具有**各式各樣能力**的貢獻者! 如果你正在尋找容易加入的方法,試試看標註為「[good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)」的 issue。