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,21 +1241,21 @@ 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
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 |
| Variable | Descripción |
| -------------- | ------------------------------------------------------- |
| `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`:
@ -1341,13 +1382,13 @@ 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 |
| `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`. |
| 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 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` | 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.
:::
@ -1585,9 +1626,9 @@ 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. |
| Opción | Por defecto | Descripción |
| ---------- | ----------- | ------------------------------------------------------------------------------- |
| `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"
```

File diff suppressed because it is too large Load Diff

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` отображает символы, представляющие состояние репозитория в вашей текущей директории.
@ -1342,13 +1383,13 @@ format = "via [⎈ $version](bold white) "
### Опции
| Параметр | По умолчанию | Описание |
| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `ssh_only` | `true` | Показывать имя хоста только при подключении к SSH-сессии. |
| `trim_at` | `"."` | Символы, по которую имя хоста будет сокращено после первого совпадения. `"."` остановится после первой точки. `""` отключит любое усечение |
| `format` | `"[$hostname]($style) in "` | Формат модуля. |
| `style` | `"bold dimmed green"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `hostname`. |
| Параметр | По умолчанию | Описание |
| ---------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `ssh_only` | `true` | Показывать имя хоста только при подключении к SSH-сессии. |
| `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。