+ nombre del host |
+ computadora` | El nombre de host de la computadora |
+| style\* | | Refleja el valor de la opción `style` |
+| ssh_symbol | `'🌏 '` | El símbolo a representar cuando está conectado a la sesión SSH |
*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo
-### Ejemplo
+### Ejemplos
+
+#### Mostrar siempre el nombre del host
```toml
# ~/.config/starship.toml
@@ -2138,6 +2241,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Ocultar el nombre de host en sesiones remotas de tmux
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
El módulo `java` muestra la versión instalada de [Java](https://www.oracle.com/java/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones:
@@ -2317,13 +2431,13 @@ symbol = '🅺 '
# ~/.config/starship.toml
[kotlin]
-# Uses the Kotlin Compiler binary to get the installed version
+# Utiliza el compilador binario Kotlink para obtener la versión instalada
kotlin_binary = 'kotlinc'
```
## Kubernetes
-Muestra el nombre actual del [contexto de Kubernetes](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) y, si se establece, el espacio de nombres, el usuario y el clúster del archivo kubeconfig. El espacio de nombres necesita establecerse en el archivo kubeconfig, esto puede hacerse mediante `kubectl config set-context starship-context --namespace astronaut`. Del mismo modo, el usuario y clúster pueden establecerse con `kubectl config set-context starship-context --user starship-user` y `kubectl config set-context starship-context --cluster starship-cluster`. Si se establece la variable de entorno `$KUBECONFIG`, el módulo usará eso si no usará el `~/.kube/config`.
+Muestra el nombre actual del [contexto de Kubernetes](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) y, si se establece, el espacio de nombres, el usuario y el clúster del archivo kubeconfig. El espacio de nombres necesita establecerse en el archivo kubeconfig, esto puede hacerse mediante `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. Si se establece la variable de entorno `$KUBECONFIG`, el módulo usará eso si no usará el `~/.kube/config`.
::: tip
@@ -2335,18 +2449,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### Opciones
+::: warning
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
| Opción | Predeterminado | Descripción |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------- |
| `symbol` | `'☸ '` | Una cadena de formato que representa el símbolo mostrado antes del Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | El formato del módulo. |
| `style` | `'cyan bold'` | El estilo del módulo. |
-| `context_aliases` | `{}` | Tabla de alias de contexto a mostrar. |
-| `user_aliases` | `{}` | Table of user aliases to display. |
+| `context_aliases`* | `{}` | Tabla de alias de contexto a mostrar. |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. |
| `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. |
+| `contextos` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Desactiva el módulo `kubernetes`. |
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| Variable | Descripción |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `style` | The style for the module when using this context. If not set, will use module's style. |
+| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### Variables
| Variable | Ejemplo | Descripción |
@@ -2368,13 +2504,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2519,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Busqueda por Regex
+#### Configuración específica del Contexto de Kubernetes
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-La expresión regular debe coincidir en todo el contexto de kube. los grupos de captura pueden ser referenciados usando `$name` y `$N` en el reemplazo. Esto está más explicado en la documentación del [crate regex](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace).
-
-Los nombres de cluster generados de forma larga y automática pueden ser identificados y abreviados usando expresiones regulares:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Salto de línea
@@ -2730,7 +2873,7 @@ El módulo `nodejs` muestra la versión instalada de [Node.js](https://nodejs.or
| `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`. |
-| `not_capable_style` | `bold red` | El estilo para el módulo cuando una propiedad de motores en package.json no coincide con la versión de Node.js. |
+| `not_capable_style` | `'bold red'` | El estilo para el módulo cuando una propiedad de motores en package.json no coincide con la versión de Node.js. |
### Variables
@@ -2890,8 +3033,8 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
| Opción | Predeterminado | Descripción |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | El formato del módulo. |
-| `style` | `"bold white"` | El estilo del módulo. |
+| `format` | `'[$symbol]($style)'` | El formato del módulo. |
+| `style` | `'bold white'` | El estilo del módulo. |
| `disabled` | `true` | Deshabilita el módulo `os`. |
| `símbolos` | | A table that maps each operating system to its symbol. |
@@ -2969,7 +3112,7 @@ disabled = false
[os.symbols]
Windows = " "
-Arch = "Arch is the best! "
+Arch = "Arch es lo mejor! "
```
## Package Version
@@ -2998,14 +3141,14 @@ El módulo `package` se muestra cuando el directorio actual es el repositorio de
### Opciones
-| Opción | Predeterminado | Descripción |
-| ----------------- | --------------------------------- | --------------------------------------------------------------------------------------- |
-| `format` | `'is [$symbol$version]($style) '` | El formato del módulo. |
-| `symbol` | `'📦 '` | El símbolo usado antes de mostrar la versión del paquete. |
-| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
-| `style` | `'bold 208'` | El estilo del módulo. |
-| `display_private` | `false` | Activar la visualización de la versión para los paquetes marcados como privados. |
-| `disabled` | `false` | Desactiva el módulo `package`. |
+| Opción | Predeterminado | Descripción |
+| ---------------- | --------------------------------- | --------------------------------------------------------------------------------------- |
+| `format` | `'is [$symbol$version]($style) '` | El formato del módulo. |
+| `symbol` | `'📦 '` | El símbolo usado antes de mostrar la versión del paquete. |
+| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
+| `style` | `'bold 208'` | El estilo del módulo. |
+| `'📦 '` | `false` | Activar la visualización de la versión para los paquetes marcados como privados. |
+| `disabled` | `false` | Desactiva el módulo `package`. |
### Variables
@@ -3023,7 +3166,7 @@ El módulo `package` se muestra cuando el directorio actual es el repositorio de
# ~/.config/starship.toml
[package]
-format = 'via [🎁 $version](208 bold) '
+format = 'vía [🎁 $version](208 bold) '
```
## Perl
@@ -3149,13 +3292,13 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes
### Variables
-| Variable | Ejemplo | Descripción |
-| --------- | ---------- | -------------------------------------- |
-| version | `v0.12.24` | La versión de `pulumi` |
-| stack | `dev` | La pila actual de Pulumi |
-| username | `alice` | El usuario actual de Pulumi |
-| symbol | | Refleja el valor de la opción `symbol` |
-| style\* | | Refleja el valor de la opción `style` |
+| Variable | Ejemplo | Descripción |
+| ----------------- | ---------- | -------------------------------------- |
+| version | `v0.12.24` | La versión de `pulumi` |
+| stack | `dev` | La pila actual de Pulumi |
+| nombre de usuario | `alice` | El usuario actual de Pulumi |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo
@@ -3245,7 +3388,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes
| `symbol` | `'🐍 '` | Una cadena de formato que representa el símbolo de Python |
| `style` | `'yellow bold'` | El estilo del módulo. |
| `pyenv_version_name` | `false` | Usar pyenv para obtener la versión de Python |
-| `pyenv_prefix` | `pyenv` | Prefijo antes de mostrar la versión de pyenv sólo se utiliza si se utiliza pyenv |
+| `pyenv_prefix` | `'pyenv'` | Prefijo antes de mostrar la versión de pyenv sólo se utiliza si se utiliza pyenv |
| `python_binary` | `['python', 'python3', 'python2']` | Configura los binarios de python que Starship debería ejecutar al obtener la versión. |
| `detect_extensions` | `['py']` | Qué extensiones deben activar este módulo |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Qué nombres de archivo deben activar este módulo |
@@ -3300,7 +3443,7 @@ detect_extensions = []
# ~/.config/starship.toml
[python]
-# Muestra la versión de python desde dentro de un entorno virtual local.
+# Muestra la versión de python dentro de un entorno virtual local.
#
# Ten en cuenta que esto solo funcionará cuando el venv esté dentro del proyecto y sólo
# funcionará en el directorio que contiene el directorio venv dir pero ¿tal vez esté bien?
@@ -3562,22 +3705,23 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
### Opciones
-| Opción | Predeterminado | Descripción |
-| ---------------------- | ------------------------- | ----------------------------------------------------------------------- |
-| `bash_indicator` | `'bsh'` | Una cadena de formato usada para representar bash. |
-| `fish_indicator` | `'fsh'` | Una cadena de formato usada para representar fish. |
-| `zsh_indicator` | `'zsh'` | Una cadena de formato usada para representar zsh. |
-| `powershell_indicator` | `'psh'` | Una cadena de formato usada para representar powershell. |
-| `ion_indicator` | `'ion'` | Una cadena de formato usada para representar ion. |
-| `elvish_indicator` | `'esh'` | Una cadena de formato usada para representar elvish. |
-| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
-| `xonsh_indicator` | `'xsh'` | Una cadena de formato usada para representar xonsh. |
-| `cmd_indicator` | `'cmd'` | Una cadena de formato usada para representar cmd. |
-| `nu_indicator` | `'nu'` | Una cadena de formato usada para representar nu. |
-| `unknown_indicator` | `''` | El valor por defecto que se mostrará cuando se desconoce el intérprete. |
-| `format` | `'[$indicator]($style) '` | El formato del módulo. |
-| `style` | `'white bold'` | El estilo del módulo. |
-| `disabled` | `true` | Deshabilita el módulo `shell`. |
+| Opción | Predeterminado | Descripción |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | Una cadena de formato usada para representar bash. |
+| `fish_indicator` | `'fsh'` | Una cadena de formato usada para representar fish. |
+| `zsh_indicator` | `'zsh'` | Una cadena de formato usada para representar zsh. |
+| `powershell_indicator` | `'psh'` | Una cadena de formato usada para representar powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | Una cadena de formato usada para representar ion. |
+| `elvish_indicator` | `'esh'` | Una cadena de formato usada para representar elvish. |
+| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
+| `xonsh_indicator` | `'xsh'` | Una cadena de formato usada para representar xonsh. |
+| `cmd_indicator` | `'cmd'` | Una cadena de formato usada para representar cmd. |
+| `nu_indicator` | `'nu'` | Una cadena de formato usada para representar nu. |
+| `unknown_indicator` | `''` | El valor por defecto que se mostrará cuando se desconoce el intérprete. |
+| `format` | `'[$indicator]($style) '` | El formato del módulo. |
+| `style` | `'white bold'` | El estilo del módulo. |
+| `disabled` | `true` | Deshabilita el módulo `shell`. |
### Variables
@@ -3694,14 +3838,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| Opción | Predeterminado | Descripción |
| ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | Qué extensiones deberían activar este módulo. |
+| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | Qué extensiones deberían activar este módulo. |
| `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
-| `style` | `"bold blue"` | El estilo del módulo. |
+| `style` | `'bold blue'` | El estilo del módulo. |
| `disabled` | `false` | Disables this module. |
### Variables
@@ -3857,7 +4001,7 @@ disabled = false
```
```toml
-# En Windows
+# On windows
# $HOME\.starship\config.toml
[sudo]
@@ -3901,7 +4045,7 @@ Por defecto, el módulo `swift` muestra la versión instalada de [Swift](https:/
# ~/.config/starship.toml
[swift]
-format = 'via [🏎 $version](red bold)'
+format = 'vía [🏎 $version](red bold)'
```
## Terraform
@@ -3945,7 +4089,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes
### Ejemplo
-#### Con la versión de Terraform
+#### Con Terraform Version
```toml
# ~/.config/starship.toml
@@ -3954,7 +4098,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes
format = '[🏎💨 $version$workspace]($style) '
```
-#### Sin la versión de Terraform
+#### Sin Terraform Version
```toml
# ~/.config/starship.toml
@@ -4009,6 +4153,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones:
+
+- El directorio actual contiene un archivo `template.typ`
+- The current directory contains any `*.typ` file
+
+### Opciones
+
+| Opción | Predeterminado | Descripción |
+| ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | El formato del módulo. |
+| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'t '` | A format string representing the symbol of Daml |
+| `style` | `'bold #0093A7'` | El estilo del módulo. |
+| `detect_extensions` | `['.typ']` | Qué extensiones deberían activar este módulo. |
+| `detect_files` | `['template.typ']` | Qué nombres de archivo deberían activar este módulo. |
+| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
+| `disabled` | `false` | Deshabilita el módulo `daml`. |
+
+### Variables
+
+| Variable | Ejemplo | Descripción |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| symbol | | Refleja el valor de la opción `symbol` |
+| style\* | | Refleja el valor de la opción `style` |
+
+*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo
+
## Username
El módulo `username` muestra el nombre de usuario activo. El módulo se mostrará si se cumplen alguna de las siguientes condiciones:
@@ -4283,7 +4460,7 @@ Si no se da el `shell` o solo contiene un elemento y Starship detecta PowerShell
shell = ['pwsh', '-Command', '-']
```
-::: warning Asegúrate de que tu configuración personalizada de shell salga con éxito
+::: warning Asegúrate de que tu configuración personalizada del intérprete de comandos salga con éxito
Si estableces un comando personalizado, asegúrate de que el intérprete de comandos por defecto usado por Starship ejecutará correctamente el comando con una salida elegante (a través de la opción `shell`).
diff --git a/docs/es-ES/faq/README.md b/docs/es-ES/faq/README.md
index e536bfb06..01c3d0369 100644
--- a/docs/es-ES/faq/README.md
+++ b/docs/es-ES/faq/README.md
@@ -120,3 +120,11 @@ Si Starship fue instalado usando el guión de instalación, el siguiente comando
# Localiza y elimina el binario de starship
sh -c 'rm "$(comando -v 'starship')"'
```
+
+## ¿Cómo instalo Starship sin `sudo`?
+
+El script de instalación del shell (`https://starship.rs/install.sh`) solo intenta usar `sudo` si el directorio de instalación no es escribible para el usuario actual. El directorio de instalación por defecto es el valor de la variable de entorno `$BIN_DIR` o `/usr/local/bin` si `$BIN_DIR` no está establecido. Si en su lugar establece el directorio de instalación a uno que tenga permisos de escritura para su usuario, deberías ser capaz de instalar starship sin `sudo`. Por ejemplo, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` usa la opción de línea de comando `b` del script de instalación para establecer el directorio de instalación a `~/.local/bin`.
+
+Para una instalación no interactiva de Starship, no te olvides de añadir la opción `y` para omitir la confirmación. Consulte la fuente del script de instalación para ver una lista de todas las opciones de instalación soportadas.
+
+Al usar el gestor de paquetes, vea la documentación de su gestor de paquetes acerca de instalación con o sin `sudo`.
diff --git a/docs/es-ES/guide/README.md b/docs/es-ES/guide/README.md
index 64c516b1d..055832e20 100644
--- a/docs/es-ES/guide/README.md
+++ b/docs/es-ES/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Sigue a @StarshipPrompt en Twitter"
/>
+
@@ -147,8 +152,6 @@
/>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
diff --git a/docs/es-ES/presets/README.md b/docs/es-ES/presets/README.md
index ad7a0c0ce..3a6e96f1b 100644
--- a/docs/es-ES/presets/README.md
+++ b/docs/es-ES/presets/README.md
@@ -60,6 +60,12 @@ Este preajuste está inspirado en [M365Princess](https://github.com/JanDeDobbele
## [Tokyo Night](./tokyo-night.md)
-This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
+Este preset está inspirado en [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
-[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+[![Captura del preset de Tokyo Night](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+Este preajuste está muy inspirado en [Pastel Powerline](./pastel-powerline.md) y [Tokyo Night](./tokyo-night.md).
+
+[![Captura de pantalla de el preajuste Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png "Clic para ver el preajuste Gruvbox Rainbow")](./gruvbox-rainbow)
diff --git a/docs/es-ES/presets/gruvbox-rainbow.md b/docs/es-ES/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..9999e353b
--- /dev/null
+++ b/docs/es-ES/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[Volver a Preajustes](./README.md#gruvbox-rainbow)
+
+# Preselección Gruvbox Rainbow
+
+Este preajuste está muy inspirado en [Pastel Powerline](./pastel-powerline.md) y [Tokyo Night](./tokyo-night.md).
+
+![Captura de pantalla del preajuste Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png)
+
+### Prerequisitos
+
+- Una [Nerd Font](https://www.nerdfonts.com/) instalada y habilitada en tu terminal
+
+### Configuración
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[Clic para descargar TOML](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/es-ES/presets/jetpack.md b/docs/es-ES/presets/jetpack.md
new file mode 100644
index 000000000..00381b80d
--- /dev/null
+++ b/docs/es-ES/presets/jetpack.md
@@ -0,0 +1,24 @@
+[Volver a Preajustes](./README.md#jetpack)
+
+# Preajust Jetpack
+
+Este es un preajuste pseudominimalista inspirado en las indicaciones [geometría](https://github.com/geometry-zsh/geometry) y [nave espacial](https://github.com/spaceship-prompt/spaceship-prompt).
+
+> Jetpack utiliza los colores temáticos de la terminal.
+
+![Captura de pantalla del preajuste Jetpack](/presets/img/jetpack.png)
+
+### Prerrequisito
+
+- Requiere un comando con [`la indicación correcta`](https://starship.rs/advanced-config/#enable-right-prompt).
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) es recomendado.
+
+### Configuración
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[Clic para descargar TOML](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/es-ES/presets/no-empty-icons.md b/docs/es-ES/presets/no-empty-icons.md
index b1af843f3..d6521cd46 100644
--- a/docs/es-ES/presets/no-empty-icons.md
+++ b/docs/es-ES/presets/no-empty-icons.md
@@ -1,8 +1,8 @@
-[Volver a Preajustes](./README.md#no-empty-icons)
+[Volver a las preselecciones](./README.md#no-empty-icons)
-# No Empty Icons Preset
+# Preselección de iconos no vacíos
-If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined.
+Si se identifican archivos del conjunto de herramientas, entonces se mostrara el ícono del conjunto de herramientas. If the toolset is not found to determine its version number, it is not displayed. La forma en la que se muestra el ícono depende de si la información del conjunto de herramientas puede ser determinada.
![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png)
diff --git a/docs/es-ES/presets/no-nerd-font.md b/docs/es-ES/presets/no-nerd-font.md
index f06a5d85a..4de7d4d2d 100644
--- a/docs/es-ES/presets/no-nerd-font.md
+++ b/docs/es-ES/presets/no-nerd-font.md
@@ -6,7 +6,7 @@ This preset restricts the use of symbols to those from emoji and powerline sets.
Esto significa que incluso sin una fuente Nerd instalada, debería ser capaz de ver todos los símbolos del módulo.
-This preset will become the default preset in a future release of starship.
+Este preset será el predeterminado en una futura versión de starship.
### Configuración
diff --git a/docs/es-ES/presets/tokyo-night.md b/docs/es-ES/presets/tokyo-night.md
index 95af84eaa..6218d6b06 100644
--- a/docs/es-ES/presets/tokyo-night.md
+++ b/docs/es-ES/presets/tokyo-night.md
@@ -2,11 +2,11 @@
# Tokyo Night Preset
-This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
+Este preset está inspirado en [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
-![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png)
+![Captura del preset de Tokyo Night](/presets/img/tokyo-night.png)
-### Prerequisitos
+### Prerrequisitos
- Una [Nerd Font](https://www.nerdfonts.com/) instalada y habilitada en tu terminal
diff --git a/docs/faq/README.md b/docs/faq/README.md
index 98ceb0ba6..977c7ae6c 100644
--- a/docs/faq/README.md
+++ b/docs/faq/README.md
@@ -144,3 +144,11 @@ If Starship was installed using the install script, the following command will d
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/fr-FR/advanced-config/README.md b/docs/fr-FR/advanced-config/README.md
index bb090d084..28cfcfd91 100644
--- a/docs/fr-FR/advanced-config/README.md
+++ b/docs/fr-FR/advanced-config/README.md
@@ -205,7 +205,7 @@ Certains shells peuvent gérer une invite de commande à droite, sur la même li
Note: l’invite à droite est une seule ligne, sur la même ligne que l’entrée. Pour aligner à droite les modules au-dessus de la ligne d’entrée d’une invite multiligne, voir le [module `fill`](/config/#fill).
-`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell.
+`right_format` est actuellement supporté pour les shells suivants : elvish, fish, zsh, xonsh, cmd, nushell.
### Exemple
diff --git a/docs/fr-FR/config/README.md b/docs/fr-FR/config/README.md
index 8ea280925..b31a0ed1d 100644
--- a/docs/fr-FR/config/README.md
+++ b/docs/fr-FR/config/README.md
@@ -206,6 +206,13 @@ Voici la liste des options de configuration globales de l'invite de commandes.
| `add_newline` | `true` | Insère une ligne vide entre les invites du shell. |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
+
+::: tip
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
### Exemple
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ Lorsque vous utilisez [AWSume](https://awsu.me) le profil est lu à partir de la
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### Options
| Option | Défaut | Description |
@@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform
| `region_aliases` | `{}` | Tableau des alias de région à afficher en plus du nom AWS. |
| `profile_aliases` | `{}` | Tableau des alias de profil à afficher en plus du nom AWS. |
| `style` | `'bold yellow'` | Le style pour le module. |
-| `expiration_symbol` | `X` | Le symbole est affiché lorsque les identifiants temporaires ont expiré. |
+| `expiration_symbol` | `'X'` | Le symbole est affiché lorsque les identifiants temporaires ont expiré. |
| `disabled` | `false` | Désactive le module `AWS`. |
| `force_display` | `false` | Si `true`, affiche les informations même si `credentials`, `credential_process` ou `sso_start_url` n'ont pas été configurées. |
@@ -620,17 +632,17 @@ Le module `c` affiche des informations à propos de votre compilateur C. Par dé
### Options
-| Option | Défaut | Description |
-| ------------------------------------ | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | La chaîne de format pour le module. |
-| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
-| `symbole` | `'C '` | Le symbole utilisé avant d’afficher les détails du compilateur |
-| `detect_extensionsdetect_extensions` | `['c', 'h']` | Les extensions qui déclenchent ce module. |
-| `detect_files` | `[]` | Les fichiers qui activent ce module. |
-| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | Comment détecter quel est le compilateur |
-| `style` | `'bold 149'` | Le style pour le module. |
-| `disabled` | `false` | Désactive le module `c`. |
+| Option | Défaut | Description |
+| ------------------------------------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | La chaîne de format pour le module. |
+| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
+| `symbole` | `'C '` | Le symbole utilisé avant d’afficher les détails du compilateur |
+| `detect_extensionsdetect_extensions` | `['c', 'h']` | Les extensions qui déclenchent ce module. |
+| `detect_files` | `[]` | Les fichiers qui activent ce module. |
+| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | Comment détecter quel est le compilateur |
+| `style` | `'bold 149'` | Le style pour le module. |
+| `disabled` | `false` | Désactive le module `c`. |
### Variables
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### Options
+
+| Option | Défaut | Description |
+| ------------------------------------ | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | Format du module. |
+| `symbole` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | Le style pour le module. |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensionsdetect_extensions` | `[]` | Les extensions qui déclenchent ce module. |
+| `detect_files` | `['.envrc']` | Les fichiers qui activent ce module. |
+| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### Variables
+
+| Variable | Exemple | Description |
+| --------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| symbole | | Reflète la valeur de l'option `symbol`. |
+| style\* | `red bold` | Reflète la valeur de l'option `style`. |
+
+*: Cette variable peut uniquement être utilisée dans une chaine de style
+
+### Exemple
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## Contexte Docker
Le module `docker_context` affiche le [context Docker](https://docs.docker.com/engine/context/working-with-contexts/) actif, si sa valeur est différente de `default` ou si les variables d’environnement `DOCKER_MACHINE_NAME`, `DOCKER_HOST` ou `DOCKER_CONTEXT` sont définies (puisqu’elles sont utilisées pour changer le contexte utilisé).
@@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
| `symbole` | `'🧅 '` | The symbol used before displaying the version of fennel. |
| `style` | `'bold green'` | Le style pour le module. |
-| `detect_extensionsdetect_extensions` | `[fnl]` | Les extensions qui déclenchent ce module. |
+| `detect_extensionsdetect_extensions` | `['fnl']` | Les extensions qui déclenchent ce module. |
| `detect_files` | `[]` | Les fichiers qui activent ce module. |
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
| `disabled` | `false` | Disables the `fennel` module. |
@@ -1524,11 +1577,46 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
+
+### Options
+
+| Option | Défaut | Description |
+| -------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
+| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Format du module. |
+| `added_style` | `'bold green'` | Le style pour le compte des ajouts. |
+| `deleted_style` | `'bold red'` | Le style pour le compte des suppressions. |
+| `only_nonzero_diffs` | `true` | Afficher le statut seulement pour les items modifiés. |
+| `disabled` | `true` | Disables the `fossil_metrics` module. |
+
+### Variables
+
+| Variable | Exemple | Description |
+| ----------------- | ------- | --------------------------------------------- |
+| added | `1` | Le nombre de lignes ajoutées |
+| deleted | `2` | Le nombre de lignes supprimées |
+| added_style\* | | Possède la valeur de l’option `added_style` |
+| deleted_style\* | | Possède la valeur de l’option `deleted_style` |
+
+*: Cette variable peut uniquement être utilisée dans une chaine de style
+
+### Exemple
+
+```toml
+# ~/.config/starship.toml
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
Le module `gcloud` affiche la version de la commande [`gcloud`](https://cloud.google.com/sdk/gcloud) installée. Ceci est basé sur les fichiers `~/.config/gcloud/active_config` et `~/.config/gcloud/configurations/config_{CONFIG NAME}` et la variable d'environnement `CLOUDSDK_CONFIG`.
-When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set.
+When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set.
### Options
@@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel
| Option | Défaut | Description |
| ---------- | -------------------------- | ------------------------------------------------------ |
| `format` | `'via [$symbol]($style) '` | Format du module. |
-| `symbole` | `"🐃 "` | A format string representing the symbol of guix-shell. |
-| `style` | `"yellow bold"` | Le style pour le module. |
+| `symbole` | `'🐃 '` | A format string representing the symbol of guix-shell. |
+| `style` | `'yellow bold'` | Le style pour le module. |
| `disabled` | `false` | Disables the `guix_shell` module. |
### Variables
@@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c
| Option | Défaut | Description |
| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ |
-| `format` | `"via [$symbol($version )]($style)"` | Format du module. |
-| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
-| `symbole` | `"🅶 "` | A format string representing the symbol of Gradle. |
-| `detect_extensionsdetect_extensions` | `["gradle", "gradle.kts"]` | Les extensions qui déclenchent ce module. |
+| `format` | `'via [$symbol($version )]($style)'` | Format du module. |
+| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
+| `symbole` | `'🅶 '` | A format string representing the symbol of Gradle. |
+| `detect_extensionsdetect_extensions` | `['gradle', 'gradle.kts']` | Les extensions qui déclenchent ce module. |
| `detect_files` | `[]` | Les fichiers qui activent ce module. |
-| `detect_folders` | `["gradle"]` | Les dossiers qui activent ce module. |
-| `style` | `"bold bright-cyan"` | Le style pour le module. |
+| `detect_folders` | `['gradle']` | Les dossiers qui activent ce module. |
+| `style` | `'bold bright-cyan'` | Le style pour le module. |
| `disabled` | `false` | Disables the `gradle` module. |
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
@@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| Option | Défaut | Description |
| ------------------------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
-| `format` | `"via [$symbol($version )]($style)"` | Format du module. |
-| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
-| `detect_extensionsdetect_extensions` | `["hx", "hxml"]` | Les extensions qui déclenchent ce module. |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Les fichiers qui activent ce module. |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Quels dossiers devraient activer ce module. |
-| `symbole` | `"⌘ "` | Une chaîne de format représentant le symbole de Helm. |
-| `style` | `"bold fg:202"` | Le style pour le module. |
+| `format` | `'via [$symbol($version )]($style)'` | Format du module. |
+| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
+| `detect_extensionsdetect_extensions` | `['hx', 'hxml']` | Les extensions qui déclenchent ce module. |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Les fichiers qui activent ce module. |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Quels dossiers devraient activer ce module. |
+| `symbole` | `'⌘ '` | Une chaîne de format représentant le symbole de Helm. |
+| `style` | `'bold fg:202'` | Le style pour le module. |
| `disabled` | `false` | Disables the `haxe` module. |
### Variables
@@ -2107,14 +2195,15 @@ Le module `hostname` affiche le nom d’hôte du système system.
### Options
-| Option | Défaut | Description |
-| ------------ | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `ssh_only` | `true` | Afficher uniquement le nom d'hôte lorsque vous êtes connecté à une session SSH. |
-| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
-| `trim_at` | `'.'` | Chaîne à laquelle le nom d'hôte est coupé, après la première correspondance. `'.'` will stop after the first dot. `''` will disable any truncation |
-| `format` | `'[$ssh_symbol$hostname]($style) in '` | Format du module. |
-| `style` | `'bold dimmed green'` | Le style pour le module. |
-| `disabled` | `false` | Désactive le module `hostname`. |
+| Option | Défaut | Description |
+| ----------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `ssh_only` | `true` | Afficher uniquement le nom d'hôte lorsque vous êtes connecté à une session SSH. |
+| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
+| `trim_at` | `'.'` | Chaîne à laquelle le nom d'hôte est coupé, après la première correspondance. `'.'` will stop after the first dot. `''` will disable any truncation. |
+| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
+| `format` | `'[$ssh_symbol$hostname]($style) in '` | Format du module. |
+| `style` | `'bold dimmed green'` | Le style pour le module. |
+| `disabled` | `false` | Désactive le module `hostname`. |
### Variables
@@ -2126,7 +2215,9 @@ Le module `hostname` affiche le nom d’hôte du système system.
*: Cette variable peut uniquement être utilisée dans une chaine de style
-### Exemple
+### Exemples
+
+#### Always show the hostname
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Hide the hostname in remote tmux sessions
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
Le module `java` affiche la version de [Java](https://www.oracle.com/java/) installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie:
@@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes
-Afficher le nom du [contexte Kubernetes](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) courant, et, si défini, l’espace de nom, l’utilisateur, et le cluster depuis le fichier kubeconfig. L'espace de noms doit être défini dans le fichier kubeconfig, ce qui peut être fait via `kubectl config set-context starship-cluster --namespace astronaut`. De même, l'utilisateur et l'instance peuvent être définies avec `kubectl config set-context starship-context --user starship-user` et `kubectl config set-context starship-context --cluster starship-cluster`. Si la variable d'environnement `$KUBECONFIG` est définie, le module l'utilisera, sinon il utilisera le fichier `~/.kube/config`.
+Afficher le nom du [contexte Kubernetes](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) courant, et, si défini, l’espace de nom, l’utilisateur, et le cluster depuis le fichier kubeconfig. L'espace de noms doit être défini dans le fichier kubeconfig, ce qui peut être fait via `kubectl config set-context starship-cluster --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. Si la variable d'environnement `$KUBECONFIG` est définie, le module l'utilisera, sinon il utilisera le fichier `~/.kube/config`.
::: tip
@@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### Options
+::: warning
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
| Option | Défaut | Description |
| ------------------------------------ | ---------------------------------------------------- | ---------------------------------------------------------------------- |
| `symbole` | `'☸ '` | Une chaîne de format représentant le symbole affiché avant le Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Format du module. |
| `style` | `'cyan bold'` | Le style pour le module. |
-| `context_aliases` | `{}` | Tableau des alias de contexte à afficher. |
-| `user_aliases` | `{}` | Table of user aliases to display. |
+| `context_aliases`* | `{}` | Tableau des alias de contexte à afficher. |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensionsdetect_extensions` | `[]` | Les extensions qui déclenchent ce module. |
| `detect_files` | `[]` | Les fichiers qui activent ce module. |
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
+| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Désactiver le module `kubernetes`. |
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| Variable | Description |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `style` | The style for the module when using this context. If not set, will use module's style. |
+| `symbole` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### Variables
| Variable | Exemple | Description |
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Filtrage par regex
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-L’expression rationnelle doit correspondre au contexte kube entier, et des groupes de capture peuvent être référencés en utilisant `$name` et `$N` dans la valeur de remplacement. Ceci est expliqué plus en détails dans la documentation de [la crate regex](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace).
-
-Les noms de cluster long ou générés automatiquement peuvent être identifiés et raccourcis en utilisant des expressions rationnelles:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Saut de ligne
@@ -2730,7 +2861,7 @@ Le module `nodejs` affiche la version de [Node.js](https://nodejs.org/) install
| `detect_folders` | `['node_modules']` | Les dossiers qui activent ce module. |
| `style` | `'bold green'` | Le style pour le module. |
| `disabled` | `false` | Désactive le module `nodejs`. |
-| `not_capable_style` | `bold red` | Le style du module quand une propriété engines dans le package.json ne correspond pas à la version Node.js. |
+| `not_capable_style` | `'bold red'` | Le style du module quand une propriété engines dans le package.json ne correspond pas à la version Node.js. |
### Variables
@@ -2890,8 +3021,8 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
| Option | Défaut | Description |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | Format du module. |
-| `style` | `"bold white"` | Le style pour le module. |
+| `format` | `'[$symbol]($style)'` | Format du module. |
+| `style` | `'bold white'` | Le style pour le module. |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -3245,7 +3376,7 @@ Par défaut, le module sera affiché si l’une de ces conditions est remplie:
| `symbole` | `'🐍 '` | Une chaîne de caractères représentant le symbole de Python |
| `style` | `'yellow bold'` | Le style pour le module. |
| `pyenv_version_name` | `false` | Utiliser pyenv pour obtenir la version de Python |
-| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used |
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
| `detect_extensionsdetect_extensions` | `['py']` | Les extensions qui déclenchent ce module |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Quels fichiers devraient activer ce module |
@@ -3563,22 +3694,23 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
### Options
-| Option | Défaut | Description |
-| ---------------------- | ------------------------- | ----------------------------------------------------------- |
-| `bash_indicator` | `'bsh'` | Chaine de formatage utilisée pour représenter bash. |
-| `fish_indicator` | `'fsh'` | Chaine de formatage utilisée pour représenter fish. |
-| `zsh_indicator` | `'zsh'` | Chaine de formatage utilisée pour représenter zsh. |
-| `powershell_indicator` | `'psh'` | Chaine de formatage utilisée pour représenter powershell. |
-| `ion_indicator` | `'ion'` | Chaine de formatage utilisée pour représenter ion. |
-| `elvish_indicator` | `'esh'` | Chaine de formatage utilisée pour représenter elvish. |
-| `tcsh_indicator` | `'tsh'` | Chaine de formatage utilisée pour représenter tcsh. |
-| `xonsh_indicator` | `'xsh'` | Chaine de formatage utilisée pour représenter xonsh. |
-| `cmd_indicator` | `'cmd'` | Chaine de formatage utilisée pour représenter cmd. |
-| `nu_indicator` | `'nu'` | Chaine de formatage utilisée pour représenter nu. |
-| `unknown_indicator` | `''` | La valeur par défaut à afficher quand le shell est inconnu. |
-| `format` | `'[$indicator]($style) '` | Format du module. |
-| `style` | `'white bold'` | Le style pour le module. |
-| `disabled` | `true` | Désactive le module `shell`. |
+| Option | Défaut | Description |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | Chaine de formatage utilisée pour représenter bash. |
+| `fish_indicator` | `'fsh'` | Chaine de formatage utilisée pour représenter fish. |
+| `zsh_indicator` | `'zsh'` | Chaine de formatage utilisée pour représenter zsh. |
+| `powershell_indicator` | `'psh'` | Chaine de formatage utilisée pour représenter powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | Chaine de formatage utilisée pour représenter ion. |
+| `elvish_indicator` | `'esh'` | Chaine de formatage utilisée pour représenter elvish. |
+| `tcsh_indicator` | `'tsh'` | Chaine de formatage utilisée pour représenter tcsh. |
+| `xonsh_indicator` | `'xsh'` | Chaine de formatage utilisée pour représenter xonsh. |
+| `cmd_indicator` | `'cmd'` | Chaine de formatage utilisée pour représenter cmd. |
+| `nu_indicator` | `'nu'` | Chaine de formatage utilisée pour représenter nu. |
+| `unknown_indicator` | `''` | La valeur par défaut à afficher quand le shell est inconnu. |
+| `format` | `'[$indicator]($style) '` | Format du module. |
+| `style` | `'white bold'` | Le style pour le module. |
+| `disabled` | `true` | Désactive le module `shell`. |
### Variables
@@ -3695,14 +3827,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| Option | Défaut | Description |
| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ |
-| `format` | `"via [$symbol($version )]($style)"` | Format du module. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
-| `symbole` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensionsdetect_extensions` | `["sol"]` | Les extensions qui déclenchent ce module. |
+| `format` | `'via [$symbol($version )]($style)'` | Format du module. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
+| `symbole` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensionsdetect_extensions` | `['sol']` | Les extensions qui déclenchent ce module. |
| `detect_files` | `[]` | Les fichiers qui activent ce module. |
| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
-| `style` | `"bold blue"` | Le style pour le module. |
+| `style` | `'bold blue'` | Le style pour le module. |
| `disabled` | `false` | Disables this module. |
### Variables
@@ -4010,6 +4142,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+Par défaut, le module sera affiché si l’une de ces conditions est remplie:
+
+- Le dossier courant contient un fichier `template.typ`
+- The current directory contains any `*.typ` file
+
+### Options
+
+| Option | Défaut | Description |
+| ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------ |
+| `format` | `'via [$symbol($version )]($style)'` | Format du module. |
+| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
+| `symbole` | `'t '` | A format string representing the symbol of Daml |
+| `style` | `'bold #0093A7'` | Le style pour le module. |
+| `detect_extensionsdetect_extensions` | `['.typ']` | Les extensions qui déclenchent ce module. |
+| `detect_files` | `['template.typ']` | Les fichiers qui activent ce module. |
+| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
+| `disabled` | `false` | Disables the `daml` module. |
+
+### Variables
+
+| Variable | Exemple | Description |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| symbole | | Reflète la valeur de l'option `symbol` |
+| style\* | | Reflète la valeur de l'option `style` |
+
+*: Cette variable peut uniquement être utilisée dans une chaine de style
+
## Nom d'utilisateur
Le module `username` affiche le nom de l’utilisateur actif. Le module sera affiché si l'une de ces conditions est remplie:
diff --git a/docs/fr-FR/faq/README.md b/docs/fr-FR/faq/README.md
index 65066f8fa..c7b201be8 100644
--- a/docs/fr-FR/faq/README.md
+++ b/docs/fr-FR/faq/README.md
@@ -80,7 +80,7 @@ env STARSHIP_LOG=trace starship timings
Cela affichera le journal de suivi et un détail de tous les modules qui ont soit pris plus d’1ms pour s’exécuter, soit affiché quelque chose.
-Finally if you find a bug you can use the `bug-report` command to create a GitHub issue.
+Enfin, si vous trouvez un bug, vous pouvez utiliser la commande `bug-report` pour créer un ticket sur GitHub.
```sh
starship bug-report
@@ -120,3 +120,11 @@ Si Starship a été installé en utilisant le script d'installation, la commande
# Trouver et supprimer le binaire starship
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/fr-FR/guide/README.md b/docs/fr-FR/guide/README.md
index 630645be0..810104794 100644
--- a/docs/fr-FR/guide/README.md
+++ b/docs/fr-FR/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Suivez @StarshipPrompt sur Twitter"
/>
+
@@ -147,8 +152,6 @@
/>
-[![Bannière StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
@@ -277,7 +281,7 @@ Configurez votre shell pour initialiser starship. Sélectionnez le vôtre dans l
Bash
-Ajoutez ce qui suit à la fin de `~/.bashrc`:
+Ajouter ce qui suit à la fin de `~/.bashrc`:
```sh
eval "$(starship init bash)"
@@ -312,7 +316,7 @@ Note: Seul Elvish v0.18+ est supporté
Fish
-Ajoutez le code suivant à la fin de `~/.config/fish/config.fish`:
+Ajoute ce qui suit à la fin de `~/.config/fish/config.fish`:
```fish
starship init fish | source
@@ -323,7 +327,7 @@ starship init fish | source
Ion
-Ajoutez ce qui suit à la fin de `~/.config/ion/initrc`:
+Ajouter ce qui suit à la fin de `~/.config/ion/initrc`:
```sh
eval $(starship init ion)
@@ -387,7 +391,7 @@ execx($(starship init xonsh))
Zsh
-Ajoutez ce qui suit à la fin de `~/.zshrc`:
+Ajouter ce qui suit à la fin de `~/.zshrc`:
```sh
eval "$(starship init zsh)"
diff --git a/docs/fr-FR/presets/README.md b/docs/fr-FR/presets/README.md
index efcf80615..11b18e528 100644
--- a/docs/fr-FR/presets/README.md
+++ b/docs/fr-FR/presets/README.md
@@ -63,3 +63,9 @@ Ce préréglage s'inspire de [M365Princess](https://github.com/JanDeDobbeleer/oh
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow)
diff --git a/docs/fr-FR/presets/gruvbox-rainbow.md b/docs/fr-FR/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..1ea4af7f6
--- /dev/null
+++ b/docs/fr-FR/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[Retourner aux préréglages](./README.md#gruvbox-rainbow)
+
+# Gruvbox Rainbow Preset
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png)
+
+### Pré-requis
+
+- Une [Nerd Font](https://www.nerdfonts.com/) est installée et activée dans votre terminal
+
+### Configuration
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[Cliquez pour télécharger le TOML](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/fr-FR/presets/jetpack.md b/docs/fr-FR/presets/jetpack.md
new file mode 100644
index 000000000..930d974e6
--- /dev/null
+++ b/docs/fr-FR/presets/jetpack.md
@@ -0,0 +1,24 @@
+[Retourner aux préréglages](./README.md#jetpack)
+
+# Jetpack Preset
+
+This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
+
+> Jetpack uses the terminal's color theme.
+
+![Screenshot of Jetpack preset](/presets/img/jetpack.png)
+
+### Prerequisite
+
+- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
+
+### Configuration
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[Cliquez pour télécharger le TOML](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/id-ID/config/README.md b/docs/id-ID/config/README.md
index ed2b8180a..7fa086e06 100644
--- a/docs/id-ID/config/README.md
+++ b/docs/id-ID/config/README.md
@@ -206,6 +206,13 @@ Berikut adalah opsi konfigurasi dari list yang bersifat prompt-wide.
| `add_newline` | `true` | Memasukkan baris kosong antara prompt shell. |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
+
+::: tip
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
### Contoh
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ Ketika menggunakan [AWSume](https://awsu.me) profil dibaca dari variabel environ
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### Opsi
| Opsi | Bawaan | Deskripsi |
@@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform
| `region_aliases` | `{}` | Tabel alias dari region yang ditampilan selain nama AWS. |
| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. |
| `style` | `'bold yellow'` | Gaya penataan untuk modul. |
-| `expiration_symbol` | `X` | Simbol ditampilkan ketika temporer kredensial telah kedaluwarsa. |
+| `expiration_symbol` | `'X'` | Simbol ditampilkan ketika temporer kredensial telah kedaluwarsa. |
| `disabled` | `false` | Menonaktifkan modul `AWS`. |
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
@@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu
### Opsi
-| Opsi | Bawaan | Deskripsi |
-| ------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
-| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'C '` | The symbol used before displaying the compiler details |
-| `detect_extensions` | `['c', 'h']` | Ekstensi mana yang sebaiknya memicu modul ini. |
-| `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. |
-| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is |
-| `style` | `'bold 149'` | Gaya penataan untuk modul. |
-| `disabled` | `false` | Disables the `c` module. |
+| Opsi | Bawaan | Deskripsi |
+| ------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
+| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'C '` | The symbol used before displaying the compiler details |
+| `detect_extensions` | `['c', 'h']` | Ekstensi mana yang sebaiknya memicu modul ini. |
+| `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. |
+| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is |
+| `style` | `'bold 149'` | Gaya penataan untuk modul. |
+| `disabled` | `false` | Disables the `c` module. |
### Variabel
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### Opsi
+
+| Opsi | Bawaan | Deskripsi |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | Format dari modul. |
+| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | Gaya penataan untuk modul. |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. |
+| `detect_files` | `['.envrc']` | filenames mana yang sebaiknya memicu modul ini. |
+| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### Variabel
+
+| Variabel | Contoh | Deskripsi |
+| --------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| symbol | | Menyalin nilai dari opsi `symbol`. |
+| style\* | `red bold` | Menyalin nilai dari opsi `style`. |
+
+*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string
+
+### Contoh
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## 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` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
@@ -1393,7 +1446,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
| Opsi | Bawaan | Deskripsi |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version )]($style)'` | Format dari modul. |
+| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. |
| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
| `symbol` | `' '` | The symbol used before displaying the version of erlang. |
| `style` | `'bold red'` | Gaya penataan untuk modul. |
@@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. |
| `style` | `'bold green'` | Gaya penataan untuk modul. |
-| `detect_extensions` | `[fnl]` | Ekstensi mana yang sebaiknya memicu modul ini. |
+| `detect_extensions` | `['fnl']` | Ekstensi mana yang sebaiknya memicu modul ini. |
| `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. |
| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. |
| `disabled` | `false` | Disables the `fennel` module. |
@@ -1524,11 +1577,46 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
+
+### Opsi
+
+| Opsi | Bawaan | Deskripsi |
+| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
+| `fromat` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Format dari modul. |
+| `added_style` | `'bold green'` | The style for the added count. |
+| `deleted_style` | `'bold red'` | The style for the deleted count. |
+| `only_nonzero_diffs` | `true` | Render status only for changed items. |
+| `disabled` | `true` | Disables the `fossil_metrics` module. |
+
+### Variabel
+
+| Variabel | Contoh | Deskripsi |
+| ----------------- | ------ | ------------------------------------------- |
+| 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` |
+
+*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string
+
+### Contoh
+
+```toml
+# ~/.config/starship.toml
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
-When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set.
+When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set.
### Opsi
@@ -1775,7 +1863,7 @@ The Git Status module is very slow in Windows directories (for example under `/m
| Opsi | Bawaan | Deskripsi |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
-| `fromat` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
+| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
| `conflicted` | `'='` | This branch has merge conflicts. |
| `ahead` | `'⇡'` | The format of `ahead` |
| `behind` | `'⇣'` | The format of `behind` |
@@ -1930,9 +2018,9 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel
| Opsi | Bawaan | Deskripsi |
| ---------- | -------------------------- | ------------------------------------------------------ |
-| `format` | `'via [$symbol]($style) '` | Format dari modul. |
-| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. |
-| `style` | `"yellow bold"` | Gaya penataan untuk modul. |
+| `fromat` | `'via [$symbol]($style) '` | Format dari modul. |
+| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. |
+| `style` | `'yellow bold'` | Gaya penataan untuk modul. |
| `disabled` | `false` | Disables the `guix_shell` module. |
### Variabel
@@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c
| Opsi | Bawaan | Deskripsi |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | Format dari modul. |
-| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. |
-| `detect_extensions` | `["gradle", "gradle.kts"]` | Ekstensi mana yang sebaiknya memicu modul ini. |
+| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. |
+| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. |
+| `detect_extensions` | `['gradle', 'gradle.kts']` | Ekstensi mana yang sebaiknya memicu modul ini. |
| `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. |
-| `detect_folders` | `["gradle"]` | Folder mana yang sebaiknya memicul modul ini. |
-| `style` | `"bold bright-cyan"` | Gaya penataan untuk modul. |
+| `detect_folders` | `['gradle']` | Folder mana yang sebaiknya memicul modul ini. |
+| `style` | `'bold bright-cyan'` | Gaya penataan untuk modul. |
| `disabled` | `false` | Disables the `gradle` module. |
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
@@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| Opsi | Bawaan | Deskripsi |
| ------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
-| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. |
-| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
-| `detect_extensions` | `["hx", "hxml"]` | Ekstensi mana yang sebaiknya memicu modul ini. |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | filenames mana yang sebaiknya memicu modul ini. |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Folder mana yang sebaiknya memicul modul ini. |
-| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. |
-| `style` | `"bold fg:202"` | Gaya penataan untuk modul. |
+| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. |
+| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
+| `detect_extensions` | `['hx', 'hxml']` | Ekstensi mana yang sebaiknya memicu modul ini. |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | filenames mana yang sebaiknya memicu modul ini. |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Folder mana yang sebaiknya memicul modul ini. |
+| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. |
+| `style` | `'bold fg:202'` | Gaya penataan untuk modul. |
| `disabled` | `false` | Disables the `haxe` module. |
### Variabel
@@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname.
### Opsi
-| Opsi | Bawaan | Deskripsi |
-| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
-| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
-| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
-| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation |
-| `fromat` | `'[$ssh_symbol$hostname]($style) in '` | Format dari modul. |
-| `style` | `'bold dimmed green'` | Gaya penataan untuk modul. |
-| `disabled` | `false` | Disables the `hostname` module. |
+| Opsi | Bawaan | Deskripsi |
+| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
+| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
+| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
+| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. |
+| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
+| `fromat` | `'[$ssh_symbol$hostname]($style) in '` | Format dari modul. |
+| `style` | `'bold dimmed green'` | Gaya penataan untuk modul. |
+| `disabled` | `false` | Disables the `hostname` module. |
### Variabel
@@ -2128,6 +2217,8 @@ The `hostname` module shows the system hostname.
### Contoh
+#### Always show the hostname
+
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Hide the hostname in remote tmux sessions
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi:
@@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes
-Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
+Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
::: tip
@@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### Opsi
+::: warning
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
| Opsi | Bawaan | Deskripsi |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. |
| `fromat` | `'[$symbol$context( \($namespace\))]($style) in '` | Format dari modul. |
| `style` | `'cyan bold'` | Gaya penataan untuk modul. |
-| `context_aliases` | `{}` | Table of context aliases to display. |
-| `user_aliases` | `{}` | Table of user aliases to display. |
+| `context_aliases`* | `{}` | Table of context aliases to display. |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. |
| `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. |
| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. |
+| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. |
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| Variabel | Deskripsi |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `style` | The style for the module when using this context. If not set, will use module's style. |
+| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### Variabel
| Variabel | Contoh | Deskripsi |
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Regex Matching
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
-
-Long and automatically generated cluster names can be identified and shortened using regular expressions:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Line Break
@@ -2637,7 +2768,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
| Opsi | Bawaan | Deskripsi |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version )]($style)'` | Format dari modul |
+| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul |
| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. |
| `detect_extensions` | `['nim', 'nims', 'nimble']` | Ekstensi mana yang sebaiknya memicu modul ini. |
@@ -2674,7 +2805,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
| Opsi | Bawaan | Deskripsi |
| ------------- | ---------------------------------------------- | --------------------------------------------------------------------- |
-| `format` | `'via [$symbol$state( \($name\))]($style) '` | Format dari modul. |
+| `fromat` | `'via [$symbol$state( \($name\))]($style) '` | Format dari modul. |
| `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. |
| `style` | `'bold blue'` | Gaya penataan untuk modul. |
| `impure_msg` | `'impure'` | A format string shown when the shell is impure. |
@@ -2722,7 +2853,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| Opsi | Bawaan | Deskripsi |
| ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version )]($style)'` | Format dari modul. |
+| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. |
| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
| `symbol` | `' '` | A format string representing the symbol of Node.js. |
| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Ekstensi mana yang sebaiknya memicu modul ini. |
@@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| `detect_folders` | `['node_modules']` | Folder mana yang sebaiknya memicul modul ini. |
| `style` | `'bold green'` | Gaya penataan untuk modul. |
| `disabled` | `false` | Disables the `nodejs` module. |
-| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. |
+| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. |
### Variabel
@@ -2767,7 +2898,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| Opsi | Bawaan | Deskripsi |
| ------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. |
+| `fromat` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. |
| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. |
| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. |
@@ -2807,7 +2938,7 @@ The `opa` module shows the currently installed version of the OPA tool. By defau
| Opsi | Bawaan | Deskripsi |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version )]($style)'` | Format dari modul. |
+| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. |
| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. |
| `detect_extensions` | `['rego']` | Ekstensi mana yang sebaiknya memicu modul ini. |
@@ -2843,7 +2974,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| Opsi | Bawaan | Deskripsi |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
-| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | Format dari modul. |
+| `fromat` | `'on [$symbol$cloud(\($project\))]($style) '` | Format dari modul. |
| `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `'bold yellow'` | Gaya penataan untuk modul. |
| `disabled` | `false` | Disables the `openstack` module. |
@@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Opsi | Bawaan | Deskripsi |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | Format dari modul. |
-| `style` | `"bold white"` | Gaya penataan untuk modul. |
+| `fromat` | `'[$symbol]($style)'` | Format dari modul. |
+| `style` | `'bold white'` | Gaya penataan untuk modul. |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -3000,7 +3131,7 @@ The `package` module is shown when the current directory is the repository for a
| Opsi | Bawaan | Deskripsi |
| ----------------- | --------------------------------- | ----------------------------------------------------------------------------------- |
-| `format` | `'is [$symbol$version]($style) '` | Format dari modul. |
+| `fromat` | `'is [$symbol$version]($style) '` | Format dari modul. |
| `symbol` | `'📦 '` | The symbol used before displaying the version the package. |
| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
| `style` | `'bold 208'` | Gaya penataan untuk modul. |
@@ -3040,7 +3171,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe
| Opsi | Bawaan | Deskripsi |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. |
+| `fromat` | `'via [$symbol($version )]($style)'` | The format string for the module. |
| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl |
| `detect_extensions` | `['pl', 'pm', 'pod']` | Ekstensi mana yang sebaiknya memicu modul ini. |
@@ -3245,7 +3376,7 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi:
| `symbol` | `'🐍 '` | A format string representing the symbol of Python |
| `style` | `'yellow bold'` | Gaya penataan untuk modul. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
-| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used |
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
| `detect_extensions` | `['py']` | Ekstensi mana yang sebaiknya memicu modul ini |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | filenames mana yang sebaiknya memicu modul ini |
@@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Opsi
-| Opsi | Bawaan | Deskripsi |
-| ---------------------- | ------------------------- | ------------------------------------------------------------ |
-| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
-| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
-| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
-| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
-| `ion_indicator` | `'ion'` | A format string used to represent ion. |
-| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
-| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
-| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
-| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
-| `nu_indicator` | `'nu'` | A format string used to represent nu. |
-| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
-| `fromat` | `'[$indicator]($style) '` | Format dari modul. |
-| `style` | `'white bold'` | Gaya penataan untuk modul. |
-| `disabled` | `true` | Disables the `shell` module. |
+| Opsi | Bawaan | Deskripsi |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
+| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
+| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
+| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | A format string used to represent ion. |
+| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
+| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
+| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
+| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
+| `nu_indicator` | `'nu'` | A format string used to represent nu. |
+| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
+| `fromat` | `'[$indicator]($style) '` | Format dari modul. |
+| `style` | `'white bold'` | Gaya penataan untuk modul. |
+| `disabled` | `true` | Disables the `shell` module. |
### Variabel
@@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| Opsi | Bawaan | Deskripsi |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- |
-| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | Ekstensi mana yang sebaiknya memicu modul ini. |
+| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | Ekstensi mana yang sebaiknya memicu modul ini. |
| `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. |
| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. |
-| `style` | `"bold blue"` | Gaya penataan untuk modul. |
+| `style` | `'bold blue'` | Gaya penataan untuk modul. |
| `disabled` | `false` | Disables this module. |
### Variabel
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+By default, the module will be shown if any of the following conditions are met:
+
+- Direktori ini memiliki berkas `template.typ`
+- The current directory contains any `*.typ` file
+
+### Opsi
+
+| Opsi | Bawaan | Deskripsi |
+| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- |
+| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. |
+| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'t '` | A format string representing the symbol of Daml |
+| `style` | `'bold #0093A7'` | Gaya penataan untuk modul. |
+| `detect_extensions` | `['.typ']` | Ekstensi mana yang sebaiknya memicu modul ini. |
+| `detect_files` | `['template.typ']` | filenames mana yang sebaiknya memicu modul ini. |
+| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. |
+| `disabled` | `false` | Disables the `daml` module. |
+
+### Variabel
+
+| Variabel | Contoh | Deskripsi |
+| ------------- | -------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `bawaan` | The current Typst version |
+| symbol | | Menyalin nilai dari opsi `symbol` |
+| style\* | | Menyalin nilai dari opsi `style` |
+
+*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string
+
## Username
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
diff --git a/docs/id-ID/faq/README.md b/docs/id-ID/faq/README.md
index 41bb2d391..1f8484406 100644
--- a/docs/id-ID/faq/README.md
+++ b/docs/id-ID/faq/README.md
@@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/id-ID/guide/README.md b/docs/id-ID/guide/README.md
index 48cfe8696..287766080 100644
--- a/docs/id-ID/guide/README.md
+++ b/docs/id-ID/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Ikuti @StarshipPrompt di Twitter"
/>
+
@@ -147,8 +152,6 @@
/>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
diff --git a/docs/id-ID/presets/README.md b/docs/id-ID/presets/README.md
index ac15b0b08..29c180d1c 100644
--- a/docs/id-ID/presets/README.md
+++ b/docs/id-ID/presets/README.md
@@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow)
diff --git a/docs/id-ID/presets/gruvbox-rainbow.md b/docs/id-ID/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..9208142e3
--- /dev/null
+++ b/docs/id-ID/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[Return to Presets](./README.md#gruvbox-rainbow)
+
+# Gruvbox Rainbow Preset
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png)
+
+### Prasyarat
+
+- [Nerd Font](https://www.nerdfonts.com/) yang sudah terpasang dan berjalan di dalam terminalmu
+
+### Konfigurasi
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/id-ID/presets/jetpack.md b/docs/id-ID/presets/jetpack.md
new file mode 100644
index 000000000..58dde840f
--- /dev/null
+++ b/docs/id-ID/presets/jetpack.md
@@ -0,0 +1,24 @@
+[Return to Presets](./README.md#jetpack)
+
+# Jetpack Preset
+
+This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
+
+> Jetpack uses the terminal's color theme.
+
+![Screenshot of Jetpack preset](/presets/img/jetpack.png)
+
+### Prerequisite
+
+- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
+
+### Konfigurasi
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/it-IT/config/README.md b/docs/it-IT/config/README.md
index 1b7ff22d3..420fedd50 100644
--- a/docs/it-IT/config/README.md
+++ b/docs/it-IT/config/README.md
@@ -206,6 +206,13 @@ This is the list of prompt-wide configuration options.
| `add_newline` | `true` | Inserisce una riga vuota tra i prompt della shell. |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
+
+::: tip
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
### Esempio
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### Opzioni
| Opzione | Default | Descrizione |
@@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform
| `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. |
| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. |
| `style` | `'bold yellow'` | Lo stile per il modulo. |
-| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
+| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. |
| `disabled` | `false` | Disables the `AWS` module. |
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
@@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu
### Opzioni
-| Opzione | Default | Descrizione |
-| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
-| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'C '` | The symbol used before displaying the compiler details |
-| `detect_extensions` | `['c', 'h']` | Quali estensioni dovrebbero attivare questo modulo. |
-| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. |
-| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is |
-| `style` | `'bold 149'` | Lo stile per il modulo. |
-| `disabled` | `false` | Disables the `c` module. |
+| Opzione | Default | Descrizione |
+| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
+| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'C '` | The symbol used before displaying the compiler details |
+| `detect_extensions` | `['c', 'h']` | Quali estensioni dovrebbero attivare questo modulo. |
+| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. |
+| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is |
+| `style` | `'bold 149'` | Lo stile per il modulo. |
+| `disabled` | `false` | Disables the `c` module. |
### Variables
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### Opzioni
+
+| Opzione | Default | Descrizione |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. |
+| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | Lo stile per il modulo. |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
+| `detect_files` | `['.envrc']` | Quali nomi di file dovrebbero attivare questo modulo. |
+| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### Variables
+
+| Variable | Esempio | Descrizione |
+| --------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| symbol | | Mirrors the value of option `symbol`. |
+| style\* | `red bold` | Mirrors the value of option `style`. |
+
+*: This variable can only be used as a part of a style string
+
+### Esempio
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## 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` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
@@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. |
| `style` | `'bold green'` | Lo stile per il modulo. |
-| `detect_extensions` | `[fnl]` | Quali estensioni dovrebbero attivare questo modulo. |
+| `detect_extensions` | `['fnl']` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `false` | Disables the `fennel` module. |
@@ -1524,11 +1577,46 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
+
+### Opzioni
+
+| Opzione | Default | Descrizione |
+| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
+| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
+| `added_style` | `'bold green'` | The style for the added count. |
+| `deleted_style` | `'bold red'` | The style for the deleted count. |
+| `only_nonzero_diffs` | `true` | Render status only for changed items. |
+| `disabled` | `true` | Disables the `fossil_metrics` module. |
+
+### Variables
+
+| Variable | Esempio | Descrizione |
+| ----------------- | ------- | ------------------------------------------- |
+| 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
+
+### Esempio
+
+```toml
+# ~/.config/starship.toml
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
-When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set.
+When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set.
### Opzioni
@@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel
| Opzione | Default | Descrizione |
| ---------- | -------------------------- | ------------------------------------------------------ |
| `format` | `'via [$symbol]($style) '` | The format for the module. |
-| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. |
-| `style` | `"yellow bold"` | Lo stile per il modulo. |
+| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. |
+| `style` | `'yellow bold'` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `guix_shell` module. |
### Variables
@@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c
| Opzione | Default | Descrizione |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. |
-| `detect_extensions` | `["gradle", "gradle.kts"]` | Quali estensioni dovrebbero attivare questo modulo. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. |
+| `detect_extensions` | `['gradle', 'gradle.kts']` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. |
-| `detect_folders` | `["gradle"]` | Quali cartelle dovrebbero attivare questo modulo. |
-| `style` | `"bold bright-cyan"` | Lo stile per il modulo. |
+| `detect_folders` | `['gradle']` | Quali cartelle dovrebbero attivare questo modulo. |
+| `style` | `'bold bright-cyan'` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `gradle` module. |
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
@@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| Opzione | Default | Descrizione |
| ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
-| `detect_extensions` | `["hx", "hxml"]` | Quali estensioni dovrebbero attivare questo modulo. |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Quali nomi di file dovrebbero attivare questo modulo. |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. |
-| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. |
-| `style` | `"bold fg:202"` | Lo stile per il modulo. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
+| `detect_extensions` | `['hx', 'hxml']` | Quali estensioni dovrebbero attivare questo modulo. |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Quali nomi di file dovrebbero attivare questo modulo. |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
+| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. |
+| `style` | `'bold fg:202'` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `haxe` module. |
### Variables
@@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname.
### Opzioni
-| Opzione | Default | Descrizione |
-| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
-| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
-| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
-| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation |
-| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. |
-| `style` | `'bold dimmed green'` | Lo stile per il modulo. |
-| `disabled` | `false` | Disables the `hostname` module. |
+| Opzione | Default | Descrizione |
+| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
+| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
+| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
+| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. |
+| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
+| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. |
+| `style` | `'bold dimmed green'` | Lo stile per il modulo. |
+| `disabled` | `false` | Disables the `hostname` module. |
### Variables
@@ -2126,7 +2215,9 @@ The `hostname` module shows the system hostname.
*: This variable can only be used as a part of a style string
-### Esempio
+### Examples
+
+#### Always show the hostname
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Hide the hostname in remote tmux sessions
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
@@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes
-Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
+Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
::: tip
@@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### Opzioni
+::: warning
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
| Opzione | Default | Descrizione |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `'cyan bold'` | Lo stile per il modulo. |
-| `context_aliases` | `{}` | Table of context aliases to display. |
-| `user_aliases` | `{}` | Table of user aliases to display. |
+| `context_aliases`* | `{}` | Table of context aliases to display. |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
+| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. |
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| Variable | Descrizione |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `style` | The style for the module when using this context. If not set, will use module's style. |
+| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### Variables
| Variable | Esempio | Descrizione |
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Regex Matching
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
-
-Long and automatically generated cluster names can be identified and shortened using regular expressions:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Line Break
@@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| `detect_folders` | `['node_modules']` | Quali cartelle dovrebbero attivare questo modulo. |
| `style` | `'bold green'` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `nodejs` module. |
-| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. |
+| `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
@@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Opzione | Default | Descrizione |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | The format for the module. |
-| `style` | `"bold white"` | Lo stile per il modulo. |
+| `format` | `'[$symbol]($style)'` | The format for the module. |
+| `style` | `'bold white'` | Lo stile per il modulo. |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -3038,16 +3169,16 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe
### Opzioni
-| Opzione | Default | Descrizione |
-| ------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. |
-| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` |
-| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl |
-| `detect_extensions` | `['pl', 'pm', 'pod']` | Quali estensioni dovrebbero attivare questo modulo. |
-| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Quali nomi di file dovrebbero attivare questo modulo. |
-| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
-| `style` | `'bold 149'` | Lo stile per il modulo. |
-| `disabled` | `false` | Disables the `perl` module. |
+| Opzione | Default | Descrizione |
+| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. |
+| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl |
+| `detect_extensions` | `['pl', 'pm', 'pod']` | Quali estensioni dovrebbero attivare questo modulo. |
+| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Quali nomi di file dovrebbero attivare questo modulo. |
+| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
+| `style` | `'bold 149'` | Lo stile per il modulo. |
+| `disabled` | `false` | Disables the `perl` module. |
### Variables
@@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met:
| `symbol` | `'🐍 '` | A format string representing the symbol of Python |
| `style` | `'yellow bold'` | Lo stile per il modulo. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
-| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used |
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
| `detect_extensions` | `['py']` | Quali estensioni dovrebbero attivare questo modulo |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Quali nomi di file dovrebbero attivare questo modulo |
@@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Opzioni
-| Opzione | Default | Descrizione |
-| ---------------------- | ------------------------- | ------------------------------------------------------------ |
-| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
-| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
-| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
-| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
-| `ion_indicator` | `'ion'` | A format string used to represent ion. |
-| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
-| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
-| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
-| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
-| `nu_indicator` | `'nu'` | A format string used to represent nu. |
-| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
-| `format` | `'[$indicator]($style) '` | The format for the module. |
-| `style` | `'white bold'` | Lo stile per il modulo. |
-| `disabled` | `true` | Disables the `shell` module. |
+| Opzione | Default | Descrizione |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
+| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
+| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
+| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | A format string used to represent ion. |
+| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
+| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
+| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
+| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
+| `nu_indicator` | `'nu'` | A format string used to represent nu. |
+| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
+| `format` | `'[$indicator]($style) '` | The format for the module. |
+| `style` | `'white bold'` | Lo stile per il modulo. |
+| `disabled` | `true` | Disables the `shell` module. |
### Variables
@@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| Opzione | Default | Descrizione |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | Quali estensioni dovrebbero attivare questo modulo. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
-| `style` | `"bold blue"` | Lo stile per il modulo. |
+| `style` | `'bold blue'` | Lo stile per il modulo. |
| `disabled` | `false` | Disables this module. |
### Variables
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+By default, the module will be shown if any of the following conditions are met:
+
+- The current directory contains a `template.typ` file
+- The current directory contains any `*.typ` file
+
+### Opzioni
+
+| Opzione | Default | Descrizione |
+| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'t '` | A format string representing the symbol of Daml |
+| `style` | `'bold #0093A7'` | Lo stile per il modulo. |
+| `detect_extensions` | `['.typ']` | Quali estensioni dovrebbero attivare questo modulo. |
+| `detect_files` | `['template.typ']` | Quali nomi di file dovrebbero attivare questo modulo. |
+| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
+| `disabled` | `false` | Disables the `daml` module. |
+
+### Variables
+
+| Variable | Esempio | Descrizione |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+*: This variable can only be used as a part of a style string
+
## Username
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
diff --git a/docs/it-IT/faq/README.md b/docs/it-IT/faq/README.md
index 24c8cb702..00dc751ea 100644
--- a/docs/it-IT/faq/README.md
+++ b/docs/it-IT/faq/README.md
@@ -120,3 +120,11 @@ Se Starship è stato installato utilizzando lo script di installazione, il segue
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/it-IT/guide/README.md b/docs/it-IT/guide/README.md
index 90774728c..f718014a9 100644
--- a/docs/it-IT/guide/README.md
+++ b/docs/it-IT/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Segui @StarshipPrompt su Twitter"
/>
+
@@ -147,8 +152,6 @@
/>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
diff --git a/docs/it-IT/presets/README.md b/docs/it-IT/presets/README.md
index 532d5c7d5..b5e07764d 100644
--- a/docs/it-IT/presets/README.md
+++ b/docs/it-IT/presets/README.md
@@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow)
diff --git a/docs/it-IT/presets/gruvbox-rainbow.md b/docs/it-IT/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..300d2ad48
--- /dev/null
+++ b/docs/it-IT/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[Return to Presets](./README.md#gruvbox-rainbow)
+
+# Gruvbox Rainbow Preset
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png)
+
+### Prerequisiti
+
+- Un [ Nerd Font ](https://www.nerdfonts.com/) installato e abilitato nel tuo terminale
+
+### Configurazione
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/it-IT/presets/jetpack.md b/docs/it-IT/presets/jetpack.md
new file mode 100644
index 000000000..902128745
--- /dev/null
+++ b/docs/it-IT/presets/jetpack.md
@@ -0,0 +1,24 @@
+[Return to Presets](./README.md#jetpack)
+
+# Jetpack Preset
+
+This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
+
+> Jetpack uses the terminal's color theme.
+
+![Screenshot of Jetpack preset](/presets/img/jetpack.png)
+
+### Prerequisite
+
+- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
+
+### Configurazione
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/ja-JP/README.md b/docs/ja-JP/README.md
index 48786a3d2..2d5e81c26 100644
--- a/docs/ja-JP/README.md
+++ b/docs/ja-JP/README.md
@@ -50,12 +50,12 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
#### パッケージマネージャー経由でインストール
- [ Homebrew ](https://brew.sh/)の場合:
+ [ Homebrew](https://brew.sh/)を使用する
```sh
brew install starship
```
- With [Winget](https://github.com/microsoft/winget-cli):
+ [Winget](https://github.com/microsoft/winget-cli)を使用する
```powershell
winget install starship
@@ -153,7 +153,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
:::
- Nushellの環境ファイルの最後に以下を追記してください ( `$nu.env-path` を実行してください):
+ そして、Nushellの設定ファイルの最後に以下を追加してください( `$nu.config-path` を実行してください):
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
diff --git a/docs/ja-JP/config/README.md b/docs/ja-JP/config/README.md
index b66bfe9ff..915a02ed1 100644
--- a/docs/ja-JP/config/README.md
+++ b/docs/ja-JP/config/README.md
@@ -206,6 +206,13 @@ detect_extensions = ['ts', '!video.ts', '!audio.ts']
| `add_newline` | `true` | シェルプロンプトの間に空行を挿入します。 |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
+
+::: tip
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
### 設定例
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ The module will display a profile only if its credentials are present in `~/.aws
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### オプション
| オプション | デフォルト | 説明 |
@@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform
| `region_aliases` | `{}` | AWS名に加えて表示するリージョンのエイリアスです。 |
| `profile_aliases` | `{}` | AWS名に加えて表示するプロファイルのエイリアスです。 |
| `style` | `'bold yellow'` | モジュールのスタイルです。 |
-| `expiration_symbol` | `X` | この記号は一時的な資格情報が有効期限切れの場合に表示されます。 |
+| `expiration_symbol` | `'X'` | この記号は一時的な資格情報が有効期限切れの場合に表示されます。 |
| `disabled` | `false` | `aws`モジュールを無効にします。 |
| `force_display` | `false` | `true`の場合、`credentials`、`credential_process`または`sso_start_url`が設定されていない場合でも情報を表示します。 |
@@ -620,17 +632,17 @@ format = 'via [🍔 $version](bold green) '
### オプション
-| オプション | デフォルト | 説明 |
-| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------ |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | モジュールのフォーマット文字列。 |
-| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
-| `symbol` | `'C '` | コンパイラの詳細を表示する前に使用される記号です。 |
-| `detect_extensions` | `['c', 'h']` | どの拡張子がこのモジュールをアクティブにするか |
-| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか |
-| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | コンパイラを検出する方法 |
-| `style` | `'bold 149'` | モジュールのスタイルです。 |
-| `disabled` | `false` | `c`モジュールを無効にします。 |
+| オプション | デフォルト | 説明 |
+| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------ |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | モジュールのフォーマット文字列。 |
+| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
+| `symbol` | `'C '` | コンパイラの詳細を表示する前に使用される記号です。 |
+| `detect_extensions` | `['c', 'h']` | どの拡張子がこのモジュールをアクティブにするか |
+| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか |
+| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | コンパイラを検出する方法 |
+| `style` | `'bold 149'` | モジュールのスタイルです。 |
+| `disabled` | `false` | `c`モジュールを無効にします。 |
### 変数
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### オプション
+
+| オプション | デフォルト | 説明 |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | module のフォーマットです。 |
+| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | モジュールのスタイルです。 |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
+| `detect_files` | `['.envrc']` | どのファイル名がこのモジュールをアクティブにするか |
+| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### 変数
+
+| 変数 | 設定例 | 説明 |
+| --------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| symbol | | オプション `symbol` の値をミラーする. |
+| style\* | `red bold` | オプション `style` の値をミラーする. |
+
+*: この変数は、スタイル文字列の一部としてのみ使用することができます。
+
+### 設定例
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## Docker Context
`docker_context`モジュールは、`default`に設定されていない場合、または環境変数`DOCKER_MACHINE_NAME`、`DOCKER_HOST`または`DOCKER_CONTEXT`が設定されている場合 (使用中のコンテキストを上書きするため)、現在アクティブな[Docker context](https://docs.docker.com/engine/context/working-with-contexts/)を表示します。
@@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. |
| `style` | `'bold green'` | モジュールのスタイルです。 |
-| `detect_extensions` | `[fnl]` | どの拡張子がこのモジュールをアクティブにするか |
+| `detect_extensions` | `['fnl']` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
| `disabled` | `false` | Disables the `fennel` module. |
@@ -1524,11 +1577,46 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
+
+### オプション
+
+| オプション | デフォルト | 説明 |
+| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
+| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | module のフォーマットです。 |
+| `added_style` | `'bold green'` | The style for the added count. |
+| `deleted_style` | `'bold red'` | The style for the deleted count. |
+| `only_nonzero_diffs` | `true` | Render status only for changed items. |
+| `disabled` | `true` | Disables the `fossil_metrics` module. |
+
+### 変数
+
+| 変数 | 設定例 | 説明 |
+| ----------------- | --- | ------------------------------------------- |
+| added | `1` | The current number of added lines |
+| deleted | `2` | The current number of deleted lines |
+| added_style\* | | Mirrors the value of option `added_style` |
+| deleted_style\* | | Mirrors the value of option `deleted_style` |
+
+*: この変数は、スタイル文字列の一部としてのみ使用することができます。
+
+### 設定例
+
+```toml
+# ~/.config/starship.toml
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
`gcloud` モジュールは、 [`gcloud`](https://cloud.google.com/sdk/gcloud) CLIの現在の設定が表示されます。 これは `~/.config/gcloud/active_config` ファイルと `~/.config/gcloud/configurations/config_{CONFIG NAME}` ファイルと `CLOUDSDK_CONFIG` 環境変数に基づきます。
-When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set.
+When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set.
### オプション
@@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel
| オプション | デフォルト | 説明 |
| ---------- | -------------------------- | ------------------------------------------------------ |
| `format` | `'via [$symbol]($style) '` | module のフォーマットです。 |
-| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. |
-| `style` | `"yellow bold"` | モジュールのスタイルです。 |
+| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. |
+| `style` | `'yellow bold'` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `guix_shell` module. |
### 変数
@@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
-| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 |
-| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
-| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. |
-| `detect_extensions` | `["gradle", "gradle.kts"]` | どの拡張子がこのモジュールをアクティブにするか |
+| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 |
+| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
+| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. |
+| `detect_extensions` | `['gradle', 'gradle.kts']` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか |
-| `detect_folders` | `["gradle"]` | どのフォルダーがこのモジュールをアクティブにするか |
-| `style` | `"bold bright-cyan"` | モジュールのスタイルです。 |
+| `detect_folders` | `['gradle']` | どのフォルダーがこのモジュールをアクティブにするか |
+| `style` | `'bold bright-cyan'` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `gradle` module. |
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
@@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| オプション | デフォルト | 説明 |
| ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
-| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 |
-| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
-| `detect_extensions` | `["hx", "hxml"]` | どの拡張子がこのモジュールをアクティブにするか |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | どのファイル名がこのモジュールをアクティブにするか |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | どのフォルダーがこのモジュールをアクティブにするか |
-| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. |
-| `style` | `"bold fg:202"` | モジュールのスタイルです。 |
+| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 |
+| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
+| `detect_extensions` | `['hx', 'hxml']` | どの拡張子がこのモジュールをアクティブにするか |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | どのファイル名がこのモジュールをアクティブにするか |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | どのフォルダーがこのモジュールをアクティブにするか |
+| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. |
+| `style` | `'bold fg:202'` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `haxe` module. |
### 変数
@@ -2107,14 +2195,15 @@ format = 'via [⎈ $version](bold white) '
### オプション
-| オプション | デフォルト | 説明 |
-| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------- |
-| `ssh_only` | `true` | SSHセッションに接続されている場合にのみホスト名を表示します。 |
-| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
-| `trim_at` | `'.'` | この文字が最初にマッチするまでをホスト名と認識します。 `'.'` will stop after the first dot. `''` will disable any truncation |
-| `format` | `'[$ssh_symbol$hostname]($style) in '` | module のフォーマットです。 |
-| `style` | `'bold dimmed green'` | モジュールのスタイルです。 |
-| `disabled` | `false` | `hostname`モジュールを無効にします。 |
+| オプション | デフォルト | 説明 |
+| ----------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------- |
+| `ssh_only` | `true` | SSHセッションに接続されている場合にのみホスト名を表示します。 |
+| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
+| `trim_at` | `'.'` | この文字が最初にマッチするまでをホスト名と認識します。 `'.'` will stop after the first dot. `''` will disable any truncation. |
+| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
+| `format` | `'[$ssh_symbol$hostname]($style) in '` | module のフォーマットです。 |
+| `style` | `'bold dimmed green'` | モジュールのスタイルです。 |
+| `disabled` | `false` | `hostname`モジュールを無効にします。 |
### 変数
@@ -2128,6 +2217,8 @@ format = 'via [⎈ $version](bold white) '
### 設定例
+#### Always show the hostname
+
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Hide the hostname in remote tmux sessions
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
`Java`モジュールは、現在インストールされている[Java](https://www.oracle.com/java/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
@@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes
-Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. 環境変数`$KUBECONFIG`が設定されている場合、このモジュールはそれを利用し、`~/.kube/config`を利用しません。
+Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. 環境変数`$KUBECONFIG`が設定されている場合、このモジュールはそれを利用し、`~/.kube/config`を利用しません。
::: tip
@@ -2335,17 +2437,39 @@ When the module is enabled it will always be active, unless any of `detect_exten
### オプション
-| オプション | デフォルト | 説明 |
-| ------------------- | ---------------------------------------------------- | --------------------------------- |
-| `symbol` | `'☸ '` | クラスター名の前に表示されるシンボルを表すフォーマット文字列。 |
-| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | module のフォーマットです。 |
-| `style` | `'cyan bold'` | モジュールのスタイルです。 |
-| `context_aliases` | `{}` | コンテキストの表示エイリアスを定義するテーブル。 |
-| `user_aliases` | `{}` | Table of user aliases to display. |
-| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
-| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか |
-| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
-| `disabled` | `true` | `kubernetes` モジュールを無効にする。 |
+::: warning
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
+| オプション | デフォルト | 説明 |
+| ------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
+| `symbol` | `'☸ '` | クラスター名の前に表示されるシンボルを表すフォーマット文字列。 |
+| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | module のフォーマットです。 |
+| `style` | `'cyan bold'` | モジュールのスタイルです。 |
+| `context_aliases`* | `{}` | コンテキストの表示エイリアスを定義するテーブル。 |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
+| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
+| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか |
+| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
+| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
+| `disabled` | `true` | `kubernetes` モジュールを無効にする。 |
+
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| 変数 | 説明 |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `style` | The style for the module when using this context. If not set, will use module's style. |
+| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
### 変数
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Regex Matching
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
-
-Long and automatically generated cluster names can be identified and shortened using regular expressions:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Line Break
@@ -2730,7 +2861,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
| `detect_folders` | `['node_modules']` | どのフォルダーがこのモジュールをアクティブにするか |
| `style` | `'bold green'` | モジュールのスタイルです。 |
| `disabled` | `false` | `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. |
+| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. |
### 変数
@@ -2890,8 +3021,8 @@ The [os_info](https://lib.rs/crates/os_info) crate used by this module is known
| オプション | デフォルト | 説明 |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | module のフォーマットです。 |
-| `style` | `"bold white"` | モジュールのスタイルです。 |
+| `format` | `'[$symbol]($style)'` | module のフォーマットです。 |
+| `style` | `'bold white'` | モジュールのスタイルです。 |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -3245,7 +3376,7 @@ The `python` module shows the currently installed version of [Python](https://ww
| `symbol` | `'🐍 '` | A format string representing the symbol of Python |
| `style` | `'yellow bold'` | モジュールのスタイルです。 |
| `pyenv_version_name` | `false` | pyenvを使用してPythonバージョンを取得します |
-| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used |
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
| `detect_extensions` | `['py']` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | どのファイル名がこのモジュールをアクティブにするか |
@@ -3562,22 +3693,23 @@ The `shell` module shows an indicator for currently used shell.
### オプション
-| オプション | デフォルト | 説明 |
-| ---------------------- | ------------------------- | ------------------------------------------------------------ |
-| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
-| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
-| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
-| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
-| `ion_indicator` | `'ion'` | A format string used to represent ion. |
-| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
-| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
-| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
-| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
-| `nu_indicator` | `'nu'` | A format string used to represent nu. |
-| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
-| `format` | `'[$indicator]($style) '` | module のフォーマットです。 |
-| `style` | `'white bold'` | モジュールのスタイルです。 |
-| `disabled` | `true` | Disables the `shell` module. |
+| オプション | デフォルト | 説明 |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
+| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
+| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
+| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | A format string used to represent ion. |
+| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
+| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
+| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
+| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
+| `nu_indicator` | `'nu'` | A format string used to represent nu. |
+| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
+| `format` | `'[$indicator]($style) '` | module のフォーマットです。 |
+| `style` | `'white bold'` | モジュールのスタイルです。 |
+| `disabled` | `true` | Disables the `shell` module. |
### 変数
@@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
-| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 |
-| `version_format` | `"v${major}.${minor}.${patch}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
-| `symbol` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | どの拡張子がこのモジュールをアクティブにするか |
+| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 |
+| `version_format` | `'v${major}.${minor}.${patch}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
+| `symbol` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
-| `style` | `"bold blue"` | モジュールのスタイルです。 |
+| `style` | `'bold blue'` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables this module. |
### 変数
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
+
+- カレントディレクトリに`template.typ`ファイルが含まれている
+- The current directory contains any `*.typ` file
+
+### オプション
+
+| オプション | デフォルト | 説明 |
+| ------------------- | ------------------------------------ | ------------------------------------------------------ |
+| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 |
+| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
+| `symbol` | `'t '` | Damlの記号を表すフォーマット文字列です。 |
+| `style` | `'bold #0093A7'` | モジュールのスタイルです。 |
+| `detect_extensions` | `['.typ']` | どの拡張子がこのモジュールをアクティブにするか |
+| `detect_files` | `['template.typ']` | どのファイル名がこのモジュールをアクティブにするか |
+| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
+| `disabled` | `false` | `daml`モジュールを無効にします。 |
+
+### 変数
+
+| 変数 | 設定例 | 説明 |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| symbol | | オプション `symbol` の値をミラーする |
+| style\* | | オプション `style` の値をミラーする |
+
+*: この変数は、スタイル文字列の一部としてのみ使用することができます。
+
## ユーザー名
`username`モジュールはアクティブなユーザーのユーザー名を表示します。 次の条件のいずれかが満たされると、モジュールが表示されます:
diff --git a/docs/ja-JP/faq/README.md b/docs/ja-JP/faq/README.md
index 6a8bb91ee..7b3b84b1f 100644
--- a/docs/ja-JP/faq/README.md
+++ b/docs/ja-JP/faq/README.md
@@ -120,3 +120,11 @@ Starship をインストールスクリプトを使用してインストール
# starshipのバイナリを見つけて削除
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/ja-JP/guide/README.md b/docs/ja-JP/guide/README.md
index 84677ee3c..1d0167b36 100644
--- a/docs/ja-JP/guide/README.md
+++ b/docs/ja-JP/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Follow @StarshipPrompt on Twitter"
/>
+
@@ -147,8 +152,6 @@
/>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
@@ -270,7 +274,7 @@ curl -sS https://starship.rs/install.sh | sh
-### Step 2. Set up your shell to use Starship
+### Step 2. Starshipをシェルにセットアップ
Starshipを初期化するためのシェルの設定。 以下のリストからお使いのシェルを選択してください。
@@ -334,27 +338,27 @@ eval $(starship init ion)
Nushell
-Nushellの環境ファイルの最後に以下を追記してください ( `$nu.env-path` を実行してください):
+そして、Nushellの設定ファイルの最後に以下を追加してください( `$nu.config-path` を実行してください):
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
```
-そして、Nushellの設定ファイルの最後に以下を追加してください( `$nu.config-path` を実行してください)。
+そして、Nushellの設定ファイルの最後に以下を追記してください (`$nu.config-path` を実行してください):
```sh
use ~/.cache/starship/init.nu
```
-注意: Elvish v0.78以降でサポートされています
+注意: Nushell v0.78以降でサポートされています
PowerShell
-PowerShellの設定ファイルの最後に以下を追記してください (`$PROFILE` を実行してください):
+そして、Nushellの設定ファイルの最後に以下を追加してください( `$PROFILE.config-path` を実行してください):
```powershell
Invoke-Expression (&starship init powershell)
diff --git a/docs/ja-JP/presets/README.md b/docs/ja-JP/presets/README.md
index cbfe7047a..0eebf1a3d 100644
--- a/docs/ja-JP/presets/README.md
+++ b/docs/ja-JP/presets/README.md
@@ -63,3 +63,9 @@ This preset does not show icons if the toolset is not found.
このプリセットは[tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme)を参考にしています。
[![Tokyo Night プリセットのスクリーンショット](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow)
diff --git a/docs/ja-JP/presets/gruvbox-rainbow.md b/docs/ja-JP/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..badafdbdb
--- /dev/null
+++ b/docs/ja-JP/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[プリセット一覧に戻る](./README.md#gruvbox-rainbow)
+
+# Gruvbox Rainbow Preset
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png)
+
+### 必要なもの
+
+- [Nerd Font](https://www.nerdfonts.com/)のインストールとターミナルでの有効化
+
+### 設定
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[クリックしてTOMLをダウンロード](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/ja-JP/presets/jetpack.md b/docs/ja-JP/presets/jetpack.md
new file mode 100644
index 000000000..59a44ce3f
--- /dev/null
+++ b/docs/ja-JP/presets/jetpack.md
@@ -0,0 +1,24 @@
+[プリセット一覧に戻る](./README.md#jetpack)
+
+# Jetpack Preset
+
+This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
+
+> Jetpack uses the terminal's color theme.
+
+![Screenshot of Jetpack preset](/presets/img/jetpack.png)
+
+### Prerequisite
+
+- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
+
+### 設定
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[クリックしてTOMLをダウンロード](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/ko-KR/README.md b/docs/ko-KR/README.md
index c3d7bbbd5..1b95959bb 100644
--- a/docs/ko-KR/README.md
+++ b/docs/ko-KR/README.md
@@ -2,23 +2,23 @@
home: true
heroImage: /logo.svg
heroText:
-tagline: 간결하고 화끈하게 빠르며 무제한으로 커스터마이징이 가능한 프롬프트. 어떤 쉘에서든 사용할 수 있습니다!
-actionText: Get Started →
+tagline: 아무 셸에나 적용할 수 있는 작고, 매우 빠르며, 무한히 커스텀 가능한 프롬프트입니다!
+actionText: 시작하기 →
actionLink: ./guide/
features:
-
- title: Compatibility First
- details: Works on the most common shells on the most common operating systems. Use it everywhere!
+ title: 호환성 우선
+ details: 거의 모든 운영 체제의 거의 모든 셸에서 동작합니다. 모든 곳에서 사용해 보세요!
-
- title: Rust-Powered
- details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible.
+ title: Rust 기반
+ details: Rust의 최고 수준의 속도와 안정성으로 프롬프트를 가능한 한 빠르고 안정적으로 만들어 보세요.
-
- title: Customizable
- details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be.
+ title: 커스텀 가능
+ details: 모든 사소한 디테일들을 마음대로 커스텀할 수 있어, 프롬프트를 원하는 만큼 간단하게 만들거나 기능이 풍부하게 만들 수 있습니다.
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
#Used for the description meta tag, for SEO
-metaTitle: "Starship: Cross-Shell Prompt"
-description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.
+metaTitle: "Starship: 크로스-셸 프롬프트"
+description: Starship은 아무 셸에나 적용할 수 있는 작고, 매우 빠르며, 무한히 커스텀 가능한 프롬프트입니다! 필요한 정보를 깔끔하고 간략하게 표시합니다. Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, 및 PowerShell에 빠르게 설치할 수 있습니다.
---
@@ -39,7 +39,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### 최근 버전 설치
- With Shell:
+ 셸로 설치:
```sh
curl -sS https://starship.rs/install.sh | sh
@@ -48,14 +48,14 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
Starship을 업데이트하고 싶은 경우에도 위의 스크립트를 실행시키면 됩니다. Starship의 설정은 변경되지 않고 버전만 최근 버전으로 대체될 것입니다.
- #### 패키지 매니저를 이용한 설치
+ #### 패키지 매니저로 설치하기
- [Homebrew](https://brew.sh/)를 통한 설치:
+ [Homebrew](https://brew.sh/)로 설치:
```sh
brew install starship
```
- With [Winget](https://github.com/microsoft/winget-cli):
+ [Winget](https://github.com/microsoft/winget-cli)으로 설치:
```powershell
winget install starship
@@ -121,7 +121,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
::: warning
- Only elvish v0.18 or higher is supported.
+ elvish 버전 v0.18 이상에서만 지원됩니다.
:::
@@ -149,17 +149,17 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
::: warning
- This will change in the future. Only Nushell v0.78+ is supported.
+ 추후에 변경될 예정입니다. Nushell v0.78 버전 이상에서만 지원됩니다.
:::
- Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
+ 다음 내용을 Nushell env 파일 (찾으려면 Nushell에서 `$nu.env-path` 실행) 마지막 부분에 추가하세요:
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
```
- And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
+ 다음 내용을 Nushell 설정 파일 (찾으려면 Nushell에서 `$nu.config-path` 실행) 마지막 부분에 추가하세요:
```sh
use ~/.cache/starship/init.nu
diff --git a/docs/ko-KR/advanced-config/README.md b/docs/ko-KR/advanced-config/README.md
index 01374ceff..b18e3a05c 100644
--- a/docs/ko-KR/advanced-config/README.md
+++ b/docs/ko-KR/advanced-config/README.md
@@ -1,4 +1,4 @@
-# Advanced Configuration
+# 고급 설정
While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship.
@@ -199,27 +199,27 @@ function Invoke-Starship-PreCommand {
Invoke-Expression (&starship init powershell)
```
-## Enable Right Prompt
+## 오른쪽 프롬프트 활성화
-Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
+일부 셸은 입력과 같은 줄에 렌더링되는 오른쪽 프롬프트를 지원합니다. Starship에서는 `right_format` 옵션을 사용하여 오른쪽 프롬프트의 내용을 설정할 수 있습니다. `format`에서 사용할 수 있는 모든 모듈은 `right_format`에서도 지원됩니다. `$all` 변수는 `format` 또는 `right_format`에서 명시적으로 사용하지 않는 모듈만 포함합니다.
-Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill).
+알림: 오른쪽 프롬프트는 입력 위치에 따라 한 줄로 표시됩니다. 여러 줄 프롬프트에서 입력 선 위의 모듈을 오른쪽 정렬하려면, [`fill` 모듈](/config/#fill)을 참고하세요.
-`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell.
+`right_format`은 현재 elvish, fish, zsh, xonsh, cmd, nushell에서 지원됩니다.
-### Example
+### 예시
```toml
# ~/.config/starship.toml
-# A minimal left prompt
+# 간결한 왼쪽 프롬프트
format = """$character"""
-# move the rest of the prompt to the right
+# 프롬프트의 나머지를 오른쪽으로 옮기기
right_format = """$all"""
```
-Produces a prompt like the following:
+위 설정은 아래와 같은 프롬프트를 출력합니다:
```
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
@@ -239,7 +239,7 @@ Note: Continuation prompts are only available in the following shells:
- `zsh`
- `Powershell`
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -248,9 +248,9 @@ Note: Continuation prompts are only available in the following shells:
continuation_prompt = '▶▶ '
```
-## Style Strings
+## 스타일 문자열
-Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
+스타일 문자열은 공백으로 구분된 단어 목록입니다. 단어는 대소문자를 구분하지 않습니다 (즉, `bold`와 `BoLd`는 동일한 문자열로 간주됩니다). 각 단어는 다음 중 하나가 될 수 있습니다:
- `bold`
- `italic`
@@ -265,15 +265,15 @@ Style strings are a list of words, separated by whitespace. The words are not ca
- ` `
- `none`
-where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
+`` 부분은 색상 지정자입니다 (아래에 후술). 현재, `fg:` 와 ``는 동일한 동작을 하지만 차후에 바뀔 수 있습니다. `inverted`는 배경 색과 전경 색을 서로 바꿉니다. 문자열의 단어 순서는 중요하지 않습니다.
-The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
+The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. 향후 다른 토큰과 함께 `none`을 사용하는 것은 오류가 발생할 수 있습니다.
-A color specifier can be one of the following:
+색상 지정자는 다음 중 하나가 될 수 있습니다:
-- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
-- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
-- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
+- 표준 터미널 색상: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. 앞에 `bright-`를 붙여 밝게 만들 수도 있습니다 (예시: `bright-white`).
+- `#` 다음의 여섯 자리 16진수 숫자. 이는 [RGB 색상 16진수 코드](https://www.w3schools.com/colors/colors_hexadecimal.asp)입니다.
+- 0~255 사이의 숫자. 이는 [8비트 ANSI 색상 코드](https://i.stack.imgur.com/KTSQa.png)입니다.
If multiple colors are specified for foreground/background, the last one in the string will take priority.
diff --git a/docs/ko-KR/config/README.md b/docs/ko-KR/config/README.md
index 396fbb2c9..4875c0e82 100644
--- a/docs/ko-KR/config/README.md
+++ b/docs/ko-KR/config/README.md
@@ -1,30 +1,30 @@
-# Configuration
+# 설정
-To get started configuring starship, create the following file: `~/.config/starship.toml`.
+Starship을 설정하려면, `~/.config/starship.toml` 경로에 파일을 만드세요.
```sh
mkdir -p ~/.config && touch ~/.config/starship.toml
```
-All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
+Starship의 모든 설정은 이 [TOML](https://github.com/toml-lang/toml) 파일에서 할 수 있습니다.
```toml
-# Get editor completions based on the config schema
+# 설정 스키마에 따른 에디터 자동 완성 가져오기
"$schema" = 'https://starship.rs/config-schema.json'
-# Inserts a blank line between shell prompts
+# 셸 프롬프트 사이에 빈 줄 추가하기
add_newline = true
-# Replace the '❯' symbol in the prompt with '➜'
-[character] # The name of the module we are configuring is 'character'
-success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'
+# 프롬프트의 '❯' 심볼을 '➜' 로 대체하기
+[character] # 설정할 모듈의 이름은 'character'
+success_symbol = '[➜](bold green)' # 'success_symbol' 세그먼트를 'bold green' 색상의 '➜' 로 설정
-# Disable the package module, hiding it from the prompt completely
+# package 모듈을 비활성화하고 프롬프트에서 완전히 숨겨버리기
[package]
disabled = true
```
-### Config File Location
+### 설정 파일 경로
You can change default configuration file location with `STARSHIP_CONFIG` environment variable:
@@ -44,7 +44,7 @@ Or for Cmd (Windows) would be adding this line to your `starship.lua`:
os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\starship.toml')
```
-### Logging
+### 로그
By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to an instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable:
@@ -64,28 +64,28 @@ Or for Cmd (Windows) would be adding this line to your `starship.lua`:
os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp')
```
-### Terminology
+### 용어
-**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project.
+**모듈**: OS의 배경 정보를 기반으로 정보를 제공하는 프롬프트의 구성 요소입니다. 예를 들어, "nodejs" 모듈은 현재 디렉토리가 Node.js 프로젝트 디렉토리라면 컴퓨터에 현재 설치되어 있는 Node.js 버전을 보여줍니다.
**Variable**: Smaller sub-components that contain information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of Node.js.
By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix.
-### Strings
+### 문자열
-In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`.
+TOML 문법에서는 [텍스트 값](https://toml.io/en/v1.0.0#string)을 `'`, `"`, `'''`, 그리고 `"""`으로 지정합니다.
The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`.
-| Symbol | Type | Notes |
-| ------ | ------------------------- | ------------------------------------------------------ |
-| `'` | literal string | less escaping |
-| `"` | string | more escaping |
-| `'''` | multi-line literal string | less escaping |
-| `"""` | multi-line string | more escaping, newlines in declarations can be ignored |
+| 기호 | 종류 | 비고 |
+| ----- | ------------------------- | ------------------------------------------------------ |
+| `'` | 리터럴 문자열 | less escaping |
+| `"` | string | more escaping |
+| `'''` | multi-line literal string | less escaping |
+| `"""` | multi-line string | more escaping, newlines in declarations can be ignored |
-For example:
+예를 들어:
```toml
# literal string
@@ -136,7 +136,7 @@ Format strings are the format that a module prints all its variables with. Most
A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain letters, numbers and `_`.
-For example:
+예를 들어:
- `'$version'` is a format string with a variable named `version`.
- `'$git_branch$git_commit'` is a format string with two variables named `git_branch` and `git_commit`.
@@ -150,15 +150,15 @@ The first part, which is enclosed in a `[]`, is a [format string](#format-string
In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to style the first part.
-For example:
+예를 들어:
- `'[on](red bold)'` will print a string `on` with bold text colored red.
- `'[⌘ $version](bold green)'` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green.
- `'[a [b](red) c](green)'` will print `a b c` with `b` red, and `a` and `c` green.
-#### Style Strings
+#### 스타일 문자열
-Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/).
+Starship의 대부분의 모듈에 표시 스타일을 설정할 수 있습니다. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/).
- `'fg:green bg:blue'` sets green text on a blue background
- `'bg:blue fg:bright-green'` sets bright green text on a blue background
@@ -173,7 +173,7 @@ Note that what styling looks like will be controlled by your terminal emulator.
A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty.
-For example:
+예를 들어:
- `'(@$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.
@@ -206,8 +206,15 @@ This is the list of prompt-wide configuration options.
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
-### Example
+::: tip
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
+
+### 예시
```toml
# ~/.config/starship.toml
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,32 +361,34 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### Options
| Option | Default | Description |
| ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. |
-| `symbol` | `'☁️ '` | The symbol used before displaying the current AWS profile. |
+| `기호` | `'☁️ '` | The symbol used before displaying the current AWS profile. |
| `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. |
| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. |
| `style` | `'bold yellow'` | The style for the module. |
-| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
+| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. |
| `disabled` | `false` | Disables the `AWS` module. |
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | ---------------- | ------------------------------------------- |
| region | `ap-northeast-1` | The current AWS region |
| profile | `astronauts` | The current AWS profile |
| duration | `2h27m20s` | The temporary credentials validity duration |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Examples
+### 예시
#### Display everything
@@ -430,12 +442,12 @@ The `azure` module shows the current Azure Subscription. This is based on showin
| Variable | Default | Description |
| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- |
| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. |
-| `symbol` | `' '` | The symbol used in the format. |
+| `기호` | `' '` | The symbol used in the format. |
| `style` | `'blue bold'` | The style used in the format. |
| `disabled` | `true` | Disables the `azure` module. |
| `subscription_aliases` | `{}` | Table of subscription name aliases to display in addition to Azure subscription name. |
-### Examples
+### 예시
#### Display Subscription Name
@@ -487,7 +499,7 @@ The `battery` module shows how charged the device's battery is and its current c
| `display` | [link](#battery-display) | Display threshold and style for the module. |
| `disabled` | `false` | Disables the `battery` module. |
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -521,7 +533,7 @@ The `display` option is an array of the following table.
| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
-#### Example
+#### 예시
```toml
[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10%
@@ -549,7 +561,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
-| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
+| `기호` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
@@ -558,15 +570,15 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| `version` | `v1.0.0` | The version of `buf` |
-| `symbol` | | Mirrors the value of option `symbol` |
+| `기호` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -588,7 +600,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun.
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'🍞 '` | A format string representing the symbol of Bun. |
+| `기호` | `'🍞 '` | A format string representing the symbol of Bun. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
@@ -597,15 +609,15 @@ The `bun` module shows the currently installed version of the [bun](https://bun.
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `v0.1.4` | The version of `bun` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -620,26 +632,26 @@ The `c` module shows some information about your C compiler. By default the modu
### Options
-| Option | Default | Description |
-| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
-| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'C '` | The symbol used before displaying the compiler details |
-| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
-| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is |
-| `style` | `'bold 149'` | The style for the module. |
-| `disabled` | `false` | Disables the `c` module. |
+| Option | Default | Description |
+| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `기호` | `'C '` | The symbol used before displaying the compiler details |
+| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
+| `detect_files` | `[]` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is |
+| `style` | `'bold 149'` | The style for the module. |
+| `disabled` | `false` | Disables the `c` module. |
### Variables
-| Variable | Example | Description |
-| -------- | ------- | ------------------------------------ |
-| name | clang | The name of the compiler |
-| version | 13.0.0 | The version of the compiler |
-| symbol | | Mirrors the value of option `symbol` |
-| style | | Mirrors the value of option `style` |
+| Variable | 예시 | Description |
+| -------- | ------ | ------------------------------------ |
+| name | clang | The name of the compiler |
+| version | 13.0.0 | The version of the compiler |
+| 기호 | | Mirrors the value of option `symbol` |
+| style | | Mirrors the value of option `style` |
NB that `version` is not in the default format.
@@ -651,7 +663,7 @@ Each command is represented as a list of the executable name, followed by its ar
If a C compiler is not supported by this module, you can request it by [raising an issue on GitHub](https://github.com/starship/starship/).
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -692,11 +704,11 @@ By default it only changes color. If you also want to change its shape take a lo
### Variables
-| Variable | Example | Description |
-| -------- | ------- | -------------------------------------------------------------------------------------------------------- |
-| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
+| Variable | 예시 | Description |
+| -------- | -- | -------------------------------------------------------------------------------------------------------- |
+| 기호 | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
-### Examples
+### 예시
#### With custom error shape
@@ -740,7 +752,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
| ------------------- | -------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'△ '` | The symbol used before the version of cmake. |
+| `기호` | `'△ '` | The symbol used before the version of cmake. |
| `detect_extensions` | `[]` | Which extensions should trigger this module |
| `detect_files` | `['CMakeLists.txt', 'CMakeCache.txt']` | Which filenames should trigger this module |
| `detect_folders` | `[]` | Which folders should trigger this module |
@@ -749,10 +761,10 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | --------- | ------------------------------------ |
| version | `v3.17.3` | The version of cmake |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
@@ -768,7 +780,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. |
+| `기호` | `'⚙️ '` | The symbol used before displaying the version of COBOL. |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `style` | `'bold blue'` | The style for the module. |
@@ -779,10 +791,10 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | ---------- | ------------------------------------ |
| version | `v3.1.2.0` | The version of `cobol` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
@@ -814,14 +826,14 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | --------------------------------------- |
| duration | `16m40s` | The time it took to execute the command |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -846,7 +858,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
| Option | Default | Description |
| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. |
-| `symbol` | `'🅒 '` | The symbol used before the environment name. |
+| `기호` | `'🅒 '` | The symbol used before the environment name. |
| `style` | `'bold green'` | The style for the module. |
| `format` | `'via [$symbol$environment]($style) '` | The format for the module. |
| `ignore_base` | `true` | Ignores `base` environment when activated. |
@@ -854,15 +866,15 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| ----------- | ------------ | ------------------------------------ |
| environment | `astronauts` | The current conda environment |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -879,22 +891,22 @@ The `container` module displays a symbol and container name, if inside a contain
| Option | Default | Description |
| ---------- | ---------------------------------- | ----------------------------------------- |
-| `symbol` | `'⬢'` | The symbol shown, when inside a container |
+| `기호` | `'⬢'` | The symbol shown, when inside a container |
| `style` | `'bold red dimmed'` | The style for the module. |
| `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | ------------------- | ------------------------------------ |
| name | `fedora-toolbox:35` | The name of the container |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -914,7 +926,7 @@ The `crystal` module shows the currently installed version of [Crystal](https://
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. |
+| `기호` | `'🔮 '` | The symbol used before displaying the version of crystal. |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `style` | `'bold red'` | The style for the module. |
@@ -925,15 +937,15 @@ The `crystal` module shows the currently installed version of [Crystal](https://
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | --------- | ------------------------------------ |
| version | `v0.32.1` | The version of `crystal` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -954,7 +966,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'Λ '` | A format string representing the symbol of Daml |
+| `기호` | `'Λ '` | A format string representing the symbol of Daml |
| `style` | `'bold cyan'` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. |
@@ -963,15 +975,15 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `v2.2.0` | The version of `daml` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -994,7 +1006,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
| ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'🎯 '` | A format string representing the symbol of Dart |
+| `기호` | `'🎯 '` | A format string representing the symbol of Dart |
| `detect_extensions` | `['dart']` | Which extensions should trigger this module. |
| `detect_files` | `['pubspec.yaml', 'pubspec.yml', 'pubspec.lock']` | Which filenames should trigger this module. |
| `detect_folders` | `['.dart_tool']` | Which folders should trigger this module. |
@@ -1003,15 +1015,15 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `v2.8.4` | The version of `dart` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -1032,7 +1044,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d
| ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'🦕 '` | A format string representing the symbol of Deno |
+| `기호` | `'🦕 '` | A format string representing the symbol of Deno |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
@@ -1041,13 +1053,13 @@ The `deno` module shows you your currently installed version of [Deno](https://d
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `v1.8.3` | The version of `deno` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -1105,7 +1117,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | --------------------- | ----------------------------------- |
| path | `'D:/Projects'` | The current directory path |
| style\* | `'black bold dimmed'` | Mirrors the value of option `style` |
@@ -1117,7 +1129,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
Let us consider the path `/path/to/home/git_repo/src/lib`
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| ------------------ | --------------------- | --------------------------------------- |
| before_root_path | `'/path/to/home/'` | The path before git root directory path |
| repo_root | `'git_repo'` | The git root directory name |
@@ -1127,7 +1139,7 @@ Let us consider the path `/path/to/home/git_repo/src/lib`
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### Options
+
+| Option | Default | Description |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. |
+| `기호` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | The style for the module. |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | Which extensions should trigger this module. |
+| `detect_files` | `['.envrc']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### Variables
+
+| Variable | 예시 | Description |
+| --------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| 기호 | | Mirrors the value of option `symbol`. |
+| style\* | `red bold` | Mirrors the value of option `style`. |
+
+*: This variable can only be used as a part of a style string
+
+### 예시
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## 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` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
@@ -1146,7 +1199,7 @@ The `docker_context` module shows the currently active [Docker context](https://
| Option | Default | Description |
| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `format` | `'via [$symbol$context]($style) '` | The format for the module. |
-| `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. |
+| `기호` | `'🐳 '` | The symbol used before displaying the Docker context. |
| `only_with_files` | `true` | Only show when there's a match |
| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). |
| `detect_files` | `['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']` | Which filenames should trigger this module (needs `only_with_files` to be true). |
@@ -1156,15 +1209,15 @@ The `docker_context` module shows the currently active [Docker context](https://
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------------- | ------------------------------------ |
| context | `test_context` | The current docker context |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -1200,7 +1253,7 @@ The module will also show the Target Framework Moniker ($` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------------------- | ---------------------------------------- |
| context | `starship-context` | The current kubernetes context name |
| namespace | `starship-namespace` | If set, the current kubernetes namespace |
| user | `starship-user` | If set, the current kubernetes user |
| cluster | `starship-cluster` | If set, the current kubernetes cluster |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Regex Matching
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
-
-Long and automatically generated cluster names can be identified and shortened using regular expressions:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Line Break
@@ -2418,7 +2549,7 @@ The `line_break` module separates the prompt into two lines.
| ---------- | ------- | ------------------------------------------------------------------ |
| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. |
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -2442,14 +2573,14 @@ The `localip` module shows the IPv4 address of the primary network interface.
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | ------------ | ----------------------------------- |
| localipv4 | 192.168.1.13 | Contains the primary IPv4 address |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -2474,7 +2605,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
| ------------------- | ------------------------------------ | -------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'🌙 '` | A format string representing the symbol of Lua. |
+| `기호` | `'🌙 '` | A format string representing the symbol of Lua. |
| `detect_extensions` | `['lua']` | Which extensions should trigger this module. |
| `detect_files` | `['.lua-version']` | Which filenames should trigger this module. |
| `detect_folders` | `['lua']` | Which folders should trigger this module. |
@@ -2484,15 +2615,15 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `v5.4.0` | The version of `lua` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -2519,24 +2650,24 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | The format for the module. |
-| `symbol` | `'🐏'` | The symbol used before displaying the memory usage. |
+| `기호` | `'🐏'` | The symbol used before displaying the memory usage. |
| `style` | `'bold dimmed white'` | The style for the module. |
| `disabled` | `true` | Disables the `memory_usage` module. |
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| ---------------- | ------------- | ------------------------------------------------------------------ |
| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. |
| ram_pct | `48%` | The percentage of the current system memory. |
| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. |
| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. |
-| symbol | `🐏` | Mirrors the value of option `symbol` |
+| 기호 | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string *\*: The SWAP file information is only displayed if detected on the current system
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -2561,21 +2692,21 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. |
| `format` | `'via [$symbol$project]($style) '` | The format for the module. |
-| `symbol` | `'⬢ '` | The symbol used before displaying the project name. |
+| `기호` | `'⬢ '` | The symbol used before displaying the project name. |
| `style` | `'blue bold'` | The style for the module. |
| `disabled` | `false` | Disables the `meson` module. |
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | ---------- | ------------------------------------ |
| project | `starship` | The current Meson project name |
-| symbol | `🐏` | Mirrors the value of option `symbol` |
+| 기호 | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -2595,7 +2726,7 @@ The `hg_branch` module shows the active branch and topic of the repo in your cur
| Option | Default | Description |
| ------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------- |
-| `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
+| `기호` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
| `style` | `'bold purple'` | The style for the module. |
| `format` | `'on [$symbol$branch(:$topic)]($style) '` | The format for the module. |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch / topic name to `N` graphemes |
@@ -2604,16 +2735,16 @@ The `hg_branch` module shows the active branch and topic of the repo in your cur
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | --------- | ------------------------------------ |
| branch | `master` | The active mercurial branch |
| topic | `feature` | The active mercurial topic |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -2639,7 +2770,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'👑 '` | The symbol used before displaying the version of Nim. |
+| `기호` | `'👑 '` | The symbol used before displaying the version of Nim. |
| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. |
| `detect_files` | `['nim.cfg']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
@@ -2648,15 +2779,15 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `v1.2.0` | The version of `nimc` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -2675,7 +2806,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
| Option | Default | Description |
| ------------- | ---------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. |
-| `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. |
+| `기호` | `'❄️ '` | A format string representing the symbol of nix-shell. |
| `style` | `'bold blue'` | The style for the module. |
| `impure_msg` | `'impure'` | A format string shown when the shell is impure. |
| `pure_msg` | `'pure'` | A format string shown when the shell is pure. |
@@ -2685,16 +2816,16 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | ------- | ------------------------------------ |
| state | `pure` | The state of the nix-shell |
| name | `lorri` | The name of the nix-shell |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -2724,26 +2855,26 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `' '` | A format string representing the symbol of Node.js. |
+| `기호` | `' '` | A format string representing the symbol of Node.js. |
| `detect_extensions` | `['js', 'mjs', 'cjs', 'ts', 'mts', 'cts']` | Which extensions should trigger this module. |
| `detect_files` | `['package.json', '.node-version']` | Which filenames should trigger this module. |
| `detect_folders` | `['node_modules']` | Which folders should trigger this module. |
| `style` | `'bold green'` | The style for the module. |
| `disabled` | `false` | Disables the `nodejs` module. |
-| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. |
+| `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
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| version | `v13.12.0` | The version of `node` |
| engines_version | `>=12.0.0` | `node` version requirement as set in the engines property of `package.json`. Will only show if the version requirement does not match the `node` version. |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -2769,7 +2900,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
| ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)'` | The format string for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'🐫 '` | The symbol used before displaying the version of OCaml. |
+| `기호` | `'🐫 '` | The symbol used before displaying the version of OCaml. |
| `global_switch_indicator` | `''` | The format string used to represent global OPAM switch. |
| `local_switch_indicator` | `'*'` | The format string used to represent local OPAM switch. |
| `detect_extensions` | `['opam', 'ml', 'mli', 're', 'rei']` | Which extensions should trigger this module. |
@@ -2780,17 +2911,17 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| ---------------- | ------------ | ----------------------------------------------------------------- |
| version | `v4.10.0` | The version of `ocaml` |
| switch_name | `my-project` | The active OPAM switch |
| switch_indicator | | Mirrors the value of `indicator` for currently active OPAM switch |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -2809,7 +2940,7 @@ The `opa` module shows the currently installed version of the OPA tool. By defau
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'🪖 '` | A format string representing the symbol of OPA. |
+| `기호` | `'🪖 '` | A format string representing the symbol of OPA. |
| `detect_extensions` | `['rego']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
@@ -2818,15 +2949,15 @@ The `opa` module shows the currently installed version of the OPA tool. By defau
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | --------- | ------------------------------------ |
| version | `v0.44.0` | The version of `opa` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -2844,22 +2975,22 @@ The `openstack` module shows the current OpenStack cloud and project. The module
| Option | Default | Description |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. |
-| `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. |
+| `기호` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `'bold yellow'` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
### Variables
-| Variable | Example | Description |
-| --------- | ------- | ------------------------------------ |
-| cloud | `corp` | The current OpenStack cloud |
-| project | `dev` | The current OpenStack project |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | 예시 | Description |
+| --------- | ------ | ------------------------------------ |
+| cloud | `corp` | The current OpenStack cloud |
+| project | `dev` | The current OpenStack project |
+| 기호 | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Default | Description |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | The format for the module. |
-| `style` | `"bold white"` | The style for the module. |
+| `format` | `'[$symbol]($style)'` | The format for the module. |
+| `style` | `'bold white'` | The style for the module. |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -2945,11 +3076,11 @@ Windows = "🪟 "
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | ------------ | ------------------------------------------------------------------ |
-| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` |
+| 기호 | `🎗️` | The current operating system symbol from advanced option `symbols` |
| name | `Arch Linux` | The current operating system name |
-| type | `Arch` | The current operating system type |
+| 종류 | `Arch` | The current operating system type |
| codename | | The current operating system codename, if applicable |
| edition | | The current operating system edition, if applicable |
| version | | The current operating system version, if applicable |
@@ -2957,7 +3088,7 @@ Windows = "🪟 "
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3001,7 +3132,7 @@ The `package` module is shown when the current directory is the repository for a
| Option | Default | Description |
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
| `format` | `'is [$symbol$version]($style) '` | The format for the module. |
-| `symbol` | `'📦 '` | The symbol used before displaying the version the package. |
+| `기호` | `'📦 '` | The symbol used before displaying the version the package. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `style` | `'bold 208'` | The style for the module. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
@@ -3009,15 +3140,15 @@ The `package` module is shown when the current directory is the repository for a
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `v1.0.0` | The version of your package |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3042,7 +3173,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl |
+| `기호` | `'🐪 '` | The symbol used before displaying the version of Perl |
| `detect_extensions` | `['pl', 'pm', 'pod']` | Which extensions should trigger this module. |
| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
@@ -3051,13 +3182,13 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | --------- | ------------------------------------ |
| version | `v5.26.1` | The version of `perl` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3080,7 +3211,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'🐘 '` | The symbol used before displaying the version of PHP. |
+| `기호` | `'🐘 '` | The symbol used before displaying the version of PHP. |
| `detect_extensions` | `['php']` | Which extensions should trigger this module. |
| `detect_files` | `['composer.json', '.php-version']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
@@ -3089,15 +3220,15 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `v7.3.8` | The version of `php` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3114,7 +3245,7 @@ The `pijul_channel` module shows the active channel of the repo in your current
| Option | Default | Description |
| ------------------- | --------------------------------- | ------------------------------------------------------------------------------------ |
-| `symbol` | `' '` | The symbol used before the pijul channel name of the repo in your current directory. |
+| `기호` | `' '` | The symbol used before the pijul channel name of the repo in your current directory. |
| `style` | `'bold purple'` | The style for the module. |
| `format` | `'on [$symbol$channel]($style) '` | The format for the module. |
| `truncation_length` | `2^63 - 1` | Truncates the pijul channel name to `N` graphemes |
@@ -3127,7 +3258,7 @@ The `pulumi` module shows the current username, selected [Pulumi Stack](https://
::: tip
-By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version).
+By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). 그래도 활성화하려면, [아래에 있는 예시를 따라 하세요](#with-pulumi-version).
:::
@@ -3142,24 +3273,24 @@ By default the module will be shown if any of the following conditions are met:
| ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `' '` | A format string shown before the Pulumi stack. |
+| `기호` | `' '` | A format string shown before the Pulumi stack. |
| `style` | `'bold 5'` | The style for the module. |
| `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. |
| `disabled` | `false` | Disables the `pulumi` module. |
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | ---------- | ------------------------------------ |
| version | `v0.12.24` | The version of `pulumi` |
| stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
#### With Pulumi Version
@@ -3192,7 +3323,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'<=> '` | The symbol used before displaying the version of PureScript. |
+| `기호` | `'<=> '` | The symbol used before displaying the version of PureScript. |
| `detect_extensions` | `['purs']` | Which extensions should trigger this module. |
| `detect_files` | `['spago.dhall']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
@@ -3201,15 +3332,15 @@ The `purescript` module shows the currently installed version of [PureScript](ht
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `0.13.5` | The version of `purescript` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3242,10 +3373,10 @@ By default the module will be shown if any of the following conditions are met:
| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'🐍 '` | A format string representing the symbol of Python |
+| `기호` | `'🐍 '` | A format string representing the symbol of Python |
| `style` | `'yellow bold'` | The style for the module. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
-| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used |
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
| `detect_extensions` | `['py']` | Which extensions should trigger this module |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
@@ -3262,15 +3393,15 @@ The default values and order for `python_binary` was chosen to first identify th
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| ------------ | --------------- | ------------------------------------------ |
| version | `'v3.8.1'` | The version of `python` |
-| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
+| 기호 | `'🐍 '` | Mirrors the value of option `symbol` |
| style | `'yellow bold'` | Mirrors the value of option `style` |
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
| virtualenv | `'venv'` | The current `virtualenv` name |
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3325,7 +3456,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'📐'` | A format string representing the symbol of R. |
+| `기호` | `'📐'` | A format string representing the symbol of R. |
| `style` | `'blue bold'` | The style for the module. |
| `detect_extensions` | `['R', 'Rd', 'Rmd', 'Rproj', 'Rsx']` | Which extensions should trigger this module |
| `detect_files` | `['.Rprofile']` | Which filenames should trigger this module |
@@ -3334,13 +3465,13 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| -------- | ------------- | ------------------------------------ |
| version | `v4.0.5` | The version of `R` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style | `'blue bold'` | Mirrors the value of option `style` |
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3362,7 +3493,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra
| ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'🦋 '` | The symbol used before displaying the version of Raku |
+| `기호` | `'🦋 '` | The symbol used before displaying the version of Raku |
| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. |
| `detect_files` | `['META6.json']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
@@ -3371,14 +3502,14 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra
### Variables
-| Variable | Example | Description |
-| ---------- | ------- | ------------------------------------ |
-| version | `v6.d` | The version of `raku` |
-| vm_version | `moar` | The version of VM `raku` is built on |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | 예시 | Description |
+| ---------- | ------ | ------------------------------------ |
+| version | `v6.d` | The version of `raku` |
+| vm_version | `moar` | The version of VM `raku` is built on |
+| 기호 | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3399,7 +3530,7 @@ By default the `red` module shows the currently installed version of [Red](https
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'🔺 '` | A format string representing the symbol of Red. |
+| `기호` | `'🔺 '` | A format string representing the symbol of Red. |
| `detect_extensions` | `['red']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
@@ -3408,15 +3539,15 @@ By default the `red` module shows the currently installed version of [Red](https
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `v2.5.1` | The version of `red` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3442,7 +3573,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'💎 '` | A format string representing the symbol of Ruby. |
+| `기호` | `'💎 '` | A format string representing the symbol of Ruby. |
| `detect_extensions` | `['rb']` | Which extensions should trigger this module. |
| `detect_files` | `['Gemfile', '.ruby-version']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
@@ -3452,15 +3583,15 @@ Starship gets the current Ruby version by running `ruby -v`.
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `v2.5.1` | The version of `ruby` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3482,7 +3613,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'🦀 '` | A format string representing the symbol of Rust |
+| `기호` | `'🦀 '` | A format string representing the symbol of Rust |
| `detect_extensions` | `['rs']` | Which extensions should trigger this module. |
| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
@@ -3491,17 +3622,17 @@ By default the `rust` module shows the currently installed version of [Rust](htt
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | ----------------- | -------------------------------------------- |
| version | `v1.43.0-nightly` | The version of `rustc` |
| numver | `1.51.0` | The numeric component of the `rustc` version |
| toolchain | `beta` | The toolchain version |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3527,21 +3658,21 @@ The `scala` module shows the currently installed version of [Scala](https://www.
| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. |
| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. |
| `detect_folders` | `['.metals']` | Which folders should trigger this modules. |
-| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. |
+| `기호` | `'🆂 '` | A format string representing the symbol of Scala. |
| `style` | `'red dimmed'` | The style for the module. |
| `disabled` | `false` | Disables the `scala` module. |
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `2.13.5` | The version of `scala` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
-| Option | Default | Description |
-| ---------------------- | ------------------------- | ------------------------------------------------------------ |
-| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
-| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
-| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
-| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
-| `ion_indicator` | `'ion'` | A format string used to represent ion. |
-| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
-| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
-| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
-| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
-| `nu_indicator` | `'nu'` | A format string used to represent nu. |
-| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
-| `format` | `'[$indicator]($style) '` | The format for the module. |
-| `style` | `'white bold'` | The style for the module. |
-| `disabled` | `true` | Disables the `shell` module. |
+| Option | Default | Description |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
+| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
+| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
+| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | A format string used to represent ion. |
+| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
+| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
+| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
+| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
+| `nu_indicator` | `'nu'` | A format string used to represent nu. |
+| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
+| `format` | `'[$indicator]($style) '` | The format for the module. |
+| `style` | `'white bold'` | The style for the module. |
+| `disabled` | `true` | Disables the `shell` module. |
### Variables
@@ -3588,7 +3720,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
*: This variable can only be used as a part of a style string
-### Examples
+### 예시
```toml
# ~/.config/starship.toml
@@ -3611,7 +3743,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int
| --------------- | ---------------------------- | ------------------------------------------------------------------- |
| `threshold` | `2` | Display threshold. |
| `format` | `'[$symbol$shlvl]($style) '` | The format for the module. |
-| `symbol` | `'↕️ '` | The symbol used to represent the `SHLVL`. |
+| `기호` | `'↕️ '` | The symbol used to represent the `SHLVL`. |
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
| `repeat_offset` | `0` | Decrements number of times `symbol` is repeated by the offset value |
| `style` | `'bold yellow'` | The style for the module. |
@@ -3619,15 +3751,15 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int
### Variables
-| Variable | Example | Description |
-| --------- | ------- | ------------------------------------ |
-| shlvl | `3` | The current value of `SHLVL` |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | 예시 | Description |
+| --------- | --- | ------------------------------------ |
+| shlvl | `3` | The current value of `SHLVL` |
+| 기호 | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3661,21 +3793,21 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
| Option | Default | Description |
| ---------- | -------------------------------- | ------------------------------------------------ |
| `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. |
-| `symbol` | `''` | A format string displayed before the image name. |
+| `기호` | `''` | A format string displayed before the image name. |
| `style` | `'bold dimmed blue'` | The style for the module. |
| `disabled` | `false` | Disables the `singularity` module. |
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | ------------ | ------------------------------------ |
| env | `centos.img` | The current Singularity image |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3694,27 +3826,27 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `기호` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `style` | `"bold blue"` | The style for the module. |
+| `style` | `'bold blue'` | The style for the module. |
| `disabled` | `false` | Disables this module. |
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `v0.8.1` | The version of `solidity` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3731,22 +3863,22 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat
| Option | Default | Description |
| ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` means no truncation. Also see the [`directory`](#directory) module. |
-| `symbol` | `'🅢 '` | The symbol used before the environment name. |
+| `기호` | `'🅢 '` | The symbol used before the environment name. |
| `style` | `'bold blue'` | The style for the module. |
| `format` | `'via [$symbol$environment]($style) '` | The format for the module. |
| `disabled` | `false` | Disables the `spack` module. |
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| ----------- | ------------ | ------------------------------------ |
| environment | `astronauts` | The current spack environment |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3770,7 +3902,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Default | Description |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `'[$symbol$status]($style) '` | The format of the module |
-| `symbol` | `'❌'` | The symbol displayed on program error |
+| `기호` | `'❌'` | The symbol displayed on program error |
| `success_symbol` | `''` | The symbol displayed on program success |
| `not_executable_symbol` | `'🚫'` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `'🔍'` | The symbol displayed when the command can't be found |
@@ -3787,7 +3919,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| -------------- | ------- | ------------------------------------------------------------------------------------------ |
| status | `127` | The exit code of the last command |
| hex_status | `0x7F` | The exit code of the last command in hex |
@@ -3797,12 +3929,12 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled |
| maybe_int | `7` | Contains the exit code number when no meaning has been found |
| pipestatus | | Rendering of in pipeline programs' exit codes, this is only available in pipestatus_format |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3831,21 +3963,21 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Default | Description |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `'[as $symbol]($style)'` | The format of the module |
-| `symbol` | `'🧙 '` | The symbol displayed when credentials are cached |
+| `기호` | `'🧙 '` | The symbol displayed when credentials are cached |
| `style` | `'bold blue'` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Variables
-| Variable | Example | Description |
-| --------- | ------- | ------------------------------------ |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | 예시 | Description |
+| --------- | -- | ------------------------------------ |
+| 기호 | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3878,7 +4010,7 @@ By default the `swift` module shows the currently installed version of [Swift](h
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'🐦 '` | A format string representing the symbol of Swift |
+| `기호` | `'🐦 '` | A format string representing the symbol of Swift |
| `detect_extensions` | `['swift']` | Which extensions should trigger this module. |
| `detect_files` | `['Package.swift']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
@@ -3887,15 +4019,15 @@ By default the `swift` module shows the currently installed version of [Swift](h
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `v5.2.4` | The version of `swift` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -3910,7 +4042,7 @@ The `terraform` module shows the currently selected [Terraform workspace](https:
::: tip
-By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version).
+By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. 그래도 활성화하려면, [아래에 있는 예시를 따라 하세요](#with-terraform-version).
:::
@@ -3925,7 +4057,7 @@ By default the module will be shown if any of the following conditions are met:
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'💠'` | A format string shown before the terraform workspace. |
+| `기호` | `'💠'` | A format string shown before the terraform workspace. |
| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `['.terraform']` | Which folders should trigger this module. |
@@ -3934,16 +4066,16 @@ By default the module will be shown if any of the following conditions are met:
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | ---------- | ------------------------------------ |
| version | `v0.12.24` | The version of `terraform` |
| workspace | `default` | The current Terraform workspace |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
#### With Terraform Version
@@ -3989,14 +4121,14 @@ If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it de
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | ---------- | ----------------------------------- |
| time | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+By default, the module will be shown if any of the following conditions are met:
+
+- The current directory contains a `template.typ` file
+- The current directory contains any `*.typ` file
+
+### Options
+
+| Option | Default | Description |
+| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `기호` | `'t '` | A format string representing the symbol of Daml |
+| `style` | `'bold #0093A7'` | The style for the module. |
+| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. |
+| `detect_files` | `['template.typ']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `disabled` | `false` | Disables the `daml` module. |
+
+### Variables
+
+| Variable | 예시 | Description |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| 기호 | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+*: This variable can only be used as a part of a style string
+
## Username
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
@@ -4036,12 +4201,12 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| -------- | ------------ | ------------------------------------------------------------------------------------------- |
| `style` | `'red bold'` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. |
| `user` | `'matchai'` | The currently logged-in user ID. |
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -4066,7 +4231,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'⍱ '` | A format string representing the symbol of Vagrant. |
+| `기호` | `'⍱ '` | A format string representing the symbol of Vagrant. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['Vagrantfile']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
@@ -4075,15 +4240,15 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | ---------------- | ------------------------------------ |
| version | `Vagrant 2.2.10` | The version of `Vagrant` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -4105,7 +4270,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla
| ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'V '` | A format string representing the symbol of V |
+| `기호` | `'V '` | A format string representing the symbol of V |
| `detect_extensions` | `['v']` | Which extensions should trigger this module. |
| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
@@ -4114,13 +4279,13 @@ The `vlang` module shows you your currently installed version of [V](https://vla
### Variables
-| Variable | Example | Description |
-| --------- | ------- | ------------------------------------ |
-| version | `v0.2` | The version of `v` |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | 예시 | Description |
+| --------- | ------ | ------------------------------------ |
+| version | `v0.2` | The version of `v` |
+| 기호 | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -4136,22 +4301,22 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v
| Option | Default | Description |
| ---------- | -------------------------------- | ------------------------------------------------------ |
-| `symbol` | `''` | The symbol used before displaying the repository name. |
+| `기호` | `''` | The symbol used before displaying the repository name. |
| `style` | `'bold yellow'` | The style for the module. |
| `format` | `'vcsh [$symbol$repo]($style) '` | The format for the module. |
| `disabled` | `false` | Disables the `vcsh` module. |
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | ------------------------------------------- | ------------------------------------ |
| repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -4172,7 +4337,7 @@ By default the `zig` module shows the currently installed version of [Zig](https
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'↯ '` | The symbol used before displaying the version of Zig. |
+| `기호` | `'↯ '` | The symbol used before displaying the version of Zig. |
| `style` | `'bold yellow'` | The style for the module. |
| `disabled` | `false` | Disables the `zig` module. |
| `detect_extensions` | `['zig']` | Which extensions should trigger this module. |
@@ -4181,15 +4346,15 @@ By default the `zig` module shows the currently installed version of [Zig](https
### Variables
-| Variable | Example | Description |
+| Variable | 예시 | Description |
| --------- | -------- | ------------------------------------ |
| version | `v0.6.0` | The version of `zig` |
-| symbol | | Mirrors the value of option `symbol` |
+| 기호 | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
-### Example
+### 예시
```toml
# ~/.config/starship.toml
@@ -4248,7 +4413,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| `detect_files` | `[]` | The files that will be searched in the working directory for a match. |
| `detect_folders` | `[]` | The directories that will be searched in the working directory for a match. |
| `detect_extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
-| `symbol` | `''` | The symbol used before displaying the command output. |
+| `기호` | `''` | The symbol used before displaying the command output. |
| `style` | `'bold green'` | The style for the module. |
| `format` | `'[$symbol($output )]($style)'` | The format for the module. |
| `disabled` | `false` | Disables this `custom` module. |
@@ -4261,7 +4426,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| Variable | Description |
| --------- | -------------------------------------- |
| output | The output of shell command in `shell` |
-| symbol | Mirrors the value of option `symbol` |
+| 기호 | Mirrors the value of option `symbol` |
| style\* | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
@@ -4295,7 +4460,7 @@ Automatic detection of shells and proper parameters addition are currently imple
:::
-### Example
+### 예시
```toml
# ~/.config/starship.toml
diff --git a/docs/ko-KR/faq/README.md b/docs/ko-KR/faq/README.md
index 41bb2d391..0e7a3de84 100644
--- a/docs/ko-KR/faq/README.md
+++ b/docs/ko-KR/faq/README.md
@@ -1,14 +1,14 @@
-# Frequently Asked Questions
+# 자주 묻는 질문
-## What is the configuration used in the demo GIF?
+## 데모 GIF에는 어떤 구성을 사용했나요?
-- **Terminal Emulator**: [iTerm2](https://iterm2.com/)
- - **Theme**: Minimal
- - **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
- - **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
-- **Shell**: [Fish Shell](https://fishshell.com/)
- - **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
- - **Prompt**: [Starship](https://starship.rs/)
+- **터미널 에뮬레이터**: [iTerm2](https://iterm2.com/)
+ - **테마**: Minimal
+ - **배색**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
+ - **폰트**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
+- **셸**: [Fish Shell](https://fishshell.com/)
+ - **구성**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
+ - **프롬프트**: [Starship](https://starship.rs/)
## How do I get command completion as shown in the demo GIF?
@@ -40,7 +40,7 @@ PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
-For a list of all flags accepted by `starship prompt`, use the following command:
+`starship 프롬프트`에서 지원하는 모든 플래그 값을 보려면 아래 명령어를 사용하세요:
```sh
starship prompt --help
@@ -48,19 +48,19 @@ starship prompt --help
The prompt will use as much context as is provided, but no flags are "required".
-## How do I run Starship on Linux distributions with older versions of glibc?
+## 오래된 버전의 glibc가 있는 Linux 배포판에서 Starship을 어떻게 실행하나요?
-If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
+미리 빌드된 바이너리를 실행할 때 (예를 들어 CentOS 6 혹은 7에서) "_version 'GLIBC_2.18' not found (required by starship)_" 같은 오류가 보인다면, `glibc` 대신 `musl`로 컴파일된 바이너리 파일을 사용하세요.
```sh
curl -sS https://starship.rs/install.sh | sh -s -- --platform unknown-linux-musl
```
-## Why do I see `Executing command "..." timed out.` warnings?
+## 왜 `Executing command "..." timed out.` 경고가 뜨나요?
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
-## I see symbols I don't understand or expect, what do they mean?
+## 이해할 수 없거나 예상치 못한 기호가 보이는데 무슨 뜻인가요?
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
@@ -105,18 +105,26 @@ The first line should produce a [snake emoji](https://emojipedia.org/snake/), wh
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
-## How do I uninstall Starship?
+## Starship을 어떻게 삭제하나요?
-Starship is just as easy to uninstall as it is to install in the first place.
+Starship은 처음 설치하는 것만큼이나 쉽게 제거할 수 있습니다.
-1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship.
-1. Delete the Starship binary.
+1. 셸 설정 파일 (예시: `~/.bashrc`) 에서 Starship 초기화에 사용되는 모든 줄을 제거하세요.
+1. Starship 바이너리 파일을 제거하세요.
-If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
+Starship을 패키지 매니저로 설치하였다면 해당 패키지 매니저의 제거 지침 문서를 참조해 주세요.
-If Starship was installed using the install script, the following command will delete the binary:
+Starship을 설치 스크립트로 설치하였다면 바이너리 파일 제거를 위해 아래 명령어를 실행하세요:
```sh
-# Locate and delete the starship binary
+# starship 바이너리 파일을 찾고 제거합니다.
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/ko-KR/guide/README.md b/docs/ko-KR/guide/README.md
index 4fa27edd9..374f9117d 100644
--- a/docs/ko-KR/guide/README.md
+++ b/docs/ko-KR/guide/README.md
@@ -2,7 +2,7 @@
@@ -30,7 +30,12 @@
+
@@ -147,25 +152,23 @@
/>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
-**간결하고 화끈하게 빠르며 무제한으로 커스터마이징이 가능한 프롬프트. 어떤 쉘에서든 사용할 수 있습니다!**
+**아무 셸에나 적용할 수 있는 간결하고, 매우 빠르며, 무한히 커스텀 가능한 프롬프트입니다!**
-- ** Fast:** 빨라요 – _엄청 엄청_ 빠릅니다! 🚀
-- ** Customizable:** 프롬프트의 모든 측면을 커스텀 가능합니다.
-- **Universal:** 어떤 쉘 위에서도, 어떤 운영체제 위에서도 동작합니다.
-- **Intelligent:** 관련 정보를 한눈에 보여줍니다.
-- **Feature rich:** 원하는 모든 도구를 지원합니다.
-- **Easy:** 빠른 설치 - 몇 분 안에 사용할 수 있습니다.
+- ** 빠름:** 빠릅니다. – _정말_ 빠릅니다. 🚀
+- ** 커스텀 가능:** 프롬프트의 모든 부분을 커스텀 할 수 있습니다.
+- **범용적:** 어떤 셸 위에서도, 어떤 운영체제 위에서도 동작합니다.
+- **지능적:** 관련 정보를 한눈에 보여줍니다.
+- **다기능:** 원하는 모든 도구를 지원합니다.
+- **쉬움:** 빠른 설치 - 몇 분만 투자하면 바로 사용할 수 있습니다.
Starship 문서 보기 ▶
@@ -188,7 +191,7 @@
다음 패키지 관리자 중 하나를 사용해 Starship 을 설치하세요:
-| Repository | Instructions |
+| 리포지토리 | 설명 |
| --------------------------------------------------------------------------------- | ---------------------- |
| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` |
@@ -199,11 +202,11 @@
다음 패키지 관리자 중 하나를 사용해 Starship 을 설치하세요:
-| Distribution | Repository | Instructions |
-| ------------ | -------------------------------------------------------- | --------------------------------- |
-| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
-| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
-| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
+| 배포판 | 리포지토리 | 설명 |
+| -------- | -------------------------------------------------------- | --------------------------------- |
+| **_전체_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
+| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
+| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
@@ -218,18 +221,19 @@ curl -sS https://starship.rs/install.sh | sh
다음의 패키지 관리자를 사용해서 Starship을 설치할 수도 있습니다.
-| Distribution | Repository | Instructions |
-| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
-| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
-| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
-| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
-| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` |
-| Arch Linux | [Arch Linux Extra](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` |
-| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship` `dnf install starship` |
-| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
-| Manjaro | | `pacman -S starship` |
-| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
-| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
+| 배포판 | 리포지토리 | 설명 |
+| ------------------ | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
+| **_전체_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
+| _전체_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
+| _전체_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
+| Alpine Linux 3.13+ | [Alpine Linux 패키지](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` |
+| Arch Linux | [Arch Linux Extra](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` |
+| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship` `dnf install starship` |
+| Gentoo | [Gentoo 패키지](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
+| Manjaro | | `pacman -S starship` |
+| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
+| openSUSE | [OSS](https://software.opensuse.org/package/starship) | `zypper in starship` |
+| Void Linux | [Void Linux 패키지](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
@@ -244,7 +248,7 @@ curl -sS https://starship.rs/install.sh | sh
다음의 패키지 관리자를 사용해서 Starship을 설치할 수도 있습니다.
-| Repository | Instructions |
+| 리포지토리 | 설명 |
| -------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
@@ -256,11 +260,11 @@ curl -sS https://starship.rs/install.sh | sh
Windows
-Install the latest version for your system with the MSI-installers from the [releases section](https://github.com/starship/starship/releases/latest).
+[releases 섹션](https://github.com/starship/starship/releases/latest)에서 MSI 인스톨러를 받아 실행하여 시스템에 맞는 최신 버전을 설치하세요.
다음 패키지 관리자 중 하나를 사용해 Starship 을 설치하세요:
-| Repository | Instructions |
+| 리포지토리 | 설명 |
| -------------------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
@@ -270,9 +274,9 @@ Install the latest version for your system with the MSI-installers from the [rel
-### 2단계. Set up your shell to use Starship
+### 2단계. 셸에 Starship 적용하기
-쉘에 Starship 초기 설정을 합니다. 아래의 리스트 중에 해당하는 것을 고르세요:
+Starship 적용을 위해 셸을 구성해야 합니다. 아래의 리스트 중에 해당하는 것을 고르세요:
Bash
@@ -288,7 +292,7 @@ eval "$(starship init bash)"
Cmd
-Cmd를 이용하려면 [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) 를 사용해야 합니다. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
+Cmd를 이용하려면 [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) 를 사용해야 합니다. `%LocalAppData%\clink\starship.lua` 경로에 파일을 만들고 아래 내용으로 채우세요:
```lua
load(io.popen('starship init cmd'):read("*a"))()
@@ -305,7 +309,7 @@ load(io.popen('starship init cmd'):read("*a"))()
eval (starship init elvish)
```
-Note: Only Elvish v0.18+ is supported
+알림: Elvish v0.18 버전 이상에서만 지원됩니다.
@@ -334,20 +338,20 @@ eval $(starship init ion)
Nushell
-Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
+다음 내용을 Nushell env 파일 (찾으려면 Nushell에서 `$nu.env-path` 실행) 마지막 부분에 추가하세요:
```sh
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
```
-And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
+다음 내용을 Nushell 설정 파일 (찾으려면 Nushell에서 `$nu.config-path` 실행) 마지막 부분에 추가하세요:
```sh
use ~/.cache/starship/init.nu
```
-Note: Only Nushell v0.78+ is supported
+알림: Nushell v0.78 버전 이상에서만 지원됩니다.
@@ -409,25 +413,25 @@ Starship을 추가로 커스터마이징 하고싶다면:
우리는 언제나 **기술 수준에 관계없이** 기여자를 찾고 있습니다! 프로젝트에 참여하고자 한다면, [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue) 를 보내보세요.
-If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. 번역에 도움을 주고자 한다면, [Starship Crowdin](https://translate.starship.rs/) 에서 기여할 수 있습니다.
+영어 이외의 언어에 유창하시다면, 저희 문서를 다른 언어로 최신화하는 데 도움을 주시면 대단히 감사하겠습니다. 번역에 도움을 주고자 한다면, [Starship Crowdin](https://translate.starship.rs/) 에서 기여할 수 있습니다.
-Starship 에 기여하는데 관심이 있다면, [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) 를 한 번 살펴봐 주세요 그리고 부담갖지 말고 [Discord 서버](https://discord.gg/8Jzqu3T) 에 들러 인사 한 마디 남겨보세요 👋
+Starship에 기여하는데 관심이 있으시다면, [기여 가이드](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)를 읽어주세요. 그리고 부담갖지 말고 [Discord 서버](https://discord.gg/8Jzqu3T) 에 들러 인사 한 마디 남겨보세요 👋
-## 💭 Inspired By
+## 💭 영감받은 곳
Starship 을 만드는 데에 영감이 되었던 이전 작업들도 살펴보세요. 🙏
-- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts.
+- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – 우주 비행사를 위한 ZSH 프롬프트.
-- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript.
+- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – JavaScript로 작성된 크로스-쉘 robbyrussell 테마.
-- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.
+- **[reujab/silver](https://github.com/reujab/silver)** – 아이콘이 있는 커스텀 가능한 powerline 계열 크로스-쉘 프롬프트.
-## ❤️ Sponsors
+## ❤️ 스폰서
-Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website.
+이 [프로젝트를 후원](https://github.com/sponsors/starship)하여 프로젝트를 지원해 주세요. 여러분의 웹사이트로 이동하는 링크가 걸린 이름 혹은 로고가 여기에 걸립니다.
-**Supporter Tier**
+**후원자 티어**
- [Appwrite](https://appwrite.io/)
@@ -438,4 +442,4 @@ Support this project by [becoming a sponsor](https://github.com/sponsors/starshi
## 📝라이선스
-Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors). This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.
+Copyright © 2019-현재, [Starship 기여자](https://github.com/starship/starship/graphs/contributors). 이 프로젝트는 [ISC](https://github.com/starship/starship/blob/master/LICENSE) 라이선스입니다.
diff --git a/docs/ko-KR/installing/README.md b/docs/ko-KR/installing/README.md
index bf2e01baf..e25fffbd9 100644
--- a/docs/ko-KR/installing/README.md
+++ b/docs/ko-KR/installing/README.md
@@ -63,7 +63,7 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett
{
programs.starship = {
enable = true;
- # Configuration written to ~/.config/starship.toml
+ # ~/.config/starship.toml에 작성된 설정
settings = {
# add_newline = false;
diff --git a/docs/ko-KR/migrating-to-0.45.0/README.md b/docs/ko-KR/migrating-to-0.45.0/README.md
index 18661c3ba..3886acc55 100644
--- a/docs/ko-KR/migrating-to-0.45.0/README.md
+++ b/docs/ko-KR/migrating-to-0.45.0/README.md
@@ -80,7 +80,7 @@ format = "took [$duration]($style) "
| Removed Property | Replacement |
| ----------------------- | ---------------- |
-| `symbol` | `success_symbol` |
+| `기호` | `success_symbol` |
| `use_symbol_for_status` | `error_symbol` |
| `style_success` | `success_symbol` |
| `style_failure` | `error_symbol` |
diff --git a/docs/ko-KR/presets/README.md b/docs/ko-KR/presets/README.md
index 3903bc17a..7d41e37cb 100644
--- a/docs/ko-KR/presets/README.md
+++ b/docs/ko-KR/presets/README.md
@@ -1,14 +1,14 @@
-# Presets
+# 프리셋
-Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
+커뮤니티가 제공한 Starship 설정 프리셋의 모음집입니다. 공유할 프리셋이 있다면 이 파일을 [수정하는 PR을 제출](https://github.com/starship/starship/edit/master/docs/presets/README.md)해 주세요! 😊
-To get details on how to use a preset, simply click on the image.
+프리셋 사용 방법에 대한 자세한 내용을 보려면 이미지를 클릭하기만 하면 됩니다.
-## [Nerd Font Symbols](./nerd-font.md)
+## [Nerd Font 기호](./nerd-font.md)
-This preset changes the symbols for each module to use Nerd Font symbols.
+이 프리셋은 각 모듈의 기호가 Nerd Font 기호를 사용하도록 변경합니다.
-[![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font)
+[![Nerd Font 기호 프리셋 스크린샷](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font)
## [No Nerd Fonts](./no-nerd-font.md)
@@ -16,11 +16,11 @@ This preset changes the symbols for several modules so that no Nerd Font symbols
::: tip
-This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544).
+이 프리셋은 [starship의 추후 배포](https://github.com/starship/starship/pull/3544)에서 기본 프리셋이 될 예정입니다.
:::
-[Click to view No Nerd Font preset](./no-nerd-font)
+[클릭하여 No Nerd Font 프리셋 보기](./no-nerd-font)
## [Bracketed Segments](./bracketed-segments.md)
@@ -40,17 +40,17 @@ This preset hides the version of language runtimes. If you work in containers or
[![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes)
-## [No Empty Icons](./no-empty-icons.md)
+## [빈 아이콘 제거](./no-empty-icons.md)
-This preset does not show icons if the toolset is not found.
+이 프리셋은 툴셋을 찾을 수 없을 때 아이콘을 표시하지 않습니다.
[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md)
## [Pure Prompt](./pure-preset.md)
-This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
+이 프리셋은 [Pure](https://github.com/sindresorhus/pure)의 모습과 동작을 재현합니다.
-[![Screenshot of Pure preset](/presets/img/pure-preset.png "Click to view Pure Prompt preset")](./pure-preset)
+[![Pure 프리셋 스크린샷](/presets/img/pure-preset.png "Click to view Pure Prompt preset")](./pure-preset)
## [Pastel Powerline](./pastel-powerline.md)
@@ -60,6 +60,12 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
## [Tokyo Night](./tokyo-night.md)
-This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
+이 프리셋은 [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme)에서 영감을 받았습니다.
-[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+[![Tokyo Night 프리셋 스크린샷](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+이 프리셋은 [Pastel Powerline](./pastel-powerline.md) 및 [Tokyo Night](./tokyo-night.md)에서 강하게 영감을 받았습니다.
+
+[![Gruvbox Rainbow 프리셋 스크린샷](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow)
diff --git a/docs/ko-KR/presets/bracketed-segments.md b/docs/ko-KR/presets/bracketed-segments.md
index 982afb20e..8d6430df2 100644
--- a/docs/ko-KR/presets/bracketed-segments.md
+++ b/docs/ko-KR/presets/bracketed-segments.md
@@ -1,4 +1,4 @@
-[Return to Presets](./README.md#bracketed-segments)
+[프리셋으로 돌아가기](./README.md#bracketed-segments)
# Bracketed Segments Preset
@@ -6,12 +6,12 @@ This preset changes the format of all the built-in modules to show their segment
![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png)
-### Configuration
+### 설정
```sh
starship preset bracketed-segments -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/bracketed-segments.toml)
+[클릭하여 TOML 다운로드](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml
diff --git a/docs/ko-KR/presets/gruvbox-rainbow.md b/docs/ko-KR/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..e7b246a17
--- /dev/null
+++ b/docs/ko-KR/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[프리셋으로 돌아가기](./README.md#gruvbox-rainbow)
+
+# Gruvbox Rainbow 프리셋
+
+이 프리셋은 [Pastel Powerline](./pastel-powerline.md) 및 [Tokyo Night](./tokyo-night.md)에서 강하게 영감을 받았습니다.
+
+![Gruvbox Rainbow 프리셋 스크린샷](/presets/img/gruvbox-rainbow.png)
+
+### 준비 사항
+
+- 터미널에 [Nerd Font](https://www.nerdfonts.com/) 설치 및 활성화
+
+### 설정
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[클릭하여 TOML 다운로드](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/ko-KR/presets/jetpack.md b/docs/ko-KR/presets/jetpack.md
new file mode 100644
index 000000000..ada3e0952
--- /dev/null
+++ b/docs/ko-KR/presets/jetpack.md
@@ -0,0 +1,24 @@
+[프리셋으로 돌아가기](./README.md#jetpack)
+
+# Jetpack Preset
+
+This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
+
+> Jetpack uses the terminal's color theme.
+
+![Screenshot of Jetpack preset](/presets/img/jetpack.png)
+
+### Prerequisite
+
+- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
+
+### 설정
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[클릭하여 TOML 다운로드](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/ko-KR/presets/nerd-font.md b/docs/ko-KR/presets/nerd-font.md
index 6df403281..f4c6c6ea1 100644
--- a/docs/ko-KR/presets/nerd-font.md
+++ b/docs/ko-KR/presets/nerd-font.md
@@ -1,21 +1,21 @@
-[Return to Presets](./README.md#nerd-font-symbols)
+[프리셋으로 돌아가기](./README.md#nerd-font-symbols)
-# Nerd Font Symbols Preset
+# Nerd Font 기호 프리셋
-This preset changes the symbols for each module to use Nerd Font symbols.
+이 프리셋은 각 모듈의 기호가 Nerd Font 기호를 사용하도록 변경합니다.
-![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png)
+![Nerd Font 기호 프리셋 스크린샷](/presets/img/nerd-font-symbols.png)
-### 준비 사항
+### 필요 사항
-- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
+- 터미널에 [Nerd Font](https://www.nerdfonts.com/) 설치 및 활성화 (예시에서는 Fira Code Nerd Font를 사용합니다.)
-### Configuration
+### 설정
```sh
starship preset nerd-font-symbols -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
+[클릭하여 TOML 다운로드](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml
diff --git a/docs/ko-KR/presets/no-empty-icons.md b/docs/ko-KR/presets/no-empty-icons.md
index aa4a211fd..c3f429735 100644
--- a/docs/ko-KR/presets/no-empty-icons.md
+++ b/docs/ko-KR/presets/no-empty-icons.md
@@ -1,4 +1,4 @@
-[Return to Presets](./README.md#no-empty-icons)
+[프리셋으로 돌아가기](./README.md#no-empty-icons)
# No Empty Icons Preset
@@ -6,12 +6,12 @@ If toolset files are identified the toolset icon is displayed. If the toolset is
![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png)
-### Configuration
+### 설정
```sh
starship preset no-empty-icons -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/no-empty-icons.toml)
+[클릭하여 TOML 다운로드](/presets/toml/no-empty-icons.toml)
<<< @/.vuepress/public/presets/toml/no-empty-icons.toml
diff --git a/docs/ko-KR/presets/no-nerd-font.md b/docs/ko-KR/presets/no-nerd-font.md
index a70e85e76..6f73477e4 100644
--- a/docs/ko-KR/presets/no-nerd-font.md
+++ b/docs/ko-KR/presets/no-nerd-font.md
@@ -1,4 +1,4 @@
-[Return to Presets](./README.md#no-nerd-fonts)
+[프리셋으로 돌아가기](./README.md#no-nerd-fonts)
# No Nerd Fonts Preset
@@ -8,12 +8,12 @@ This means that even without a Nerd Font installed, you should be able to view a
This preset will become the default preset in a future release of starship.
-### Configuration
+### 설정
```sh
starship preset no-nerd-font -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/no-nerd-font.toml)
+[클릭하여 TOML 다운로드](/presets/toml/no-nerd-font.toml)
<<< @/.vuepress/public/presets/toml/no-nerd-font.toml
diff --git a/docs/ko-KR/presets/no-runtimes.md b/docs/ko-KR/presets/no-runtimes.md
index c0805d111..767a45f04 100644
--- a/docs/ko-KR/presets/no-runtimes.md
+++ b/docs/ko-KR/presets/no-runtimes.md
@@ -1,4 +1,4 @@
-[Return to Presets](./README.md#no-runtime-versions)
+[프리셋으로 돌아가기](./README.md#no-runtime-versions)
# No Runtime Versions Preset
@@ -6,12 +6,12 @@ This preset hides the version of language runtimes. If you work in containers or
![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png)
-### Configuration
+### 설정
```sh
starship preset no-runtime-versions -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/no-runtime-versions.toml)
+[클릭하여 TOML 다운로드](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml
diff --git a/docs/ko-KR/presets/pastel-powerline.md b/docs/ko-KR/presets/pastel-powerline.md
index 38f7438d3..477afea29 100644
--- a/docs/ko-KR/presets/pastel-powerline.md
+++ b/docs/ko-KR/presets/pastel-powerline.md
@@ -1,4 +1,4 @@
-[Return to Presets](./README.md#pastel-powerline)
+[프리셋으로 돌아가기](./README.md#pastel-powerline)
# Pastel Powerline Preset
@@ -10,12 +10,12 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Caskaydia Cove Nerd Font)
-### Configuration
+### 설정
```sh
starship preset pastel-powerline -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/pastel-powerline.toml)
+[클릭하여 TOML 다운로드](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml
diff --git a/docs/ko-KR/presets/plain-text.md b/docs/ko-KR/presets/plain-text.md
index 1e17b4bc0..e2d1087f3 100644
--- a/docs/ko-KR/presets/plain-text.md
+++ b/docs/ko-KR/presets/plain-text.md
@@ -1,4 +1,4 @@
-[Return to Presets](./README.md#plain-text-symbols)
+[프리셋으로 돌아가기](./README.md#plain-text-symbols)
## Plain Text Symbols Preset
@@ -6,12 +6,12 @@ This preset changes the symbols for each module into plain text. Great if you do
![Screenshot of Plain Text Symbols preset](/presets/img/plain-text-symbols.png)
-### Configuration
+### 설정
```sh
starship preset plain-text-symbols -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/plain-text-symbols.toml)
+[클릭하여 TOML 다운로드](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml
diff --git a/docs/ko-KR/presets/pure-preset.md b/docs/ko-KR/presets/pure-preset.md
index b75a00565..fec4b5720 100644
--- a/docs/ko-KR/presets/pure-preset.md
+++ b/docs/ko-KR/presets/pure-preset.md
@@ -1,17 +1,17 @@
-[Return to Presets](./README.md#pure)
+[프리셋으로 돌아가기](./README.md#pure)
-# Pure Preset
+# Pure 프리셋
-This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
+이 프리셋은 [Pure](https://github.com/sindresorhus/pure)의 모습과 동작을 재현합니다.
-![Screenshot of Pure preset](/presets/img/pure-preset.png)
+![Pure 프리셋 스크린샷](/presets/img/pure-preset.png)
-### Configuration
+### 설정
```sh
starship preset pure-preset -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/pure-preset.toml)
+[클릭하여 TOML 다운로드](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml
diff --git a/docs/ko-KR/presets/tokyo-night.md b/docs/ko-KR/presets/tokyo-night.md
index 387025987..fb3a3a3a5 100644
--- a/docs/ko-KR/presets/tokyo-night.md
+++ b/docs/ko-KR/presets/tokyo-night.md
@@ -1,21 +1,21 @@
-[Return to Presets](./README.md#pastel-powerline)
+[프리셋으로 돌아가기](./README.md#pastel-powerline)
-# Tokyo Night Preset
+# Tokyo Night 프리셋
-This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
+이 프리셋은 [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme)에서 영감을 받았습니다.
-![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png)
+![Tokyo Night 프리셋 스크린샷](/presets/img/tokyo-night.png)
### 준비 사항
-- 터미널에 [Nerd Font](https://www.nerdfonts.com/)가 설치되어 있고 사용 가능해야 합니다
+- 터미널에 [Nerd Font](https://www.nerdfonts.com/) 설치 및 활성화
-### Configuration
+### 설정
```sh
starship preset tokyo-night -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/tokyo-night.toml)
+[클릭하여 TOML 다운로드](/presets/toml/tokyo-night.toml)
<<< @/.vuepress/public/presets/toml/tokyo-night.toml
diff --git a/docs/nl-NL/config/README.md b/docs/nl-NL/config/README.md
index 396fbb2c9..dccdabf20 100644
--- a/docs/nl-NL/config/README.md
+++ b/docs/nl-NL/config/README.md
@@ -206,6 +206,13 @@ This is the list of prompt-wide configuration options.
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
+
+::: tip
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
### Example
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### Options
| Option | Default | Description |
@@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform
| `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. |
| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. |
| `style` | `'bold yellow'` | The style for the module. |
-| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
+| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. |
| `disabled` | `false` | Disables the `AWS` module. |
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
@@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu
### Options
-| Option | Default | Description |
-| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
-| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'C '` | The symbol used before displaying the compiler details |
-| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
-| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is |
-| `style` | `'bold 149'` | The style for the module. |
-| `disabled` | `false` | Disables the `c` module. |
+| Option | Default | Description |
+| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'C '` | The symbol used before displaying the compiler details |
+| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
+| `detect_files` | `[]` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is |
+| `style` | `'bold 149'` | The style for the module. |
+| `disabled` | `false` | Disables the `c` module. |
### Variables
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### Options
+
+| Option | Default | Description |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. |
+| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | The style for the module. |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | Which extensions should trigger this module. |
+| `detect_files` | `['.envrc']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### Variables
+
+| Variable | Example | Description |
+| --------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| symbol | | Mirrors the value of option `symbol`. |
+| style\* | `red bold` | Mirrors the value of option `style`. |
+
+*: This variable can only be used as a part of a style string
+
+### Example
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## 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` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
@@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. |
| `style` | `'bold green'` | The style for the module. |
-| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. |
+| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `false` | Disables the `fennel` module. |
@@ -1524,11 +1577,46 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
+
+### Options
+
+| Option | Default | Description |
+| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
+| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
+| `added_style` | `'bold green'` | The style for the added count. |
+| `deleted_style` | `'bold red'` | The style for the deleted count. |
+| `only_nonzero_diffs` | `true` | Render status only for changed items. |
+| `disabled` | `true` | Disables the `fossil_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
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
-When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set.
+When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set.
### Options
@@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel
| Option | Default | Description |
| ---------- | -------------------------- | ------------------------------------------------------ |
| `format` | `'via [$symbol]($style) '` | The format for the module. |
-| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. |
-| `style` | `"yellow bold"` | The style for the module. |
+| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. |
+| `style` | `'yellow bold'` | The style for the module. |
| `disabled` | `false` | Disables the `guix_shell` module. |
### Variables
@@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. |
-| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. |
+| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `["gradle"]` | Which folders should trigger this module. |
-| `style` | `"bold bright-cyan"` | The style for the module. |
+| `detect_folders` | `['gradle']` | Which folders should trigger this module. |
+| `style` | `'bold bright-cyan'` | The style for the module. |
| `disabled` | `false` | Disables the `gradle` module. |
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
@@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| Option | Default | Description |
| ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. |
-| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. |
-| `style` | `"bold fg:202"` | The style for the module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
+| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. |
+| `style` | `'bold fg:202'` | The style for the module. |
| `disabled` | `false` | Disables the `haxe` module. |
### Variables
@@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname.
### Options
-| Option | Default | Description |
-| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
-| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
-| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
-| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation |
-| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. |
-| `style` | `'bold dimmed green'` | The style for the module. |
-| `disabled` | `false` | Disables the `hostname` module. |
+| Option | Default | Description |
+| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
+| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
+| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
+| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. |
+| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
+| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. |
+| `style` | `'bold dimmed green'` | The style for the module. |
+| `disabled` | `false` | Disables the `hostname` module. |
### Variables
@@ -2126,7 +2215,9 @@ The `hostname` module shows the system hostname.
*: This variable can only be used as a part of a style string
-### Example
+### Examples
+
+#### Always show the hostname
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Hide the hostname in remote tmux sessions
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
@@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes
-Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
+Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
::: tip
@@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### Options
+::: warning
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
| Option | Default | Description |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `'cyan bold'` | The style for the module. |
-| `context_aliases` | `{}` | Table of context aliases to display. |
-| `user_aliases` | `{}` | Table of user aliases to display. |
+| `context_aliases`* | `{}` | Table of context aliases to display. |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
+| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. |
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| Variable | Description |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `style` | The style for the module when using this context. If not set, will use module's style. |
+| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### Variables
| Variable | Example | Description |
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Regex Matching
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
-
-Long and automatically generated cluster names can be identified and shortened using regular expressions:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Line Break
@@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| `detect_folders` | `['node_modules']` | Which folders should trigger this module. |
| `style` | `'bold green'` | The style for the module. |
| `disabled` | `false` | Disables the `nodejs` module. |
-| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. |
+| `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
@@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Default | Description |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | The format for the module. |
-| `style` | `"bold white"` | The style for the module. |
+| `format` | `'[$symbol]($style)'` | The format for the module. |
+| `style` | `'bold white'` | The style for the module. |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met:
| `symbol` | `'🐍 '` | A format string representing the symbol of Python |
| `style` | `'yellow bold'` | The style for the module. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
-| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used |
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
| `detect_extensions` | `['py']` | Which extensions should trigger this module |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
@@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
-| Option | Default | Description |
-| ---------------------- | ------------------------- | ------------------------------------------------------------ |
-| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
-| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
-| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
-| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
-| `ion_indicator` | `'ion'` | A format string used to represent ion. |
-| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
-| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
-| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
-| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
-| `nu_indicator` | `'nu'` | A format string used to represent nu. |
-| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
-| `format` | `'[$indicator]($style) '` | The format for the module. |
-| `style` | `'white bold'` | The style for the module. |
-| `disabled` | `true` | Disables the `shell` module. |
+| Option | Default | Description |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
+| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
+| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
+| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | A format string used to represent ion. |
+| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
+| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
+| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
+| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
+| `nu_indicator` | `'nu'` | A format string used to represent nu. |
+| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
+| `format` | `'[$indicator]($style) '` | The format for the module. |
+| `style` | `'white bold'` | The style for the module. |
+| `disabled` | `true` | Disables the `shell` module. |
### Variables
@@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `style` | `"bold blue"` | The style for the module. |
+| `style` | `'bold blue'` | The style for the module. |
| `disabled` | `false` | Disables this module. |
### Variables
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+By default, the module will be shown if any of the following conditions are met:
+
+- The current directory contains a `template.typ` file
+- The current directory contains any `*.typ` file
+
+### Options
+
+| Option | Default | Description |
+| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'t '` | A format string representing the symbol of Daml |
+| `style` | `'bold #0093A7'` | The style for the module. |
+| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. |
+| `detect_files` | `['template.typ']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `disabled` | `false` | Disables the `daml` module. |
+
+### Variables
+
+| Variable | Example | Description |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+*: This variable can only be used as a part of a style string
+
## Username
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
diff --git a/docs/nl-NL/faq/README.md b/docs/nl-NL/faq/README.md
index 41bb2d391..1f8484406 100644
--- a/docs/nl-NL/faq/README.md
+++ b/docs/nl-NL/faq/README.md
@@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/nl-NL/guide/README.md b/docs/nl-NL/guide/README.md
index ec9b9d834..c4a18ddb1 100644
--- a/docs/nl-NL/guide/README.md
+++ b/docs/nl-NL/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Volg @StarshipPrompt op Twitter"
/>
+
@@ -147,8 +152,6 @@
/>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
diff --git a/docs/nl-NL/presets/README.md b/docs/nl-NL/presets/README.md
index 3903bc17a..2e332ad14 100644
--- a/docs/nl-NL/presets/README.md
+++ b/docs/nl-NL/presets/README.md
@@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow)
diff --git a/docs/nl-NL/presets/gruvbox-rainbow.md b/docs/nl-NL/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..8f342a046
--- /dev/null
+++ b/docs/nl-NL/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[Return to Presets](./README.md#gruvbox-rainbow)
+
+# Gruvbox Rainbow Preset
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png)
+
+### Benodigdheden
+
+- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal
+
+### Configuration
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/nl-NL/presets/jetpack.md b/docs/nl-NL/presets/jetpack.md
new file mode 100644
index 000000000..0f52a9a9e
--- /dev/null
+++ b/docs/nl-NL/presets/jetpack.md
@@ -0,0 +1,24 @@
+[Return to Presets](./README.md#jetpack)
+
+# Jetpack Preset
+
+This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
+
+> Jetpack uses the terminal's color theme.
+
+![Screenshot of Jetpack preset](/presets/img/jetpack.png)
+
+### Prerequisite
+
+- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
+
+### Configuration
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/no-NO/config/README.md b/docs/no-NO/config/README.md
index 396fbb2c9..dccdabf20 100644
--- a/docs/no-NO/config/README.md
+++ b/docs/no-NO/config/README.md
@@ -206,6 +206,13 @@ This is the list of prompt-wide configuration options.
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
+
+::: tip
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
### Example
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### Options
| Option | Default | Description |
@@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform
| `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. |
| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. |
| `style` | `'bold yellow'` | The style for the module. |
-| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
+| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. |
| `disabled` | `false` | Disables the `AWS` module. |
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
@@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu
### Options
-| Option | Default | Description |
-| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
-| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'C '` | The symbol used before displaying the compiler details |
-| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
-| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is |
-| `style` | `'bold 149'` | The style for the module. |
-| `disabled` | `false` | Disables the `c` module. |
+| Option | Default | Description |
+| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'C '` | The symbol used before displaying the compiler details |
+| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
+| `detect_files` | `[]` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is |
+| `style` | `'bold 149'` | The style for the module. |
+| `disabled` | `false` | Disables the `c` module. |
### Variables
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### Options
+
+| Option | Default | Description |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. |
+| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | The style for the module. |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | Which extensions should trigger this module. |
+| `detect_files` | `['.envrc']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### Variables
+
+| Variable | Example | Description |
+| --------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| symbol | | Mirrors the value of option `symbol`. |
+| style\* | `red bold` | Mirrors the value of option `style`. |
+
+*: This variable can only be used as a part of a style string
+
+### Example
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## 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` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
@@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. |
| `style` | `'bold green'` | The style for the module. |
-| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. |
+| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `false` | Disables the `fennel` module. |
@@ -1524,11 +1577,46 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
+
+### Options
+
+| Option | Default | Description |
+| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
+| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
+| `added_style` | `'bold green'` | The style for the added count. |
+| `deleted_style` | `'bold red'` | The style for the deleted count. |
+| `only_nonzero_diffs` | `true` | Render status only for changed items. |
+| `disabled` | `true` | Disables the `fossil_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
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
-When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set.
+When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set.
### Options
@@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel
| Option | Default | Description |
| ---------- | -------------------------- | ------------------------------------------------------ |
| `format` | `'via [$symbol]($style) '` | The format for the module. |
-| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. |
-| `style` | `"yellow bold"` | The style for the module. |
+| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. |
+| `style` | `'yellow bold'` | The style for the module. |
| `disabled` | `false` | Disables the `guix_shell` module. |
### Variables
@@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. |
-| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. |
+| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `["gradle"]` | Which folders should trigger this module. |
-| `style` | `"bold bright-cyan"` | The style for the module. |
+| `detect_folders` | `['gradle']` | Which folders should trigger this module. |
+| `style` | `'bold bright-cyan'` | The style for the module. |
| `disabled` | `false` | Disables the `gradle` module. |
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
@@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| Option | Default | Description |
| ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. |
-| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. |
-| `style` | `"bold fg:202"` | The style for the module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
+| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. |
+| `style` | `'bold fg:202'` | The style for the module. |
| `disabled` | `false` | Disables the `haxe` module. |
### Variables
@@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname.
### Options
-| Option | Default | Description |
-| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
-| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
-| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
-| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation |
-| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. |
-| `style` | `'bold dimmed green'` | The style for the module. |
-| `disabled` | `false` | Disables the `hostname` module. |
+| Option | Default | Description |
+| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
+| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
+| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
+| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. |
+| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
+| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. |
+| `style` | `'bold dimmed green'` | The style for the module. |
+| `disabled` | `false` | Disables the `hostname` module. |
### Variables
@@ -2126,7 +2215,9 @@ The `hostname` module shows the system hostname.
*: This variable can only be used as a part of a style string
-### Example
+### Examples
+
+#### Always show the hostname
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Hide the hostname in remote tmux sessions
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
@@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes
-Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
+Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
::: tip
@@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### Options
+::: warning
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
| Option | Default | Description |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `'cyan bold'` | The style for the module. |
-| `context_aliases` | `{}` | Table of context aliases to display. |
-| `user_aliases` | `{}` | Table of user aliases to display. |
+| `context_aliases`* | `{}` | Table of context aliases to display. |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
+| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. |
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| Variable | Description |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `style` | The style for the module when using this context. If not set, will use module's style. |
+| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### Variables
| Variable | Example | Description |
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Regex Matching
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
-
-Long and automatically generated cluster names can be identified and shortened using regular expressions:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Line Break
@@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| `detect_folders` | `['node_modules']` | Which folders should trigger this module. |
| `style` | `'bold green'` | The style for the module. |
| `disabled` | `false` | Disables the `nodejs` module. |
-| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. |
+| `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
@@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Default | Description |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | The format for the module. |
-| `style` | `"bold white"` | The style for the module. |
+| `format` | `'[$symbol]($style)'` | The format for the module. |
+| `style` | `'bold white'` | The style for the module. |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met:
| `symbol` | `'🐍 '` | A format string representing the symbol of Python |
| `style` | `'yellow bold'` | The style for the module. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
-| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used |
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
| `detect_extensions` | `['py']` | Which extensions should trigger this module |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
@@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
-| Option | Default | Description |
-| ---------------------- | ------------------------- | ------------------------------------------------------------ |
-| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
-| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
-| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
-| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
-| `ion_indicator` | `'ion'` | A format string used to represent ion. |
-| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
-| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
-| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
-| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
-| `nu_indicator` | `'nu'` | A format string used to represent nu. |
-| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
-| `format` | `'[$indicator]($style) '` | The format for the module. |
-| `style` | `'white bold'` | The style for the module. |
-| `disabled` | `true` | Disables the `shell` module. |
+| Option | Default | Description |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
+| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
+| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
+| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | A format string used to represent ion. |
+| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
+| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
+| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
+| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
+| `nu_indicator` | `'nu'` | A format string used to represent nu. |
+| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
+| `format` | `'[$indicator]($style) '` | The format for the module. |
+| `style` | `'white bold'` | The style for the module. |
+| `disabled` | `true` | Disables the `shell` module. |
### Variables
@@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `style` | `"bold blue"` | The style for the module. |
+| `style` | `'bold blue'` | The style for the module. |
| `disabled` | `false` | Disables this module. |
### Variables
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+By default, the module will be shown if any of the following conditions are met:
+
+- The current directory contains a `template.typ` file
+- The current directory contains any `*.typ` file
+
+### Options
+
+| Option | Default | Description |
+| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'t '` | A format string representing the symbol of Daml |
+| `style` | `'bold #0093A7'` | The style for the module. |
+| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. |
+| `detect_files` | `['template.typ']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `disabled` | `false` | Disables the `daml` module. |
+
+### Variables
+
+| Variable | Example | Description |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+*: This variable can only be used as a part of a style string
+
## Username
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
diff --git a/docs/no-NO/faq/README.md b/docs/no-NO/faq/README.md
index 41bb2d391..1f8484406 100644
--- a/docs/no-NO/faq/README.md
+++ b/docs/no-NO/faq/README.md
@@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/no-NO/guide/README.md b/docs/no-NO/guide/README.md
index f74b800c8..8257069bf 100644
--- a/docs/no-NO/guide/README.md
+++ b/docs/no-NO/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Følg @StarshipPrompt på Twitter"
/>
+
@@ -147,8 +152,6 @@
/>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
diff --git a/docs/no-NO/presets/README.md b/docs/no-NO/presets/README.md
index 3903bc17a..2e332ad14 100644
--- a/docs/no-NO/presets/README.md
+++ b/docs/no-NO/presets/README.md
@@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow)
diff --git a/docs/no-NO/presets/gruvbox-rainbow.md b/docs/no-NO/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..cfe75913d
--- /dev/null
+++ b/docs/no-NO/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[Return to Presets](./README.md#gruvbox-rainbow)
+
+# Gruvbox Rainbow Preset
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png)
+
+### Nødvendig forutsetninger
+
+- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal
+
+### Configuration
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/no-NO/presets/jetpack.md b/docs/no-NO/presets/jetpack.md
new file mode 100644
index 000000000..0f52a9a9e
--- /dev/null
+++ b/docs/no-NO/presets/jetpack.md
@@ -0,0 +1,24 @@
+[Return to Presets](./README.md#jetpack)
+
+# Jetpack Preset
+
+This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
+
+> Jetpack uses the terminal's color theme.
+
+![Screenshot of Jetpack preset](/presets/img/jetpack.png)
+
+### Prerequisite
+
+- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
+
+### Configuration
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/pl-PL/config/README.md b/docs/pl-PL/config/README.md
index 10c03d706..a39cc9bb0 100644
--- a/docs/pl-PL/config/README.md
+++ b/docs/pl-PL/config/README.md
@@ -206,6 +206,13 @@ This is the list of prompt-wide configuration options.
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
+
+::: porada
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
### Example
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### Options
| Option | Default | Description |
@@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform
| `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. |
| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. |
| `style` | `'bold yellow'` | The style for the module. |
-| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
+| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. |
| `disabled` | `false` | Disables the `AWS` module. |
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
@@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu
### Options
-| Option | Default | Description |
-| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
-| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'C '` | The symbol used before displaying the compiler details |
-| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
-| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is |
-| `style` | `'bold 149'` | The style for the module. |
-| `disabled` | `false` | Disables the `c` module. |
+| Option | Default | Description |
+| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'C '` | The symbol used before displaying the compiler details |
+| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
+| `detect_files` | `[]` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is |
+| `style` | `'bold 149'` | The style for the module. |
+| `disabled` | `false` | Disables the `c` module. |
### Variables
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### Options
+
+| Option | Default | Description |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. |
+| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | The style for the module. |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | Which extensions should trigger this module. |
+| `detect_files` | `['.envrc']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### Variables
+
+| Zmienne | Example | Description |
+| --------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| symbol | | Mirrors the value of option `symbol`. |
+| style\* | `red bold` | Mirrors the value of option `style`. |
+
+*: This variable can only be used as a part of a style string
+
+### Example
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## 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` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
@@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. |
| `style` | `'bold green'` | The style for the module. |
-| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. |
+| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `false` | Disables the `fennel` module. |
@@ -1524,11 +1577,46 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
+
+### Options
+
+| Option | Default | Description |
+| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
+| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
+| `added_style` | `'bold green'` | The style for the added count. |
+| `deleted_style` | `'bold red'` | The style for the deleted count. |
+| `only_nonzero_diffs` | `true` | Render status only for changed items. |
+| `disabled` | `true` | Disables the `fossil_metrics` module. |
+
+### Variables
+
+| Zmienne | 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
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
-When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set.
+When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set.
### Options
@@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel
| Option | Default | Description |
| ---------- | -------------------------- | ------------------------------------------------------ |
| `format` | `'via [$symbol]($style) '` | The format for the module. |
-| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. |
-| `style` | `"yellow bold"` | The style for the module. |
+| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. |
+| `style` | `'yellow bold'` | The style for the module. |
| `disabled` | `false` | Disables the `guix_shell` module. |
### Variables
@@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. |
-| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. |
+| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `["gradle"]` | Which folders should trigger this module. |
-| `style` | `"bold bright-cyan"` | The style for the module. |
+| `detect_folders` | `['gradle']` | Which folders should trigger this module. |
+| `style` | `'bold bright-cyan'` | The style for the module. |
| `disabled` | `false` | Disables the `gradle` module. |
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
@@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| Option | Default | Description |
| ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. |
-| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. |
-| `style` | `"bold fg:202"` | The style for the module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
+| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. |
+| `style` | `'bold fg:202'` | The style for the module. |
| `disabled` | `false` | Disables the `haxe` module. |
### Variables
@@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname.
### Options
-| Option | Default | Description |
-| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
-| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
-| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
-| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation |
-| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. |
-| `style` | `'bold dimmed green'` | The style for the module. |
-| `disabled` | `false` | Disables the `hostname` module. |
+| Option | Default | Description |
+| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
+| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
+| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
+| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. |
+| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
+| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. |
+| `style` | `'bold dimmed green'` | The style for the module. |
+| `disabled` | `false` | Disables the `hostname` module. |
### Variables
@@ -2126,7 +2215,9 @@ The `hostname` module shows the system hostname.
*: This variable can only be used as a part of a style string
-### Example
+### Examples
+
+#### Always show the hostname
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Hide the hostname in remote tmux sessions
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
@@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes
-Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
+Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
::: porada
@@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### Options
+::: warning
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
| Option | Default | Description |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `'cyan bold'` | The style for the module. |
-| `context_aliases` | `{}` | Table of context aliases to display. |
-| `user_aliases` | `{}` | Table of user aliases to display. |
+| `context_aliases`* | `{}` | Table of context aliases to display. |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
+| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. |
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| Zmienne | Description |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `style` | The style for the module when using this context. If not set, will use module's style. |
+| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### Variables
| Zmienne | Example | Description |
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Regex Matching
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
-
-Long and automatically generated cluster names can be identified and shortened using regular expressions:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Line Break
@@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| `detect_folders` | `['node_modules']` | Which folders should trigger this module. |
| `style` | `'bold green'` | The style for the module. |
| `disabled` | `false` | Disables the `nodejs` module. |
-| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. |
+| `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
@@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Default | Description |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | The format for the module. |
-| `style` | `"bold white"` | The style for the module. |
+| `format` | `'[$symbol]($style)'` | The format for the module. |
+| `style` | `'bold white'` | The style for the module. |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met:
| `symbol` | `'🐍 '` | A format string representing the symbol of Python |
| `style` | `'yellow bold'` | The style for the module. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
-| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used |
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
| `detect_extensions` | `['py']` | Which extensions should trigger this module |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
@@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
-| Option | Default | Description |
-| ---------------------- | ------------------------- | ------------------------------------------------------------ |
-| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
-| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
-| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
-| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
-| `ion_indicator` | `'ion'` | A format string used to represent ion. |
-| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
-| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
-| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
-| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
-| `nu_indicator` | `'nu'` | A format string used to represent nu. |
-| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
-| `format` | `'[$indicator]($style) '` | The format for the module. |
-| `style` | `'white bold'` | The style for the module. |
-| `disabled` | `true` | Disables the `shell` module. |
+| Option | Default | Description |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
+| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
+| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
+| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | A format string used to represent ion. |
+| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
+| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
+| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
+| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
+| `nu_indicator` | `'nu'` | A format string used to represent nu. |
+| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
+| `format` | `'[$indicator]($style) '` | The format for the module. |
+| `style` | `'white bold'` | The style for the module. |
+| `disabled` | `true` | Disables the `shell` module. |
### Variables
@@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `style` | `"bold blue"` | The style for the module. |
+| `style` | `'bold blue'` | The style for the module. |
| `disabled` | `false` | Disables this module. |
### Variables
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+By default, the module will be shown if any of the following conditions are met:
+
+- The current directory contains a `template.typ` file
+- The current directory contains any `*.typ` file
+
+### Options
+
+| Option | Default | Description |
+| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'t '` | A format string representing the symbol of Daml |
+| `style` | `'bold #0093A7'` | The style for the module. |
+| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. |
+| `detect_files` | `['template.typ']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `disabled` | `false` | Disables the `daml` module. |
+
+### Variables
+
+| Zmienne | Example | Description |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+*: This variable can only be used as a part of a style string
+
## Username
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
diff --git a/docs/pl-PL/faq/README.md b/docs/pl-PL/faq/README.md
index f88a28a5a..2757bc7b6 100644
--- a/docs/pl-PL/faq/README.md
+++ b/docs/pl-PL/faq/README.md
@@ -21,7 +21,7 @@ Yes, they can both be used to disable modules in the prompt. If all you plan to
- Disabling modules is more explicit than omitting them from the top level `format`
- Newly created modules will be added to the prompt as Starship is updated
-## Dokumentacja stwierdza że Starship jest wieloplatformowy. Dlaczego moja preferowana powłoka nie jest obsługiwana?
+## Dokumentacja twierdzi, że Starship jest wieloplatformowy. Dlaczego moja preferowana powłoka nie jest obsługiwana?
The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used.
@@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/pl-PL/guide/README.md b/docs/pl-PL/guide/README.md
index 0d5c72212..89a4d1b5d 100644
--- a/docs/pl-PL/guide/README.md
+++ b/docs/pl-PL/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Śledź @StarshipPrompt na Twitterze"
/>
+
@@ -147,8 +152,6 @@
/>
-[![SWUbaner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
diff --git a/docs/pl-PL/presets/README.md b/docs/pl-PL/presets/README.md
index f72d797b8..5bb82d8ec 100644
--- a/docs/pl-PL/presets/README.md
+++ b/docs/pl-PL/presets/README.md
@@ -63,3 +63,9 @@ Ten zestaw ustawień jest inspirowany [M365Princess](https://github.com/JanDeDo
Ten zestaw ustawień jest inspirowany [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
[![Zrzut ekranu ustawień Tokio Night](/presets/img/tokyo-night.png "Kliknij, aby wyświetlić ustawienia Tokio Night")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+Zestaw mocno inspirowany przez [Pastel Powerline](./pastel-powerline.md) i [Tokyo Night](./tokyo-night.md).
+
+[![Zrzut ekranu ustawień Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png "Kliknij, aby wyświetlić ustawienia Gruvbox Rainbow")](./gruvbox-rainbow)
diff --git a/docs/pl-PL/presets/gruvbox-rainbow.md b/docs/pl-PL/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..8e3abe06f
--- /dev/null
+++ b/docs/pl-PL/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[Powrót do ustawień predefiniowanych](./README.md#gruvbox-rainbow)
+
+# Ustawienia Gruvbox Rainbow
+
+Zestaw mocno inspirowany przez [Pastel Powerline](./pastel-powerline.md) i [Tokyo Night](./tokyo-night.md).
+
+![Zrzut ekranu ustawień Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png)
+
+### Wymagania wstępne
+
+- Czcionka typu [Nerd Font](https://www.nerdfonts.com/) zainstalowana i włączona w twoim terminalu
+
+### Konfiguracja
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[Kliknij, aby pobrać TOML](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/pl-PL/presets/jetpack.md b/docs/pl-PL/presets/jetpack.md
new file mode 100644
index 000000000..9206a9dc8
--- /dev/null
+++ b/docs/pl-PL/presets/jetpack.md
@@ -0,0 +1,24 @@
+[Powrót do ustawień predefiniowanych](./README.md#jetpack)
+
+# Jetpack Preset
+
+This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
+
+> Jetpack uses the terminal's color theme.
+
+![Screenshot of Jetpack preset](/presets/img/jetpack.png)
+
+### Wymaganie wstępne
+
+- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
+
+### Konfiguracja
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[Kliknij, aby pobrać TOML](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/pt-BR/config/README.md b/docs/pt-BR/config/README.md
index 897722b02..c27f521a3 100644
--- a/docs/pt-BR/config/README.md
+++ b/docs/pt-BR/config/README.md
@@ -206,6 +206,13 @@ Esta é a lista de opções de configuração em todo o prompt.
| `add_newline` | `true` | Insere linha vazia entre os prompts do shell. |
| `palette` | `''` | Define qual a paleta de cores de `palettes` será usada. |
| `palettes` | `{}` | Coleção de paletas de cores que atribuem [cores](/advanced-config/#style-strings) aos nomes definidos pelo usuário. Note que paletas de cores não podem referir-se a suas próprias definições de cores. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
+
+::: tip
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
### Exemplo
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ Quando usar [AWSume](https://awsu.me) o perfil é lido da variável `AWSUME_PROF
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### Opções
| Opções | Padrão | Descrição |
@@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform
| `region_aliases` | `{}` | Tabela de aleases de regiões a serem exibidas, além do nome da AWS. |
| `profile_aliases` | `{}` | Tabela de apelidos de perfil a serem exibidos além do nome da AWS. |
| `style` | `'bold yellow'` | O estilo do módulo. |
-| `expiration_symbol` | `X` | O simbolo exibido quando as credenciais temporárias estão expiradas. |
+| `expiration_symbol` | `'X'` | O simbolo exibido quando as credenciais temporárias estão expiradas. |
| `disabled` | `false` | Desabilita o módulo `AWS`. |
| `force_display` | `false` | Se `true` exibe as informações mesmo que `credentials`, `credential_process` ou `sso_start_url` não tenham sido configurados. |
@@ -423,7 +435,7 @@ Enterprise_Naming_Scheme-voidstars = 'void**'
## Azure
-O módulo `azure` exibe a assinatura Azure atual. This is based on showing the name of the default subscription or the username, as defined in the `~/.azure/azureProfile.json` file.
+O módulo `azure` exibe a assinatura Azure atual. Isto é baseado na exibição do nome da assinatura padrão ou no nome do usuário, como definido no arquivo `~/.azure/azureProfile.json`.
### Opções
@@ -620,17 +632,17 @@ O módulo `c` mostra algumas informações sobre o seu compilador de C. Por padr
### Opções
-| Opções | Padrão | Descrição |
-| ------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | A string de formato do módulo. |
-| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'C '` | O símbolo utilizado antes de exibir os detalhes do compilador |
-| `detect_extensions` | `['c', 'h']` | Quais extensões devem ativar este módulo. |
-| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. |
-| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | Como detectar qual é o compilador |
-| `style` | `'bold 149'` | O estilo do módulo. |
-| `disabled` | `false` | Desabilita o módulo `c`. |
+| Opções | Padrão | Descrição |
+| ------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | A string de formato do módulo. |
+| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'C '` | O símbolo utilizado antes de exibir os detalhes do compilador |
+| `detect_extensions` | `['c', 'h']` | Quais extensões devem ativar este módulo. |
+| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. |
+| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | Como detectar qual é o compilador |
+| `style` | `'bold 149'` | O estilo do módulo. |
+| `disabled` | `false` | Desabilita o módulo `c`. |
### Variáveis
@@ -671,7 +683,7 @@ O caractere vai te dizer se o ultimo comando foi bem sucedido ou não. Você pod
Por padrão ele apenas muda de cor. Se você deseja alterar o formato de uma olhada [neste exemplo](#with-custom-error-shape).
-::: warning
+::: atenção
`vimcmd_symbol` is only supported in cmd, fish and zsh. `vimcmd_replace_one_symbol`, `vimcmd_replace_symbol`, and `vimcmd_visual_symbol` are only supported in fish due to [upstream issues with mode detection in zsh](https://github.com/starship/starship/issues/625#issuecomment-732454148).
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### Opções
+
+| Opções | Padrão | Descrição |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | O formato do módulo. |
+| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | O estilo do módulo. |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. |
+| `detect_files` | `['.envrc']` | Quais nomes de arquivos devem ativar este módulo. |
+| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### Variáveis
+
+| Variável | Exemplo | Descrição |
+| --------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| symbol | | Espelha o valor da opção `symbol`. |
+| style\* | `red bold` | Espelha o valor da opção `style`. |
+
+*: Esta variável só pode ser usada como parte de uma string de estilo
+
+### Exemplo
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## Docker Context
O módulo `docker_context` exibe o [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) ativo atualmente se não estiver definido como `default` ou se as variáveis de ambiente `DOCKER_MACHINE_NAME`, `DOCKER_HOST` ou `DOCKER_CONTEXT` estiverem definidas (iram sobrescrever o contexto atual).
@@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. |
| `style` | `'bold green'` | O estilo do módulo. |
-| `detect_extensions` | `[fnl]` | Quais extensões devem ativar este módulo. |
+| `detect_extensions` | `['fnl']` | Quais extensões devem ativar este módulo. |
| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
| `disabled` | `false` | Disables the `fennel` module. |
@@ -1524,11 +1577,46 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
+
+### Opções
+
+| Opções | Padrão | Descrição |
+| -------------------- | ------------------------------------------------------------ | ------------------------------------------- |
+| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | O formato do módulo. |
+| `added_style` | `'bold green'` | O estilo para a contagem de adições. |
+| `deleted_style` | `'bold red'` | O estilo para a contagem de exclusões. |
+| `only_nonzero_diffs` | `true` | Exibe apenas o status para itens alterados. |
+| `disabled` | `true` | Disables the `fossil_metrics` module. |
+
+### Variáveis
+
+| Variável | Exemplo | Descrição |
+| ----------------- | ------- | --------------------------------------- |
+| added | `1` | O número atual de linhas adicionadas |
+| deleted | `2` | O número atual de linhas excluidas |
+| added_style\* | | Espelha o valor da opção `added_style` |
+| deleted_style\* | | Espelha o valor da opção`deleted_style` |
+
+*: Esta variável só pode ser usada como parte de uma string de estilo
+
+### Exemplo
+
+```toml
+# ~/.config/starship.toml
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
O módulo `gcloud` exibe a configuração atual para a CLI do [`gcloud`](https://cloud.google.com/sdk/gcloud). Isto é baseadp mp arquivo `~/.config/gcloud/active_config` e no arquivo`~/.config/gcloud/configurations/config_{CONFIG NAME}` e a env var `CLOUDSDK_CONFIG`.
-When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set.
+When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set.
### Opções
@@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel
| Opções | Padrão | Descrição |
| ---------- | -------------------------- | ------------------------------------------------------ |
| `format` | `'via [$symbol]($style) '` | O formato do módulo. |
-| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. |
-| `style` | `"yellow bold"` | O estilo do módulo. |
+| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. |
+| `style` | `'yellow bold'` | O estilo do módulo. |
| `disabled` | `false` | Disables the `guix_shell` module. |
### Variáveis
@@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c
| Opções | Padrão | Descrição |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
-| `version_format` | `"v${raw}"` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. |
-| `detect_extensions` | `["gradle", "gradle.kts"]` | Quais extensões devem ativar este módulo. |
+| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. |
+| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. |
+| `detect_extensions` | `['gradle', 'gradle.kts']` | Quais extensões devem ativar este módulo. |
| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. |
-| `detect_folders` | `["gradle"]` | Quais pastas devem ativar este módulo. |
-| `style` | `"bold bright-cyan"` | O estilo do módulo. |
+| `detect_folders` | `['gradle']` | Quais pastas devem ativar este módulo. |
+| `style` | `'bold bright-cyan'` | O estilo do módulo. |
| `disabled` | `false` | Disables the `gradle` module. |
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
@@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| Opções | Padrão | Descrição |
| ------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
-| `version_format` | `"v${raw}"` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
-| `detect_extensions` | `["hx", "hxml"]` | Quais extensões devem ativar este módulo. |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Quais nomes de arquivos devem ativar este módulo. |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Quais pastas devem ativar este módulo. |
-| `symbol` | `"⌘ "` | O formato de string que representa o simbolo do Helm. |
-| `style` | `"bold fg:202"` | O estilo do módulo. |
+| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. |
+| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
+| `detect_extensions` | `['hx', 'hxml']` | Quais extensões devem ativar este módulo. |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Quais nomes de arquivos devem ativar este módulo. |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Quais pastas devem ativar este módulo. |
+| `symbol` | `'⌘ '` | O formato de string que representa o simbolo do Helm. |
+| `style` | `'bold fg:202'` | O estilo do módulo. |
| `disabled` | `false` | Disables the `haxe` module. |
### Variáveis
@@ -2107,14 +2195,15 @@ O módulo `hostname` exibe o nome do hostname.
### Opções
-| Opções | Padrão | Descrição |
-| ------------ | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
-| `ssh_only` | `true` | Apenas exibe o hostname quando conectado em uma sessão SSH. |
-| `ssh_symbol` | `'🌐 '` | Uma formatação de string que representa o símbolo quando conectado à sessão SSH. |
-| `trim_at` | `'.'` | String na qual vai truncar o hostname, após a primeira correspondência. `'.'` will stop after the first dot. `''` will disable any truncation |
-| `format` | `'[$ssh_symbol$hostname]($style) in '` | O formato do módulo. |
-| `style` | `'bold dimmed green'` | O estilo do módulo. |
-| `disabled` | `false` | Desabilita o módulo `hostname`. |
+| Opções | Padrão | Descrição |
+| ----------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
+| `ssh_only` | `true` | Apenas exibe o hostname quando conectado em uma sessão SSH. |
+| `ssh_symbol` | `'🌐 '` | Uma formatação de string que representa o símbolo quando conectado à sessão SSH. |
+| `trim_at` | `'.'` | String na qual vai truncar o hostname, após a primeira correspondência. `'.'` will stop after the first dot. `''` will disable any truncation. |
+| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
+| `format` | `'[$ssh_symbol$hostname]($style) in '` | O formato do módulo. |
+| `style` | `'bold dimmed green'` | O estilo do módulo. |
+| `disabled` | `false` | Desabilita o módulo `hostname`. |
### Variáveis
@@ -2126,7 +2215,9 @@ O módulo `hostname` exibe o nome do hostname.
*: Esta variável só pode ser usada como parte de uma string de estilo
-### Exemplo
+### Exemplos
+
+#### Always show the hostname
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Hide the hostname in remote tmux sessions
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
O módulo `java` exibe o versão atual instalada do [Java](https://www.oracle.com/java/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida:
@@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes
-Exibe o nome atual do [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) e, se definido, o namespace, usuário e cluster do arquivo kubeconfig. O namespace precisa ser definido no arquivo kubeconfig, isso pode ser feito via `kubectl config set-context starship-context --namespace astronaut`. Da mesma forma, o usuário e o cluster podem ser definidos com `kubectl config set-context starship-context --user starship-user` e `kubectl config set-context starship-context --cluster starship-cluster`. Se a env var `$KUBECONFIG` estiver definida o módulo vai usa-la ao invés de usar o `~/.kube/config`.
+Exibe o nome atual do [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) e, se definido, o namespace, usuário e cluster do arquivo kubeconfig. O namespace precisa ser definido no arquivo kubeconfig, isso pode ser feito via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. Se a env var `$KUBECONFIG` estiver definida o módulo vai usa-la ao invés de usar o `~/.kube/config`.
::: tip
@@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### Opções
+::: atenção
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
| Opções | Padrão | Descrição |
| ------------------- | ---------------------------------------------------- | ------------------------------------------------------------- |
| `symbol` | `'☸ '` | Uma string que representa o simbolo exibido antes do Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | O formato do módulo. |
| `style` | `'cyan bold'` | O estilo do módulo. |
-| `context_aliases` | `{}` | Tabela de aliases de contexto para exibir. |
-| `user_aliases` | `{}` | Table of user aliases to display. |
+| `context_aliases`* | `{}` | Tabela de aliases de contexto para exibir. |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. |
| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
+| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Desabilita o módulo `kubernetes`. |
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| Variável | Descrição |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `style` | The style for the module when using this context. If not set, will use module's style. |
+| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### Variáveis
| Variável | Exemplo | Descrição |
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Correspondência Regex
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-A expressão regular deve coincidir com todo o contexto kube, Grupos de captura podem ser referenciados usando `$name` e `$N` na substituição. Isto esta mais explicado na documentação do [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace).
-
-Nomes longos de clusters gerados automaticamente podem ser encurtados usando expressão regular:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Quebra de Linha
@@ -2730,7 +2861,7 @@ O módulo `nodejs` exibe a versão atual instalada do [Node.js](https://nodejs.o
| `detect_folders` | `['node_modules']` | Quais pastas devem ativar este módulo. |
| `style` | `'bold green'` | O estilo do módulo. |
| `disabled` | `false` | Desabilita o módulo `nodejs`. |
-| `not_capable_style` | `bold red` | O estilo para o módulo quando a propriedade engine no package.json não coincide com a versão do Node.js. |
+| `not_capable_style` | `'bold red'` | O estilo para o módulo quando a propriedade engine no package.json não coincide com a versão do Node.js. |
### Variáveis
@@ -2890,8 +3021,8 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para
| Opções | Padrão | Descrição |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | O formato do módulo. |
-| `style` | `"bold white"` | O estilo do módulo. |
+| `format` | `'[$symbol]($style)'` | O formato do módulo. |
+| `style` | `'bold white'` | O estilo do módulo. |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -3149,13 +3280,13 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida:
### Variáveis
-| Variável | Exemplo | Descrição |
-| --------------- | ---------- | --------------------------------- |
-| version | `v0.12.24` | A versão do `pulumi` |
-| stack | `dev` | A stack Pulumi atual |
-| nome do usuário | `alice` | O nome de usuário Pulumi atual |
-| symbol | | Espelha o valor da opção `symbol` |
-| style\* | | Espelha o valor da opção `style` |
+| Variável | Exemplo | Descrição |
+| --------- | ---------- | --------------------------------- |
+| version | `v0.12.24` | A versão do `pulumi` |
+| stack | `dev` | A stack Pulumi atual |
+| username | `alice` | O nome de usuário Pulumi atual |
+| symbol | | Espelha o valor da opção `symbol` |
+| style\* | | Espelha o valor da opção `style` |
*: Esta variável só pode ser usada como parte de uma string de estilo
@@ -3245,7 +3376,7 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida:
| `symbol` | `'🐍 '` | Uma string que representa o simbolo do Python |
| `style` | `'yellow bold'` | O estilo do módulo. |
| `pyenv_version_name` | `false` | Usa pyenv para pegar a versão do Python |
-| `pyenv_prefix` | `pyenv` | Prefixo antes da versão do pyenv, apenas usado se pyenv for usado |
+| `pyenv_prefix` | `'pyenv'` | Prefixo antes da versão do pyenv, apenas usado se pyenv for usado |
| `python_binary` | `['python', 'python3', 'python2']` | Configura o binário python que o Starship vai executar para obter a versão. |
| `detect_extensions` | `['py']` | Quais extensões devem acionar este módulo |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | [] |
@@ -3562,22 +3693,23 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para
### Opções
-| Opções | Padrão | Descrição |
-| ---------------------- | ------------------------- | ------------------------------------------------------- |
-| `bash_indicator` | `'bsh'` | Uma string para representar o bash. |
-| `fish_indicator` | `'fsh'` | Uma string usada para representar o fish. |
-| `zsh_indicator` | `'zsh'` | Uma string usada para representar o zsh. |
-| `powershell_indicator` | `'psh'` | Uma string usada para representar o powershell. |
-| `ion_indicator` | `'ion'` | Uma string usada para representar o ion. |
-| `elvish_indicator` | `'esh'` | Uma string usada para representar o elvish. |
-| `tcsh_indicator` | `'tsh'` | Uma string usada para representar o tcsh. |
-| `xonsh_indicator` | `'xsh'` | Uma string usada para representar o xonsh. |
-| `cmd_indicator` | `'cmd'` | Uma string usada para representar o cmd. |
-| `nu_indicator` | `'nu'` | Uma string usada para representar o nu. |
-| `unknown_indicator` | `''` | Valor padrão para exibir quando o shell é desconhecido. |
-| `format` | `'[$indicator]($style) '` | O formato do módulo. |
-| `style` | `'white bold'` | O estilo do módulo. |
-| `disabled` | `true` | Desabilita o módulo `shell`. |
+| Opções | Padrão | Descrição |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | Uma string para representar o bash. |
+| `fish_indicator` | `'fsh'` | Uma string usada para representar o fish. |
+| `zsh_indicator` | `'zsh'` | Uma string usada para representar o zsh. |
+| `powershell_indicator` | `'psh'` | Uma string usada para representar o powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | Uma string usada para representar o ion. |
+| `elvish_indicator` | `'esh'` | Uma string usada para representar o elvish. |
+| `tcsh_indicator` | `'tsh'` | Uma string usada para representar o tcsh. |
+| `xonsh_indicator` | `'xsh'` | Uma string usada para representar o xonsh. |
+| `cmd_indicator` | `'cmd'` | Uma string usada para representar o cmd. |
+| `nu_indicator` | `'nu'` | Uma string usada para representar o nu. |
+| `unknown_indicator` | `''` | Valor padrão para exibir quando o shell é desconhecido. |
+| `format` | `'[$indicator]($style) '` | O formato do módulo. |
+| `style` | `'white bold'` | O estilo do módulo. |
+| `disabled` | `true` | Desabilita o módulo `shell`. |
### Variáveis
@@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| Opções | Padrão | Descrição |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | Quais extensões devem ativar este módulo. |
+| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | Quais extensões devem ativar este módulo. |
| `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
-| `style` | `"bold blue"` | O estilo do módulo. |
+| `style` | `'bold blue'` | O estilo do módulo. |
| `disabled` | `false` | Disables this module. |
### Variáveis
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+Por padrão, o módulo será exibido se qualquer das seguintes condições for atendida:
+
+- O diretório atual conter um arquivo `template.typ`
+- The current directory contains any `*.typ` file
+
+### Opções
+
+| Opções | Padrão | Descrição |
+| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. |
+| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'t '` | A format string representing the symbol of Daml |
+| `style` | `'bold #0093A7'` | O estilo do módulo. |
+| `detect_extensions` | `['.typ']` | Quais extensões devem ativar este módulo. |
+| `detect_files` | `['template.typ']` | Quais nomes de arquivos devem ativar este módulo. |
+| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
+| `disabled` | `false` | Disables the `daml` module. |
+
+### Variáveis
+
+| Variável | Exemplo | Descrição |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| symbol | | Espelha o valor da opção `symbol` |
+| style\* | | Espelha o valor da opção `style` |
+
+*: Esta variável só pode ser usada como parte de uma string de estilo
+
## Nome do usuário
O módulo `username` mostra o nome de usuário do usuário ativo. O módulo será mostrado se alguma das seguintes condições for atendida:
diff --git a/docs/pt-BR/faq/README.md b/docs/pt-BR/faq/README.md
index 27259e572..c445f797d 100644
--- a/docs/pt-BR/faq/README.md
+++ b/docs/pt-BR/faq/README.md
@@ -120,3 +120,11 @@ Se o Starship foi instalado usando o script de instalação, o comando abaixo ir
# Localiza e exclui o binário do starship
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/pt-BR/guide/README.md b/docs/pt-BR/guide/README.md
index 67d284205..f13eb380d 100644
--- a/docs/pt-BR/guide/README.md
+++ b/docs/pt-BR/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Siga o @StarshipPrompt no Twitter"
/>
+
@@ -147,8 +152,6 @@
/>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
diff --git a/docs/pt-BR/presets/README.md b/docs/pt-BR/presets/README.md
index 9e41bc240..0d58e994f 100644
--- a/docs/pt-BR/presets/README.md
+++ b/docs/pt-BR/presets/README.md
@@ -63,3 +63,9 @@ Esta personalização é inspirada em [M365Princess](https://github.com/JanDeDob
Este preset é inspirado por [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
[![Captura de tela de Tokyo Night preset](/presets/img/tokyo-night.png "Clique para visualizar Tokyo Night preset")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow)
diff --git a/docs/pt-BR/presets/gruvbox-rainbow.md b/docs/pt-BR/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..588b5c3a6
--- /dev/null
+++ b/docs/pt-BR/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[Retornar para Personalizações](./README.md#gruvbox-rainbow)
+
+# Gruvbox Rainbow Preset
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png)
+
+### Pré-requisitos
+
+- Uma fonte [Nerd Font](https://www.nerdfonts.com/) instalada e ativada em seu terminal
+
+### Configuração
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[Clique para baixar o TOML](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/pt-BR/presets/jetpack.md b/docs/pt-BR/presets/jetpack.md
new file mode 100644
index 000000000..339ab8c80
--- /dev/null
+++ b/docs/pt-BR/presets/jetpack.md
@@ -0,0 +1,24 @@
+[Retornar para Personalizações](./README.md#jetpack)
+
+# Jetpack Preset
+
+This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
+
+> Jetpack uses the terminal's color theme.
+
+![Screenshot of Jetpack preset](/presets/img/jetpack.png)
+
+### Prerequisite
+
+- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
+
+### Configuração
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[Clique para baixar o TOML](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/pt-PT/config/README.md b/docs/pt-PT/config/README.md
index 396fbb2c9..dccdabf20 100644
--- a/docs/pt-PT/config/README.md
+++ b/docs/pt-PT/config/README.md
@@ -206,6 +206,13 @@ This is the list of prompt-wide configuration options.
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
+
+::: tip
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
### Example
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### Options
| Option | Default | Description |
@@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform
| `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. |
| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. |
| `style` | `'bold yellow'` | The style for the module. |
-| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
+| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. |
| `disabled` | `false` | Disables the `AWS` module. |
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
@@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu
### Options
-| Option | Default | Description |
-| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
-| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'C '` | The symbol used before displaying the compiler details |
-| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
-| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is |
-| `style` | `'bold 149'` | The style for the module. |
-| `disabled` | `false` | Disables the `c` module. |
+| Option | Default | Description |
+| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'C '` | The symbol used before displaying the compiler details |
+| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
+| `detect_files` | `[]` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is |
+| `style` | `'bold 149'` | The style for the module. |
+| `disabled` | `false` | Disables the `c` module. |
### Variables
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### Options
+
+| Option | Default | Description |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. |
+| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | The style for the module. |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | Which extensions should trigger this module. |
+| `detect_files` | `['.envrc']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### Variables
+
+| Variable | Example | Description |
+| --------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| symbol | | Mirrors the value of option `symbol`. |
+| style\* | `red bold` | Mirrors the value of option `style`. |
+
+*: This variable can only be used as a part of a style string
+
+### Example
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## 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` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
@@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. |
| `style` | `'bold green'` | The style for the module. |
-| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. |
+| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `false` | Disables the `fennel` module. |
@@ -1524,11 +1577,46 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
+
+### Options
+
+| Option | Default | Description |
+| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
+| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
+| `added_style` | `'bold green'` | The style for the added count. |
+| `deleted_style` | `'bold red'` | The style for the deleted count. |
+| `only_nonzero_diffs` | `true` | Render status only for changed items. |
+| `disabled` | `true` | Disables the `fossil_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
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
-When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set.
+When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set.
### Options
@@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel
| Option | Default | Description |
| ---------- | -------------------------- | ------------------------------------------------------ |
| `format` | `'via [$symbol]($style) '` | The format for the module. |
-| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. |
-| `style` | `"yellow bold"` | The style for the module. |
+| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. |
+| `style` | `'yellow bold'` | The style for the module. |
| `disabled` | `false` | Disables the `guix_shell` module. |
### Variables
@@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. |
-| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. |
+| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `["gradle"]` | Which folders should trigger this module. |
-| `style` | `"bold bright-cyan"` | The style for the module. |
+| `detect_folders` | `['gradle']` | Which folders should trigger this module. |
+| `style` | `'bold bright-cyan'` | The style for the module. |
| `disabled` | `false` | Disables the `gradle` module. |
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
@@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| Option | Default | Description |
| ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. |
-| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. |
-| `style` | `"bold fg:202"` | The style for the module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
+| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. |
+| `style` | `'bold fg:202'` | The style for the module. |
| `disabled` | `false` | Disables the `haxe` module. |
### Variables
@@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname.
### Options
-| Option | Default | Description |
-| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
-| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
-| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
-| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation |
-| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. |
-| `style` | `'bold dimmed green'` | The style for the module. |
-| `disabled` | `false` | Disables the `hostname` module. |
+| Option | Default | Description |
+| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
+| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
+| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
+| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. |
+| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
+| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. |
+| `style` | `'bold dimmed green'` | The style for the module. |
+| `disabled` | `false` | Disables the `hostname` module. |
### Variables
@@ -2126,7 +2215,9 @@ The `hostname` module shows the system hostname.
*: This variable can only be used as a part of a style string
-### Example
+### Examples
+
+#### Always show the hostname
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Hide the hostname in remote tmux sessions
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
@@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes
-Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
+Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
::: tip
@@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### Options
+::: warning
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
| Option | Default | Description |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `'cyan bold'` | The style for the module. |
-| `context_aliases` | `{}` | Table of context aliases to display. |
-| `user_aliases` | `{}` | Table of user aliases to display. |
+| `context_aliases`* | `{}` | Table of context aliases to display. |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
+| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. |
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| Variable | Description |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `style` | The style for the module when using this context. If not set, will use module's style. |
+| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### Variables
| Variable | Example | Description |
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Regex Matching
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
-
-Long and automatically generated cluster names can be identified and shortened using regular expressions:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Line Break
@@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| `detect_folders` | `['node_modules']` | Which folders should trigger this module. |
| `style` | `'bold green'` | The style for the module. |
| `disabled` | `false` | Disables the `nodejs` module. |
-| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. |
+| `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
@@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Default | Description |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | The format for the module. |
-| `style` | `"bold white"` | The style for the module. |
+| `format` | `'[$symbol]($style)'` | The format for the module. |
+| `style` | `'bold white'` | The style for the module. |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met:
| `symbol` | `'🐍 '` | A format string representing the symbol of Python |
| `style` | `'yellow bold'` | The style for the module. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
-| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used |
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
| `detect_extensions` | `['py']` | Which extensions should trigger this module |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
@@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
-| Option | Default | Description |
-| ---------------------- | ------------------------- | ------------------------------------------------------------ |
-| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
-| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
-| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
-| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
-| `ion_indicator` | `'ion'` | A format string used to represent ion. |
-| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
-| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
-| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
-| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
-| `nu_indicator` | `'nu'` | A format string used to represent nu. |
-| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
-| `format` | `'[$indicator]($style) '` | The format for the module. |
-| `style` | `'white bold'` | The style for the module. |
-| `disabled` | `true` | Disables the `shell` module. |
+| Option | Default | Description |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
+| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
+| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
+| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | A format string used to represent ion. |
+| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
+| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
+| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
+| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
+| `nu_indicator` | `'nu'` | A format string used to represent nu. |
+| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
+| `format` | `'[$indicator]($style) '` | The format for the module. |
+| `style` | `'white bold'` | The style for the module. |
+| `disabled` | `true` | Disables the `shell` module. |
### Variables
@@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `style` | `"bold blue"` | The style for the module. |
+| `style` | `'bold blue'` | The style for the module. |
| `disabled` | `false` | Disables this module. |
### Variables
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+By default, the module will be shown if any of the following conditions are met:
+
+- The current directory contains a `template.typ` file
+- The current directory contains any `*.typ` file
+
+### Options
+
+| Option | Default | Description |
+| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'t '` | A format string representing the symbol of Daml |
+| `style` | `'bold #0093A7'` | The style for the module. |
+| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. |
+| `detect_files` | `['template.typ']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `disabled` | `false` | Disables the `daml` module. |
+
+### Variables
+
+| Variable | Example | Description |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+*: This variable can only be used as a part of a style string
+
## Username
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
diff --git a/docs/pt-PT/faq/README.md b/docs/pt-PT/faq/README.md
index 41bb2d391..1f8484406 100644
--- a/docs/pt-PT/faq/README.md
+++ b/docs/pt-PT/faq/README.md
@@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/pt-PT/guide/README.md b/docs/pt-PT/guide/README.md
index 0289a807f..26c725541 100644
--- a/docs/pt-PT/guide/README.md
+++ b/docs/pt-PT/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Follow @StarshipPrompt on Twitter"
/>
+
@@ -147,8 +152,6 @@
/>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
diff --git a/docs/pt-PT/presets/README.md b/docs/pt-PT/presets/README.md
index 3903bc17a..2e332ad14 100644
--- a/docs/pt-PT/presets/README.md
+++ b/docs/pt-PT/presets/README.md
@@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow)
diff --git a/docs/pt-PT/presets/gruvbox-rainbow.md b/docs/pt-PT/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..7e2db717f
--- /dev/null
+++ b/docs/pt-PT/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[Return to Presets](./README.md#gruvbox-rainbow)
+
+# Gruvbox Rainbow Preset
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png)
+
+### Prerequisites
+
+- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal
+
+### Configuration
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/pt-PT/presets/jetpack.md b/docs/pt-PT/presets/jetpack.md
new file mode 100644
index 000000000..0f52a9a9e
--- /dev/null
+++ b/docs/pt-PT/presets/jetpack.md
@@ -0,0 +1,24 @@
+[Return to Presets](./README.md#jetpack)
+
+# Jetpack Preset
+
+This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
+
+> Jetpack uses the terminal's color theme.
+
+![Screenshot of Jetpack preset](/presets/img/jetpack.png)
+
+### Prerequisite
+
+- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
+
+### Configuration
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/ru-RU/README.md b/docs/ru-RU/README.md
index 9439e767a..811871ea5 100644
--- a/docs/ru-RU/README.md
+++ b/docs/ru-RU/README.md
@@ -2,7 +2,7 @@
home: true
heroImage: /logo.svg
heroText:
-tagline: Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки!
+tagline: Минималистичное, быстрое и бесконечно настраиваемое приглашение командной строки для любой оболочки!
actionText: Начало работы →
actionLink: ./guide/
features:
@@ -18,7 +18,7 @@ features:
footer: Под лицензией ISC | Авторское право © 2019-настоящее Starship Contributors
#Used for the description meta tag, for SEO
metaTitle: "Starship: Cross-Shell Prompt"
-description: Starship - минимальная, быстрая и бесконечная настраиваемая командная строка для любой оболочки! Показывает нужную вам информацию, оставаясь красивой и минималистичной. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.
+description: Starship - минимальная, быстрая и бесконечная настраиваемая командная строка для любой оболочки! Показывает нужную вам информацию, оставаясь красивой и минималистичной. Быстрая установка доступна для Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, и PowerShell.
---
@@ -28,34 +28,34 @@ description: Starship - минимальная, быстрая и бесконе
-### Обязательные требования
+### Обязательные условия
- Установленный и включенный шрифт [Nerd Font](https://www.nerdfonts.com/) в вашем терминале.
### Быстрая установка
-1. Установите двоичный файл **starship**:
+1. Установите бинарный файл **starship**:
- #### Установить последнюю версию
+ #### Установка последней версии
- Через Bash:
+ Через Shell:
```sh
curl -sS https://starship.rs/install.sh | sh
```
- Для обновления Starship перезапустите этот скрипт. Он заменит текущую версию без изменения конфигурации.
+ Чтобы обновить Starship, повторно запустите приведенный выше скрипт. Он заменит текущую версию, не затрагивая конфигурацию Starship.
- #### Установить через менеджер пакетов
+ #### Установка через пакетный менеджер
- С [Homebrew](https://brew.sh/):
+ С помощью [Homebrew](https://brew.sh/):
```sh
brew install starship
```
- With [Winget](https://github.com/microsoft/winget-cli):
+ С помощью [Winget](https://github.com/microsoft/winget-cli):
```powershell
winget install starship
@@ -149,7 +149,7 @@ description: Starship - минимальная, быстрая и бесконе
::: warning
- This will change in the future. Only Nushell v0.78+ is supported.
+ This will change in the future. Поддерживается только Nushell v0.78+.
:::
diff --git a/docs/ru-RU/advanced-config/README.md b/docs/ru-RU/advanced-config/README.md
index 8586667c1..005fff03a 100644
--- a/docs/ru-RU/advanced-config/README.md
+++ b/docs/ru-RU/advanced-config/README.md
@@ -271,14 +271,14 @@ continuation_prompt = '▶▶ '
Цветовой спецификатор может быть одним из следующих:
-- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
+- Один из стандартных цветов терминалов: `black`, `red`, `green`, `blue`, `gellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- `#`, за которой следует шестизначное шестнадцатеричное число. Это определяет [шестнадцатеричный код цвета RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- Число от 0 до 255. Это определяет [8-битный код цвета ANSI](https://i.stack.imgur.com/KTSQa.png).
Если для переднего плана/фона задано несколько цветов, то последняя из строк будет иметь приоритет.
-Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
+Не все строки стиля будут корректно отображаться в терминале. В частности, существуют следующие известные ошибки:
-- Many terminals disable support for `blink` by default
-- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564).
-- `strikethrough` is not supported by the default macOS Terminal.app
+- Во многих терминалах по умолчанию отключена поддержка `blink`
+- `hidden` [не поддерживается в iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564).
+- `strikethrough` по умолчанию не поддерживается в macOS Terminal.app
diff --git a/docs/ru-RU/config/README.md b/docs/ru-RU/config/README.md
index 1ce293ee1..5aeb02e1d 100644
--- a/docs/ru-RU/config/README.md
+++ b/docs/ru-RU/config/README.md
@@ -206,6 +206,13 @@ detect_extensions = ['ts', '!video.ts', '!audio.ts']
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
+
+::: tip
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
### Пример
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### Опции
| Параметр | По умолчанию | Описание |
@@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform
| `region_aliases` | `{}` | Таблица региона псевдонимов, отображаемая вместе с именем AWS. |
| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. |
| `style` | `'bold yellow'` | Стиль модуля. |
-| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
+| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. |
| `disabled` | `false` | Отключение модуля `AWS`. |
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
@@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu
### Опции
-| Параметр | По умолчанию | Описание |
-| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
-| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'C '` | The symbol used before displaying the compiler details |
-| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
-| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is |
-| `style` | `'bold 149'` | Стиль модуля. |
-| `disabled` | `false` | Disables the `c` module. |
+| Параметр | По умолчанию | Описание |
+| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'C '` | The symbol used before displaying the compiler details |
+| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
+| `detect_files` | `[]` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is |
+| `style` | `'bold 149'` | Стиль модуля. |
+| `disabled` | `false` | Disables the `c` module. |
### Переменные
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### Опции
+
+| Параметр | По умолчанию | Описание |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | Формат модуля. |
+| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | Стиль модуля. |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | Which extensions should trigger this module. |
+| `detect_files` | `['.envrc']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### Переменные
+
+| Переменная | Пример | Описание |
+| ---------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| symbol | | Отражает значение параметра `symbol`. |
+| style\* | `red bold` | Отражает значение параметра `style`. |
+
+*: Эта переменная может использоваться только в качестве части строки style
+
+### Пример
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## Контекст Docker
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
@@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. |
| `style` | `'bold green'` | Стиль модуля. |
-| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. |
+| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `false` | Disables the `fennel` module. |
@@ -1524,11 +1577,46 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
+
+### Опции
+
+| Параметр | По умолчанию | Описание |
+| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
+| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Формат модуля. |
+| `added_style` | `'bold green'` | The style for the added count. |
+| `deleted_style` | `'bold red'` | The style for the deleted count. |
+| `only_nonzero_diffs` | `true` | Render status only for changed items. |
+| `disabled` | `true` | Disables the `fossil_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
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
-When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set.
+When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set.
### Опции
@@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel
| Параметр | По умолчанию | Описание |
| ---------- | -------------------------- | ------------------------------------------------------ |
| `format` | `'via [$symbol]($style) '` | Формат модуля. |
-| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. |
-| `style` | `"yellow bold"` | Стиль модуля. |
+| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. |
+| `style` | `'yellow bold'` | Стиль модуля. |
| `disabled` | `false` | Disables the `guix_shell` module. |
### Переменные
@@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c
| Параметр | По умолчанию | Описание |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. |
-| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. |
+| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `["gradle"]` | Which folders should trigger this module. |
-| `style` | `"bold bright-cyan"` | Стиль модуля. |
+| `detect_folders` | `['gradle']` | Which folders should trigger this module. |
+| `style` | `'bold bright-cyan'` | Стиль модуля. |
| `disabled` | `false` | Disables the `gradle` module. |
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
@@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| Параметр | По умолчанию | Описание |
| ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. |
-| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. |
-| `style` | `"bold fg:202"` | Стиль модуля. |
+| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
+| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. |
+| `style` | `'bold fg:202'` | Стиль модуля. |
| `disabled` | `false` | Disables the `haxe` module. |
### Переменные
@@ -2107,14 +2195,15 @@ format = 'via [⎈ $version](bold white) '
### Опции
-| Параметр | По умолчанию | Описание |
-| ------------ | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
-| `ssh_only` | `true` | Показывать имя хоста только при подключении через SSH. |
-| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
-| `trim_at` | `'.'` | Символы, по которую имя хоста будет сокращено после первого совпадения. `'.'` will stop after the first dot. `''` will disable any truncation |
-| `format` | `'[$ssh_symbol$hostname]($style) in '` | Формат модуля. |
-| `style` | `'bold dimmed green'` | Стиль модуля. |
-| `disabled` | `false` | Отключает модуль `hostname`. |
+| Параметр | По умолчанию | Описание |
+| ----------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
+| `ssh_only` | `true` | Показывать имя хоста только при подключении через SSH. |
+| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
+| `trim_at` | `'.'` | Символы, по которую имя хоста будет сокращено после первого совпадения. `'.'` will stop after the first dot. `''` will disable any truncation. |
+| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
+| `format` | `'[$ssh_symbol$hostname]($style) in '` | Формат модуля. |
+| `style` | `'bold dimmed green'` | Стиль модуля. |
+| `disabled` | `false` | Отключает модуль `hostname`. |
### Переменные
@@ -2126,7 +2215,9 @@ format = 'via [⎈ $version](bold white) '
*: Эта переменная может использоваться только в качестве части строки style
-### Пример
+### Примеры
+
+#### Always show the hostname
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Hide the hostname in remote tmux sessions
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
@@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes
-Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
+Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
::: tip
@@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### Опции
+::: warning
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
| Параметр | По умолчанию | Описание |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Формат модуля. |
| `style` | `'cyan bold'` | Стиль модуля. |
-| `context_aliases` | `{}` | Table of context aliases to display. |
-| `user_aliases` | `{}` | Table of user aliases to display. |
+| `context_aliases`* | `{}` | Table of context aliases to display. |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
+| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Отключает модуль `kubernetes`. |
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| Переменная | Описание |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `style` | The style for the module when using this context. If not set, will use module's style. |
+| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### Переменные
| Переменная | Пример | Описание |
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Regex Matching
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
-
-Long and automatically generated cluster names can be identified and shortened using regular expressions:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Разрыв Строки
@@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| `detect_folders` | `['node_modules']` | Which folders should trigger this module. |
| `style` | `'bold green'` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `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. |
+| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. |
### Переменные
@@ -2890,8 +3021,8 @@ The [os_info](https://lib.rs/crates/os_info) crate used by this module is known
| Параметр | По умолчанию | Описание |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | Формат модуля. |
-| `style` | `"bold white"` | Стиль модуля. |
+| `format` | `'[$symbol]($style)'` | Формат модуля. |
+| `style` | `'bold white'` | Стиль модуля. |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met:
| `symbol` | `'🐍 '` | A format string representing the symbol of Python |
| `style` | `'yellow bold'` | Стиль модуля. |
| `pyenv_version_name` | `false` | Использовать pyenv для получения версии Python |
-| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used |
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
| `detect_extensions` | `['py']` | Which extensions should trigger this module |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
@@ -3562,22 +3693,23 @@ The `shell` module shows an indicator for currently used shell.
### Опции
-| Параметр | По умолчанию | Описание |
-| ---------------------- | ------------------------- | ------------------------------------------------------------ |
-| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
-| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
-| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
-| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
-| `ion_indicator` | `'ion'` | A format string used to represent ion. |
-| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
-| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
-| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
-| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
-| `nu_indicator` | `'nu'` | A format string used to represent nu. |
-| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
-| `format` | `'[$indicator]($style) '` | Формат модуля. |
-| `style` | `'white bold'` | Стиль модуля. |
-| `disabled` | `true` | Disables the `shell` module. |
+| Параметр | По умолчанию | Описание |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
+| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
+| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
+| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | A format string used to represent ion. |
+| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
+| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
+| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
+| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
+| `nu_indicator` | `'nu'` | A format string used to represent nu. |
+| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
+| `format` | `'[$indicator]($style) '` | Формат модуля. |
+| `style` | `'white bold'` | Стиль модуля. |
+| `disabled` | `true` | Disables the `shell` module. |
### Переменные
@@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| Параметр | По умолчанию | Описание |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `style` | `"bold blue"` | Стиль модуля. |
+| `style` | `'bold blue'` | Стиль модуля. |
| `disabled` | `false` | Disables this module. |
### Переменные
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+By default, the module will be shown if any of the following conditions are met:
+
+- Текущий каталог содержит файл `template.typ`
+- The current directory contains any `*.typ` file
+
+### Опции
+
+| Параметр | По умолчанию | Описание |
+| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'t '` | A format string representing the symbol of Daml |
+| `style` | `'bold #0093A7'` | Стиль модуля. |
+| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. |
+| `detect_files` | `['template.typ']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `disabled` | `false` | Disables the `daml` module. |
+
+### Переменные
+
+| Переменная | Пример | Описание |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| symbol | | Отражает значение параметра `symbol` |
+| style\* | | Отражает значение параметра `style` |
+
+*: Эта переменная может использоваться только в качестве части строки style
+
## Имя пользователя
Модуль `username` показывает имя текущего пользователя. Модуль будет показан, если любое из следующих условий соблюдено:
diff --git a/docs/ru-RU/faq/README.md b/docs/ru-RU/faq/README.md
index fd295b141..6fe2f96c7 100644
--- a/docs/ru-RU/faq/README.md
+++ b/docs/ru-RU/faq/README.md
@@ -1,12 +1,12 @@
-# Frequently Asked Questions
+# Часто задаваемые вопросы
## Какая конфигурация используется в демо-GIF?
- **Эмулятор терминала**: [iTerm2](https://iterm2.com/)
- - **Тема**: Минимальная
+ - **Тема**: Minimal
- **Цветовая схема**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
- - **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
-- **Оболочка**: [Fish Shell](https://fishshell.com/)
+ - **Шрифт**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
+- **Командная оболочка**: [Fish Shell](https://fishshell.com/)
- **Конфигурация**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
- **Подсказка**: [Starship](https://starship.rs/)
@@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/ru-RU/guide/README.md b/docs/ru-RU/guide/README.md
index e992d3a41..5795e781d 100644
--- a/docs/ru-RU/guide/README.md
+++ b/docs/ru-RU/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Подпишитесь на @StarshipPrompt в Twitter"
/>
+
@@ -147,8 +152,6 @@
/>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
-**Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки!**
+**Минималистичное, быстрое и бесконечно настраиваемое приглашение командной строки для любой оболочки!**
- **Быстрая:** она быстрая – _очень-очень_ быстрая! 🚀
- **Настраиваемая:** настройте каждый элемент вашей командной строки.
@@ -229,6 +232,7 @@ Alternatively, install Starship using any of the following package managers:
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
+| openSUSE | [OSS](https://software.opensuse.org/package/starship) | `zypper in starship` |
| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
diff --git a/docs/ru-RU/presets/README.md b/docs/ru-RU/presets/README.md
index acfaf78f8..a20991e94 100644
--- a/docs/ru-RU/presets/README.md
+++ b/docs/ru-RU/presets/README.md
@@ -1,65 +1,71 @@
-# Предустановки
+# Пресеты
-Ниже приведена коллекция предустановок конфигураций сообщества для Starship. Если вы хотите поделиться своей предустановкой, пожалуйста, [создайте PR](https://github.com/starship/starship/edit/master/docs/presets/README.md), обновляя этот файл! 😊
+Ниже представлена коллекция пресетов для Starship, созданных сообществом. Если у вас есть пресет, которым вы хотите поделиться, пожалуйста, [отправьте PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) для обновления этого файла! 😊
-To get details on how to use a preset, simply click on the image.
+Чтобы получить подробную информацию о том, как использовать тот или иной пресет, просто щелкните на его изображение.
-## [Символы Шрифта Nerd Font](./nerd-font.md)
+## [Nerd Font Symbols](./nerd-font.md)
-This preset changes the symbols for each module to use Nerd Font symbols.
+Этот пресет изменяет символы для каждого модуля на символы Nerd Font.
-[![Скриншот предустановки Nerd Font Symbols](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font)
+[![Скриншот пресета Nerd Font Symbols](/presets/img/nerd-font-symbols.png "Нажмите, чтобы просмотреть пресет Nerd Font Symbols")](./nerd-font)
## [No Nerd Fonts](./no-nerd-font.md)
-This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt.
+Этот пресет изменяет символы для нескольких модулей таким образом, чтобы в приглашении командной строки нигде не использовались символы Nerd Font.
::: tip
-This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544).
+Этот пресет станет пресетом по умолчанию [в будущем релизе starship](https://github.com/starship/starship/pull/3544).
:::
-[Click to view No Nerd Font preset](./no-nerd-font)
+[Нажмите, чтобы просмотреть пресет No Nerd Font](./no-nerd-font)
## [Bracketed Segments](./bracketed-segments.md)
-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", и т. д.).
-[![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png "Click to view Bracketed Segments preset")](./bracketed-segments)
+[![Скриншот пресета Bracketed Segments](/presets/img/bracketed-segments.png "Нажмите, чтобы просмотреть пресет Bracketed Segments")](./bracketed-segments)
## [Plain Text Symbols](./plain-text.md)
-This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
+Этот пресет изменяет символы для каждого модуля на обычный текст. Отлично подходит, если у вас нет возможности использовать Unicode.
-[![Screenshot of Plain Text Symbols preset](/presets/img/plain-text-symbols.png "Click to view Plain Text Symbols preset")](./plain-text)
+[![Скриншот пресета Plain Text Symbols](/presets/img/plain-text-symbols.png "Нажмите, чтобы просмотреть пресет Plain Text Symbols")](./plain-text)
## [No Runtime Versions](./no-runtimes.md)
-This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
+Этот пресет скрывает версии сред выполнения языков программирования. Если вы работаете с контейнерами или виртуализированными средами, то этот пресет для вас!
-[![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes)
+[![Скриншот пресета Hide Runtime Versions](/presets/img/no-runtime-versions.png "Нажмите, чтобы просмотреть пресет No Runtime Versions")](./no-runtimes)
## [No Empty Icons](./no-empty-icons.md)
-This preset does not show icons if the toolset is not found.
+Этот пресет не отображает иконки, если набор инструментов не найден.
-[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Click to view No Runtime Versions preset")](./no-empty-icons.md)
+[![Скриншот пресета No Empty Icons](/presets/img/no-empty-icons.png "Нажмите, чтобы просмотреть пресет No Runtime Versions")](./no-empty-icons.md)
## [Pure Prompt](./pure-preset.md)
-This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
+Этот пресет имитирует внешний вид и поведение [Pure](https://github.com/sindresorhus/pure).
-[![Screenshot of Pure preset](/presets/img/pure-preset.png "Click to view Pure Prompt preset")](./pure-preset)
+[![Скриншот пресета Pure](/presets/img/pure-preset.png "Нажмите, чтобы просмотреть пресет Pure Prompt")](./pure-preset)
## [Pastel Powerline](./pastel-powerline.md)
-This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
+Эта пресет вдохновлен [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). В нем также показано, как работает замена пути в starship.
-[![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline)
+[![Скриншот пресета Pastel Powerline](/presets/img/pastel-powerline.png "Нажмите, чтобы просмотреть пресет Pure Prompt")](./pastel-powerline)
## [Tokyo Night](./tokyo-night.md)
-This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
+Этот пресет вдохновлен [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
-[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+[![Скриншот пресета Tokyo Night](/presets/img/tokyo-night.png "Нажмите, чтобы просмотреть пресет Tokyo Night")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+Этот пресет в значительной степени вдохновлен [Pastel Powerline](./pastel-powerline.md) и [Tokyo Night](./tokyo-night.md).
+
+[![Скриншот пресета Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png "Нажмите, чтобы просмотреть пресет Gruvbox Rainbow")](./gruvbox-rainbow)
diff --git a/docs/ru-RU/presets/bracketed-segments.md b/docs/ru-RU/presets/bracketed-segments.md
index 668805bb5..37737aa76 100644
--- a/docs/ru-RU/presets/bracketed-segments.md
+++ b/docs/ru-RU/presets/bracketed-segments.md
@@ -1,10 +1,10 @@
-[Return to Presets](./README.md#bracketed-segments)
+[Вернуться к пресетам](./README.md#bracketed-segments)
-# Bracketed Segments Preset
+# Пресет 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", и т. д.).
-![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png)
+![Скриншот пресета Bracketed Segments](/presets/img/bracketed-segments.png)
### Конфигурация
@@ -12,6 +12,6 @@ This preset changes the format of all the built-in modules to show their segment
starship preset bracketed-segments -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/bracketed-segments.toml)
+[Нажмите, чтобы загрузить TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml
diff --git a/docs/ru-RU/presets/gruvbox-rainbow.md b/docs/ru-RU/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..b60d31d68
--- /dev/null
+++ b/docs/ru-RU/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[Вернуться к пресетам](./README.md#gruvbox-rainbow)
+
+# Пресет Gruvbox Rainbow
+
+Этот пресет в значительной степени вдохновлен [Pastel Powerline](./pastel-powerline.md) и [Tokyo Night](./tokyo-night.md).
+
+![Скриншот пресета Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png)
+
+### Обязательные требования
+
+- Установленный и включенный шрифт [Nerd Font](https://www.nerdfonts.com/) в вашем терминале
+
+### Конфигурация
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[Нажмите, чтобы загрузить TOML](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/ru-RU/presets/jetpack.md b/docs/ru-RU/presets/jetpack.md
new file mode 100644
index 000000000..5fc4fa800
--- /dev/null
+++ b/docs/ru-RU/presets/jetpack.md
@@ -0,0 +1,24 @@
+[Вернуться к пресетам](./README.md#jetpack)
+
+# Пресет Jetpack
+
+Это псевдоминималистичный пресет, вдохновленный приглашениями командной оболочки [geometry](https://github.com/geometry-zsh/geometry) и [spaceship](https://github.com/spaceship-prompt/spaceship-prompt).
+
+> Jetpack использует цветовую тему терминала.
+
+![Скриншот пресета Jetpack](/presets/img/jetpack.png)
+
+### Обязательные условия
+
+- Требуется оболочка с поддержкой [`правостороннего приглашения`](https://starship.rs/advanced-config/#enable-right-prompt).
+- Рекомендуется [Jetbrains Mono](https://www.jetbrains.com/lp/mono/).
+
+### Конфигурация
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[Нажмите, чтобы загрузить TOML](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/ru-RU/presets/nerd-font.md b/docs/ru-RU/presets/nerd-font.md
index 33592888c..956eee3fe 100644
--- a/docs/ru-RU/presets/nerd-font.md
+++ b/docs/ru-RU/presets/nerd-font.md
@@ -1,8 +1,8 @@
-[Return to Presets](./README.md#nerd-font-symbols)
+[Вернуться к пресетам](./README.md#nerd-font-symbols)
-# Nerd Font Symbols Preset
+# Пресет Nerd Font Symbols
-This preset changes the symbols for each module to use Nerd Font symbols.
+Этот пресет изменяет символы для каждого модуля на символы Nerd Font.
![Скриншот предустановки Nerd Font Symbols](/presets/img/nerd-font-symbols.png)
@@ -16,6 +16,6 @@ This preset changes the symbols for each module to use Nerd Font symbols.
starship preset nerd-font-symbols -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
+[Нажмите, чтобы загрузить TOML](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml
diff --git a/docs/ru-RU/presets/no-empty-icons.md b/docs/ru-RU/presets/no-empty-icons.md
index fbb175a21..66b00ce9f 100644
--- a/docs/ru-RU/presets/no-empty-icons.md
+++ b/docs/ru-RU/presets/no-empty-icons.md
@@ -1,10 +1,10 @@
-[Return to Presets](./README.md#no-empty-icons)
+[Вернуться к пресетам](./README.md#no-empty-icons)
-# No Empty Icons Preset
+# Пресет No Empty Icons
-If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined.
+Если файлы набора инструментов найдены, то отображается икнока набора инструментов. Если набор инструментов не найден и нельзя определить номер его версии, то он не отображается. Этот пресет изменяет поведение так, чтобы значок отображался только в том случае, если информация о наборе инструментов может быть определена.
-![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png)
+![Скриншот пресета No Empty Icons](/presets/img/no-empty-icons.png)
### Конфигурация
@@ -12,6 +12,6 @@ If toolset files are identified the toolset icon is displayed. If the toolset is
starship preset no-empty-icons -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/no-empty-icons.toml)
+[Нажмите, чтобы загрузить TOML](/presets/toml/no-empty-icons.toml)
<<< @/.vuepress/public/presets/toml/no-empty-icons.toml
diff --git a/docs/ru-RU/presets/no-nerd-font.md b/docs/ru-RU/presets/no-nerd-font.md
index d236d11d3..d09097118 100644
--- a/docs/ru-RU/presets/no-nerd-font.md
+++ b/docs/ru-RU/presets/no-nerd-font.md
@@ -1,12 +1,12 @@
-[Return to Presets](./README.md#no-nerd-fonts)
+[Вернуться к пресетам](./README.md#no-nerd-fonts)
-# No Nerd Fonts Preset
+# Пресет No Nerd Fonts
-This preset restricts the use of symbols to those from emoji and powerline sets.
+Данный пресет ограничивает использование символов только символами из наборов emoji и powerline.
-This means that even without a Nerd Font installed, you should be able to view all module symbols.
+Это означает, что даже без установленного шрифта Nerd Font вы сможете увидеть все символы модулей.
-This preset will become the default preset in a future release of starship.
+Этот пресет станет пресетом по умолчанию в одном из будущих релизов Starship.
### Конфигурация
@@ -14,6 +14,6 @@ This preset will become the default preset in a future release of starship.
starship preset no-nerd-font -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/no-nerd-font.toml)
+[Нажмите, чтобы загрузить TOML](/presets/toml/no-nerd-font.toml)
<<< @/.vuepress/public/presets/toml/no-nerd-font.toml
diff --git a/docs/ru-RU/presets/no-runtimes.md b/docs/ru-RU/presets/no-runtimes.md
index 03d834673..5d35fda2d 100644
--- a/docs/ru-RU/presets/no-runtimes.md
+++ b/docs/ru-RU/presets/no-runtimes.md
@@ -1,10 +1,10 @@
-[Return to Presets](./README.md#no-runtime-versions)
+[Вернуться к пресетам](./README.md#no-runtime-versions)
-# No Runtime Versions Preset
+# Пресет No Runtime Versions
-This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
+Этот пресет скрывает версии сред выполнения языков программирования. Если вы работаете с контейнерами или виртуализированными средами, то этот пресет для вас!
-![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png)
+![Скриншот пресета Hide Runtime Versions](/presets/img/no-runtime-versions.png)
### Конфигурация
@@ -12,6 +12,6 @@ This preset hides the version of language runtimes. If you work in containers or
starship preset no-runtime-versions -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/no-runtime-versions.toml)
+[Нажмите, чтобы загрузить TOML](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml
diff --git a/docs/ru-RU/presets/pastel-powerline.md b/docs/ru-RU/presets/pastel-powerline.md
index 71cb8972e..cb4b13e49 100644
--- a/docs/ru-RU/presets/pastel-powerline.md
+++ b/docs/ru-RU/presets/pastel-powerline.md
@@ -1,14 +1,14 @@
-[Return to Presets](./README.md#pastel-powerline)
+[Вернуться к пресетам](./README.md#pastel-powerline)
-# Pastel Powerline Preset
+# Пресет Pastel Powerline
-This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
+Этот пресет вдохновлен [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). В нем также показано, как работает замена пути в starship.
-![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png)
+![Скриншот пресета Pastel Powerline](/presets/img/pastel-powerline.png)
### Обязательные требования
-- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Caskaydia Cove Nerd Font)
+- Установленный и включенный в терминале шрифт [Nerd Font](https://www.nerdfonts.com/) (в примере используется Caskaydia Cove Nerd Font)
### Конфигурация
@@ -16,6 +16,6 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
starship preset pastel-powerline -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/pastel-powerline.toml)
+[Нажмите, чтобы загрузить TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml
diff --git a/docs/ru-RU/presets/plain-text.md b/docs/ru-RU/presets/plain-text.md
index bbc602b16..ff106c344 100644
--- a/docs/ru-RU/presets/plain-text.md
+++ b/docs/ru-RU/presets/plain-text.md
@@ -1,10 +1,10 @@
-[Return to Presets](./README.md#plain-text-symbols)
+[Вернуться к пресетам](./README.md#plain-text-symbols)
-## Plain Text Symbols Preset
+## Пресет Plain Text Symbols
-This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
+Этот пресет изменяет символы для каждого модуля на обычный текст. Отлично подходит, если у вас нет возможности использовать Unicode.
-![Screenshot of Plain Text Symbols preset](/presets/img/plain-text-symbols.png)
+![Скриншот пресета Plain Text Symbols](/presets/img/plain-text-symbols.png)
### Конфигурация
@@ -12,6 +12,6 @@ This preset changes the symbols for each module into plain text. Great if you do
starship preset plain-text-symbols -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/plain-text-symbols.toml)
+[Нажмите, чтобы загрузить TOML](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml
diff --git a/docs/ru-RU/presets/pure-preset.md b/docs/ru-RU/presets/pure-preset.md
index 8268f59a8..9d9ddf5dc 100644
--- a/docs/ru-RU/presets/pure-preset.md
+++ b/docs/ru-RU/presets/pure-preset.md
@@ -1,10 +1,10 @@
-[Return to Presets](./README.md#pure)
+[Вернуться к пресетам](./README.md#pure)
-# Pure Preset
+# Пресет Pure
-This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
+Этот пресет имитирует внешний вид и поведение [Pure](https://github.com/sindresorhus/pure).
-![Screenshot of Pure preset](/presets/img/pure-preset.png)
+![Скриншот пресета Pure](/presets/img/pure-preset.png)
### Конфигурация
@@ -12,6 +12,6 @@ This preset emulates the look and behavior of [Pure](https://github.com/sindreso
starship preset pure-preset -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/pure-preset.toml)
+[Нажмите, чтобы загрузить TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml
diff --git a/docs/ru-RU/presets/tokyo-night.md b/docs/ru-RU/presets/tokyo-night.md
index 0735f82fa..ba0c0fb5f 100644
--- a/docs/ru-RU/presets/tokyo-night.md
+++ b/docs/ru-RU/presets/tokyo-night.md
@@ -1,10 +1,10 @@
-[Return to Presets](./README.md#pastel-powerline)
+[Вернуться к пресетам](./README.md#pastel-powerline)
-# Tokyo Night Preset
+# Пресет Tokyo Night
-This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
+Этот пресет вдохновлен [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
-![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png)
+![Скриншот пресета Tokyo Night](/presets/img/tokyo-night.png)
### Обязательные требования
@@ -16,6 +16,6 @@ This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/t
starship preset tokyo-night -o ~/.config/starship.toml
```
-[Click to download TOML](/presets/toml/tokyo-night.toml)
+[Нажмите, чтобы загрузить TOML](/presets/toml/tokyo-night.toml)
<<< @/.vuepress/public/presets/toml/tokyo-night.toml
diff --git a/docs/tr-TR/config/README.md b/docs/tr-TR/config/README.md
index 9ac9e8407..6c01d99bb 100644
--- a/docs/tr-TR/config/README.md
+++ b/docs/tr-TR/config/README.md
@@ -206,6 +206,13 @@ This is the list of prompt-wide configuration options.
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
+
+::: tip
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
### Example
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### Options
| Option | Default | Description |
@@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform
| `region_aliases` | `{}` | Table of region aliases to display in addition to the AWS name. |
| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. |
| `stil` | `'bold yellow'` | The style for the module. |
-| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
+| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. |
| `disabled` | `false` | Disables the `AWS` module. |
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
@@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu
### Options
-| Option | Default | Description |
-| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
-| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'C '` | The symbol used before displaying the compiler details |
-| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
-| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is |
-| `stil` | `'bold 149'` | The style for the module. |
-| `disabled` | `false` | Disables the `c` module. |
+| Option | Default | Description |
+| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'C '` | The symbol used before displaying the compiler details |
+| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
+| `detect_files` | `[]` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is |
+| `stil` | `'bold 149'` | The style for the module. |
+| `disabled` | `false` | Disables the `c` module. |
### Variables
@@ -671,7 +683,7 @@ The character will tell you whether the last command was successful or not. It c
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
-::: warning
+::: uyarı
`vimcmd_symbol` yalnızca cmd, fish ve zsh'de desteklenir. `vimcmd_replace_one_symbol`, `vimcmd_replace_symbol`, and `vimcmd_visual_symbol` are only supported in fish due to [upstream issues with mode detection in zsh](https://github.com/starship/starship/issues/625#issuecomment-732454148).
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### Options
+
+| Option | Default | Description |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. |
+| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `stil` | `'bold orange'` | The style for the module. |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | Which extensions should trigger this module. |
+| `detect_files` | `['.envrc']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### Variables
+
+| Variable | Example | Description |
+| --------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| symbol | | Mirrors the value of option `symbol`. |
+| style\* | `red bold` | Mirrors the value of option `style`. |
+
+*: This variable can only be used as a part of a style string
+
+### Example
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## 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` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
@@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. |
| `stil` | `'bold green'` | The style for the module. |
-| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. |
+| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `false` | Disables the `fennel` module. |
@@ -1524,11 +1577,46 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
+
+### Options
+
+| Option | Default | Description |
+| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
+| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
+| `added_style` | `'bold green'` | The style for the added count. |
+| `deleted_style` | `'bold red'` | The style for the deleted count. |
+| `only_nonzero_diffs` | `true` | Render status only for changed items. |
+| `disabled` | `true` | Disables the `fossil_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
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
-When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set.
+When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set.
### Options
@@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel
| Option | Default | Description |
| ---------- | -------------------------- | ------------------------------------------------------ |
| `format` | `'via [$symbol]($style) '` | The format for the module. |
-| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. |
-| `stil` | `"yellow bold"` | The style for the module. |
+| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. |
+| `stil` | `'yellow bold'` | The style for the module. |
| `disabled` | `false` | Disables the `guix_shell` module. |
### Variables
@@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. |
-| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. |
+| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `["gradle"]` | Which folders should trigger this module. |
-| `stil` | `"bold bright-cyan"` | The style for the module. |
+| `detect_folders` | `['gradle']` | Which folders should trigger this module. |
+| `stil` | `'bold bright-cyan'` | The style for the module. |
| `disabled` | `false` | Disables the `gradle` module. |
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
@@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| Option | Default | Description |
| ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. |
-| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. |
-| `stil` | `"bold fg:202"` | The style for the module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
+| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. |
+| `stil` | `'bold fg:202'` | The style for the module. |
| `disabled` | `false` | Disables the `haxe` module. |
### Variables
@@ -2107,14 +2195,15 @@ The `hostname` module shows the system hostname.
### Options
-| Option | Default | Description |
-| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
-| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
-| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
-| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation |
-| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. |
-| `stil` | `'bold dimmed green'` | The style for the module. |
-| `disabled` | `false` | Disables the `hostname` module. |
+| Option | Default | Description |
+| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
+| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
+| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
+| `trim_at` | `'.'` | String that the hostname is cut off at, after the first match. `'.'` will stop after the first dot. `''` will disable any truncation. |
+| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
+| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. |
+| `stil` | `'bold dimmed green'` | The style for the module. |
+| `disabled` | `false` | Disables the `hostname` module. |
### Variables
@@ -2126,7 +2215,9 @@ The `hostname` module shows the system hostname.
*: This variable can only be used as a part of a style string
-### Example
+### Examples
+
+#### Always show the hostname
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Hide the hostname in remote tmux sessions
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
@@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes
-Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
+Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
::: tip
@@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### Options
+::: uyarı
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
| Option | Default | Description |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `stil` | `'cyan bold'` | The style for the module. |
-| `context_aliases` | `{}` | Table of context aliases to display. |
-| `user_aliases` | `{}` | Table of user aliases to display. |
+| `context_aliases`* | `{}` | Table of context aliases to display. |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
+| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. |
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| Variable | Description |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `stil` | The style for the module when using this context. If not set, will use module's style. |
+| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### Variables
| Variable | Example | Description |
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Regex Matching
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
-
-Long and automatically generated cluster names can be identified and shortened using regular expressions:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Line Break
@@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| `detect_folders` | `['node_modules']` | Which folders should trigger this module. |
| `stil` | `'bold green'` | The style for the module. |
| `disabled` | `false` | Disables the `nodejs` module. |
-| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. |
+| `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
@@ -2890,8 +3021,8 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Default | Description |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | The format for the module. |
-| `stil` | `"bold white"` | The style for the module. |
+| `format` | `'[$symbol]($style)'` | The format for the module. |
+| `stil` | `'bold white'` | The style for the module. |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met:
| `symbol` | `'🐍 '` | A format string representing the symbol of Python |
| `stil` | `'yellow bold'` | The style for the module. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
-| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used |
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
| `detect_extensions` | `['py']` | Which extensions should trigger this module |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
@@ -3562,22 +3693,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
-| Option | Default | Description |
-| ---------------------- | ------------------------- | ------------------------------------------------------------ |
-| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
-| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
-| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
-| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
-| `ion_indicator` | `'ion'` | A format string used to represent ion. |
-| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
-| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
-| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
-| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
-| `nu_indicator` | `'nu'` | A format string used to represent nu. |
-| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
-| `format` | `'[$indicator]($style) '` | The format for the module. |
-| `stil` | `'white bold'` | The style for the module. |
-| `disabled` | `true` | Disables the `shell` module. |
+| Option | Default | Description |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
+| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
+| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
+| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | A format string used to represent ion. |
+| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
+| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
+| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
+| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
+| `nu_indicator` | `'nu'` | A format string used to represent nu. |
+| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
+| `format` | `'[$indicator]($style) '` | The format for the module. |
+| `stil` | `'white bold'` | The style for the module. |
+| `disabled` | `true` | Disables the `shell` module. |
### Variables
@@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `stil` | `"bold blue"` | The style for the module. |
+| `stil` | `'bold blue'` | The style for the module. |
| `disabled` | `false` | Disables this module. |
### Variables
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+By default, the module will be shown if any of the following conditions are met:
+
+- The current directory contains a `template.typ` file
+- The current directory contains any `*.typ` file
+
+### Options
+
+| Option | Default | Description |
+| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'t '` | A format string representing the symbol of Daml |
+| `stil` | `'bold #0093A7'` | The style for the module. |
+| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. |
+| `detect_files` | `['template.typ']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `disabled` | `false` | Disables the `daml` module. |
+
+### Variables
+
+| Variable | Example | Description |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+*: This variable can only be used as a part of a style string
+
## Username
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
diff --git a/docs/tr-TR/faq/README.md b/docs/tr-TR/faq/README.md
index 41bb2d391..1f8484406 100644
--- a/docs/tr-TR/faq/README.md
+++ b/docs/tr-TR/faq/README.md
@@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/tr-TR/guide/README.md b/docs/tr-TR/guide/README.md
index a333bb59f..f7ddcd9d0 100644
--- a/docs/tr-TR/guide/README.md
+++ b/docs/tr-TR/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="@StarshipPrompt'u Twitter'da takip edin"
/>
+
@@ -147,8 +152,6 @@
/>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
@@ -288,7 +292,7 @@ eval "$(starship init bash)"
Cmd
-Cmd ıle beraber [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) kullanmalısınız. `%LocalAppData%\clink\starship.lua` dosyasını belirtilen dizinde aşağıdaki kod içeriği olacak şekilde oluşturun:
+Cmd ile beraber [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) kullanmalısınız. `%LocalAppData%\clink\starship.lua` dosyasını belirtilen dizinde aşağıdaki kod içeriği olacak şekilde oluşturun:
```lua
load(io.popen('starship init cmd'):read("*a"))()
diff --git a/docs/tr-TR/presets/README.md b/docs/tr-TR/presets/README.md
index 79d72c95e..1c20e0383 100644
--- a/docs/tr-TR/presets/README.md
+++ b/docs/tr-TR/presets/README.md
@@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow)
diff --git a/docs/tr-TR/presets/gruvbox-rainbow.md b/docs/tr-TR/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..73c65357c
--- /dev/null
+++ b/docs/tr-TR/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[Return to Presets](./README.md#gruvbox-rainbow)
+
+# Gruvbox Rainbow Preset
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png)
+
+### Ön koşullar
+
+- Terminalinizde bir [Nerd Font](https://www.nerdfonts.com/) yüklü ve etkin olmalı
+
+### Yapılandırma
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/tr-TR/presets/jetpack.md b/docs/tr-TR/presets/jetpack.md
new file mode 100644
index 000000000..ed7cbbbd0
--- /dev/null
+++ b/docs/tr-TR/presets/jetpack.md
@@ -0,0 +1,24 @@
+[Return to Presets](./README.md#jetpack)
+
+# Jetpack Preset
+
+This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
+
+> Jetpack uses the terminal's color theme.
+
+![Screenshot of Jetpack preset](/presets/img/jetpack.png)
+
+### Prerequisite
+
+- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
+
+### Yapılandırma
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/uk-UA/config/README.md b/docs/uk-UA/config/README.md
index c41de0354..179a76eee 100644
--- a/docs/uk-UA/config/README.md
+++ b/docs/uk-UA/config/README.md
@@ -206,6 +206,13 @@ detect_extensions = ['ts', '!video.ts', '!audio.ts']
| `add_newline` | `true` | Вставити порожній рядок між командними рядками в оболонці. |
| `palette` | `''` | Встановлює кольорову палітру використовуючи `palettes`. |
| `palettes` | `{}` | Колекція кольорових палітр, для призначення [кольорів](/advanced-config/#style-strings) до назв визначених користувачем. Зверніть увагу, що кольорові палітри не можуть посилатися на їх власні визначення кольору. |
+| `follow_symlinks` | `true` | Перевіряти символічні посилання чи вони посилаються на теки; використовується в таких модулях як git. |
+
+::: tip
+
+Якщо у вас є символічні посилання не мережеві файлові системи, зважте на встановлення `follow_symlink` у `false`.
+
+:::
### Приклад
@@ -242,7 +249,7 @@ mustard = '#af8700'
```toml
format = '$all'
-# Є тотожним
+# Which is equivalent to
format = """
$username\
$hostname\
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ format = '$all$directory$character'
Під час використання [saml2aws](https://github.com/Versent/saml2aws) інформація про закінчення терміну дії, отримана з `~/.aws/credentials`, повертається до ключа `x_security_token_expires`.
+Під час використання [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) профіль читається зі змінної `AWS_SSO_PROFILE`.
+
### Параметри
| Параметр | Стандартно | Опис |
@@ -360,7 +372,7 @@ format = '$all$directory$character'
| `region_aliases` | `{}` | Таблиця псевдонімів регіону для показу на додачу до назви AWS. |
| `profile_aliases` | `{}` | Таблиця псевдонімів профілю для показу на додачу до назви AWS. |
| `style` | `'bold yellow'` | Стиль модуля. |
-| `expiration_symbol` | `X` | Символ, який показується, коли закінчився термін дії тимчасових облікових даних. |
+| `expiration_symbol` | `'X'` | Символ, який показується, коли закінчився термін дії тимчасових облікових даних. |
| `disabled` | `false` | Вимикає модуль `AWS`. |
| `force_display` | `false` | Якщо `true`, інформація показується, навіть якщо `credentials`, `credential_process` або `sso_start_url` не вказано. |
@@ -620,17 +632,17 @@ format = 'via [🍔 $version](bold green) '
### Параметри
-| Параметр | Стандартно | Опис |
-| ------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------- |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | Формат рядка модуля. |
-| `version_format` | `'v${raw}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` |
-| `symbol` | `'C '` | Символ, який знаходиться перед інформацією про компілятор |
-| `detect_extensions` | `['c', 'h']` | Які розширення повинні запускати цей модуль. |
-| `detect_files` | `[]` | Які імена файлів мають запускати цей модуль. |
-| `detect_folders` | `[]` | В яких теках цей модуль має запускатись. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | Як виявити компілятор |
-| `style` | `'bold 149'` | Стиль модуля. |
-| `disabled` | `false` | Вимикає модуль `c`. |
+| Параметр | Стандартно | Опис |
+| ------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------- |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | Формат рядка модуля. |
+| `version_format` | `'v${raw}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` |
+| `symbol` | `'C '` | Символ, який знаходиться перед інформацією про компілятор |
+| `detect_extensions` | `['c', 'h']` | Які розширення повинні запускати цей модуль. |
+| `detect_files` | `[]` | Які імена файлів мають запускати цей модуль. |
+| `detect_folders` | `[]` | В яких теках цей модуль має запускатись. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | Як виявити компілятор |
+| `style` | `'bold 149'` | Стиль модуля. |
+| `disabled` | `false` | Вимикає модуль `c`. |
### Змінні
@@ -643,7 +655,7 @@ format = 'via [🍔 $version](bold green) '
NB `версія` не має стандартного формату.
-### Commands
+### Команди
Параметр `commands` отримує список команд для визначення версії та назви компілятора.
@@ -673,7 +685,7 @@ format = 'via [$name $version]($style)'
::: warning
-`vimcmd_symbol` працює лише з cmd, fish та zsh. `vimcmd_replace_one_symbol`, `vimcmd_replace_symbol`, and `vimcmd_visual_symbol` працює лише з fish через [проблемою визначення режиму роботи в zsh](https://github.com/starship/starship/issues/625#issuecomment-732454148).
+`vimcmd_symbol` працює лише з cmd, fish та zsh. `vimcmd_replace_one_symbol`, `vimcmd_replace_symbol`, and `vimcmd_visual_symbol` працює лише з fish через [проблему визначення режиму роботи в zsh](https://github.com/starship/starship/issues/625#issuecomment-732454148).
:::
@@ -789,15 +801,15 @@ vimcmd_symbol = '[V](bold green) '
## Command Duration – час виконання
-Модуль `cmd_duration` показує, скільки часу виконувалась остання команда. Модуль буде показаний лише в тому випадку, якщо на виконання команди пішло понад дві секунди або більше, ніж значення змінної `min_time`, якщо воно задане.
+Модуль `cmd_duration` показує, скільки часу виконувалась остання команда. Модуль буде показаний лише в тому випадку, якщо на виконання команди пішло понад дві секунди або більше, ніж значення змінної `min_time`, якщо воно задане.
::: warning Не вмикайте DEBUG trap в Bash
-Якщо ви запускаєте Starship у `bash`, не вмикайте `DEBUG` trap після запуску `eval $(starship init $0)`, або цей модуль **** не працюватиме.
+Якщо ви запускаєте Starship у `bash`, не вмикайте `DEBUG trap` після запуску `eval $(starship init $0)`, бо цей модуль **не працюватиме**.
:::
-Користувачі Bash, яким потрібна функція preexec, можуть використовувати [фреймворк bash_preexec від rcaloras](https://github.com/rcaloras/bash-preexec). Просто визначте масиви `preexec_function` і `precmd_functions` перед запуском `eval $(starship init $0)`, а потім продовжуй як зазвичай.
+Користувачі Bash, яким потрібна функція preexec, можуть використовувати [фреймворк bash_preexec від rcaloras](https://github.com/rcaloras/bash-preexec). Просто визначте масиви `preexec_function` і `precmd_functions` перед запуском `eval $(starship init $0)`, а потім продовжуйте як зазвичай.
### Параметри
@@ -837,7 +849,7 @@ format = 'underwent [$duration](bold yellow)'
::: tip
-Це не призводить до придушення власного модифікатора командного рядка в conda. Можливо, вам доведеться виконати `conda config --set changeps1 False`.
+Це не призводить до вимикання власного модифікатора командного рядка в conda. Можливо, вам доведеться виконати `conda config --set changeps1 False`.
:::
@@ -944,7 +956,7 @@ format = 'via [✨ $version](bold blue) '
## Daml
-Модуль `daml` показує поточну версію SDK [Daml](https://www.digitalasset.com/developers), коли ви перебуваєте в кореневій теці проєкту Daml. `sdk-version` у файлі `daml.yaml` буде використовуватись, якщо значення не буде перевизначене змінною оточення `DAML_SDK_VERSION`. Типово, модуль показується, якщо виконується будь-яка з наступних умов:
+Модуль `daml` показує поточну версію SDK <1">Daml, коли ви перебуваєте в кореневій теці проєкту Daml. `sdk-version` у файлі `daml.yaml` буде використовуватись, якщо значення не буде перевизначене змінною оточення `DAML_SDK_VERSION`. Типово, модуль показується, якщо виконується будь-яка з наступних умов:
- Поточна тека містить файл `daml.yaml`
@@ -1058,11 +1070,11 @@ format = 'via [🦕 $version](green bold) '
## Directory
-Модуль `directory` показує шлях до поточної теки, урізаючи його до трьох останніх батьківських тек. Шлях до теки також буде скорочений до кореня git-репозиторію, якому ви перебуваєте.
+Модуль `directory` показує шлях до поточної теки, урізаючи його до трьох останніх батьківських тек. Шлях до теки також буде скорочений до кореня git-репозиторію, в якому ви перебуваєте.
Якщо використовується параметр `fish_style_pwd_dir_length`, замість того, щоб приховувати скорочений шлях, ви побачите скорочену назву кожної теки в залежності від числа, яке ви вказали для цього параметра.
-Наприклад, маємо `~/Dev/Nix/nixpkgs/pkgs` де `nixpkgs` є коренем репозиторію, а параметр — `1`. Ви побачите `~/D/N/nixpkgs/pkgs`, тоді як до цього було `nixpkgs/pkg`.
+Наприклад, маємо `~/Dev/Nix/nixpkgs/pkgs` де `nixpkgs` є коренем репозиторію, а параметр — `1`. Ви побачите `~/D/N/nixpkgs/pkgs`, тоді як до цього було `nixpkgs/pkgs`.
### Параметри
@@ -1091,7 +1103,7 @@ format = 'via [🦕 $version](green bold) '
| `fish_style_pwd_dir_length` | `0` | Кількість символів, які використовуються при застосуванні логіки шляху fish shell pwd. |
| `use_logical_path` | `true` | Якщо `true` показувати логічний шлях оболонки через `PWD` або `--logical-path`. Якщо `false` – показувати шлях фізичної файлової системи з розвʼязанням шляхів для символічних посилань. |
-`substitutions` дозволяє визначити довільні заміни літер рядків, що зустрічаються в шляху, наприклад, довга префікси мережа або теки розробки (в Java). Зауважте, що це відключить стиль fish у PWD.
+`substitutions` дозволяє визначити довільні заміни літер рядків, що зустрічаються в шляху, наприклад, довгі префікси мережі або теки розробки (в Java). Зауважте, що це відключить стиль fish у PWD.
```toml
[directory.substitutions]
@@ -1099,7 +1111,7 @@ format = 'via [🦕 $version](green bold) '
'src/com/long/java/path' = 'mypath'
```
-`fish_style_pwd_dir_length` взаємодіє зі стандартними опціями скорочення, по-перше, що може бути дивним, якщо значення не нуль, замість цього будуть показуватись компоненти шляху, які звичайно скорочені, зі вказаною кількістю символів. Наприклад, шлях `/built/this/on/on/rock/and/roll`, який зазвичай показуватиметься як `rock/and/roll`, буде показаний як `/b/t/c/o/rock/and/roll` з `fish_style_pwd_dir_length = 1` — шлях компонентів, які зазвичай вилучаються, показуються одним символом. Для `fish_style_pwd_dir_length = 2` це буде `/bu/th/ci/on/rock/and/roll`.
+`fish_style_pwd_dir_length` взаємодіє зі стандартними опціями скорочення, по-перше, що може бути дивним, якщо значення не нуль, замість цього будуть показуватись компоненти шляху, які звичайно скорочені, зі вказаною кількістю символів. Наприклад, шлях `/built/this/city/on/rock/and/roll`, який зазвичай показуватиметься як `rock/and/roll`, буде показаний як `/b/t/c/o/rock/and/roll` з `fish_style_pwd_dir_length = 1` — шлях компонентів, які зазвичай вилучаються, показуються одним символом. Для `fish_style_pwd_dir_length = 2` це буде `/bu/th/ci/on/rock/and/roll`.
@@ -1137,9 +1149,50 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+Модуль `direnv` показує статус rc-файла якщо він існує. Статус включає: шлях до файлу rc, чи він завантажений та, чи `direnv` дозволяє його використання.
+
+### Параметри
+
+| Параметр | Стандартно | Опис |
+| ------------------- | -------------------------------------- | ------------------------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | Формат модуля. |
+| `symbol` | `'direnv '` | Символ, що показується перед direnv context. |
+| `style` | `'bold orange'` | Стиль модуля. |
+| `disabled` | `true` | Вимикає модуль `direnv`. |
+| `detect_extensions` | `[]` | Які розширення повинні запускати цей модуль. |
+| `detect_files` | `['.envrc']` | Які імена файлів мають запускати цей модуль. |
+| `detect_folders` | `[]` | В яких теках цей модуль має запускатись. |
+| `allowed_msg` | `'allowed'` | Повідомлення, що показується коли використання rc-файлу дозволене. |
+| `denied_msg` | `'denied'` | Повідомлення, що показується коли використання rc-файлу заборонене. |
+| `loaded_msg` | `'loaded'` | Повідомлення, що показується коли rc-файл завантажений. |
+| `unloaded_msg` | `'not loaded'` | Повідомлення, що показується коли rc-файл не завантажений. |
+
+### Змінні
+
+| Змінна | Приклад | Опис |
+| --------- | ------------------- | ----------------------------------------- |
+| loaded | `loaded` | Чи завантажений rc-файл. |
+| allowed | `denied` | Чи дозволене використання rc-файлу. |
+| rc_path | `/home/test/.envrc` | Шлях до rc-файлу. |
+| symbol | | Віддзеркалює значення параметра `symbol`. |
+| style\* | `red bold` | Віддзеркалює значення параметра `style`. |
+
+*: Ця змінна може бути використана лише як частина стилю рядка
+
+### Приклад
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## Docker Context
-Модуль `docker_context` показує поточний [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) якщо його не встановлено у `default`, або якщо `DOCKER_MACHINE_NAME` `DOCKER_HOST` або `DOCKER_CONTEXT` змінні середовища встановлені (оскільки вони призначені для перевизначення контексту).
+Модуль `docker_context` показує поточний [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) якщо його не встановлено у `default`, або якщо змінні середовища `DOCKER_MACHINE_NAME`, `DOCKER_HOST` або `DOCKER_CONTEXT` встановлені (оскільки вони призначені для перевизначення контексту).
### Параметри
@@ -1177,7 +1230,7 @@ format = 'via [🐋 $context](blue bold)'
Модуль `dotnet` показує відповідну версію [.NET Core SDK](https://dotnet.microsoft.com/) для поточної теки. Якщо SDK закріплена в поточній теці, показується закріплена версія. В іншому випадку модуль покаже останню встановлену версію SDK.
-Стандартно модуль буде показаний в командному рядку, коли один чи більше з наступних файлів є в теці:
+Стандартно модуль буде показаний в командному рядку, коли в теці присутні один чи більше наступних файлів:
- `global.json`
- `project.json`
@@ -1190,9 +1243,9 @@ format = 'via [🐋 $context](blue bold)'
Вам також знадобиться .NET Core SDK, встановлений для того, щоб використовувати його правильно.
-Всередині, цей модуль використовує власний механізм для виявлення версій. Як правило, він удвічі швидший ніж запуск `dotnet --version`, але він може показувати некоректну версію, якщо ваш проєкт .NET має не звичайне розташування тек. Якщо точність важливіша за швидкість, ви можете вимкнути механізм встановивши `heuristic = false` в налаштуваннях модуля.
+Всередині, цей модуль використовує власний механізм для виявлення версій. Як правило, він удвічі швидший ніж запуск `dotnet --version`, але він може показувати некоректну версію, якщо ваш проєкт .NET має незвичайне розташування тек. Якщо точність важливіша за швидкість, ви можете вимкнути механізм встановивши `heuristic = false` в налаштуваннях модуля.
-Модуль також показуватиме Target Framework Monamework ([https://docs.microsoft. om/en-us/dotnet/standard/frameworks#supported-target-frameworks](https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-frameworks)), коли у поточній теці є файл `.csproj`.
+Модуль також показуватиме Target Framework Monamework (), коли у поточній теці є файл `.csproj`.
### Параметри
@@ -1232,7 +1285,7 @@ heuristic = false
## Elixir
-Модуль `elixir` показує поточну встановлену версію [Elixir](https://elixir-lang.org/) та [Erlang/OTP](https://erlang.org/doc/). Типово, модуль показується, якщо виконується будь-яка з наступних умов:
+Модуль `elixir` показує поточну встановлену версію [Elixir](https://elixir-lang.org/) та <2">Erlang/OTP. Типово, модуль показується, якщо виконується будь-яка з наступних умов:
- Поточна тека містить файл `mix.exs`.
@@ -1320,13 +1373,13 @@ format = 'via [ $version](cyan bold) '
::: tip
-Порядок в якому модуль env_var показується може встановлюватись індивідуально додавання `${env_var.foo}` в `format` верхнього рівня (через те, що використовуються крапки, потрібно використовувати `${...}`). Типово, модуль `env_var` покаже усі модулі env_var, в тому порядку того, як вони були визначені.
+Порядок в якому модуль env_var показується може встановлюватись індивідуально додаванням `${env_var.foo}` в `format` верхнього рівня (через те, що використовуються крапки, потрібно використовувати `${...}`). Типово, модуль `env_var` покаже усі модулі env_var, в тому порядку, в якому вони були визначені.
:::
::: tip
-Кілька змінних оточення можуть бути показані за допомоги `.`. (див. приклад) Якщо опції конфігурації `variable` не встановлено, модуль показуватиме значення змінної після символу `.` під назвою.
+Кілька змінних оточення можуть бути показані за допомоги `.`. (див. приклад) Якщо параметр конфігурації `variable` не встановлено, модуль показуватиме значення змінної під назвою тексту після символу `.`.
Приклад: наступна конфігурація показуватиме значення змінної середовища USER
@@ -1435,7 +1488,7 @@ format = 'via [e $version](bold red) '
| `version_format` | `'v${raw}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` |
| `symbol` | `'🧅 '` | Символ, який знаходиться перед версією fennel. |
| `style` | `'bold green'` | Стиль модуля. |
-| `detect_extensions` | `[fnl]` | Які розширення повинні запускати цей модуль. |
+| `detect_extensions` | `['fnl']` | Які розширення повинні запускати цей модуль. |
| `detect_files` | `[]` | Які імена файлів мають запускати цей модуль. |
| `detect_folders` | `[]` | Які теки мають запускати цей модуль. |
| `disabled` | `false` | Вимикає модуль `fennel`. |
@@ -1524,6 +1577,41 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+Модуль `fossil_metrics` покаже кількість доданих та видалених рядків у поточній теці. Потрібна версія Fossil не нижче v2.14 (2021-01-20).
+
+### Параметри
+
+| Параметр | Стандартно | Опис |
+| -------------------- | ------------------------------------------------------------ | -------------------------------------------- |
+| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Формат модуля. |
+| `added_style` | `'bold green'` | Стиль для показу кількості доданих рядків. |
+| `deleted_style` | `'bold red'` | Стиль для показу кількості видалених рядків. |
+| `only_nonzero_diffs` | `true` | Показувати стан лише для змінених елементів. |
+| `disabled` | `true` | Вимикає модуль `fossil_metrics`. |
+
+### Змінні
+
+| Змінна | Приклад | Опис |
+| ----------------- | ------- | ----------------------------------------------- |
+| added | `1` | Поточна кількість доданих рядків |
+| deleted | `2` | Поточна кількість видалених рядків |
+| added_style\* | | Віддзеркалює значення параметра `added_style` |
+| deleted_style\* | | Віддзеркалює значення параметра `deleted_style` |
+
+*: Ця змінна може бути використана лише як частина стилю рядка
+
+### Приклад
+
+```toml
+# ~/.config/starship.toml
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
Модуль `gcloud` показує поточну конфігурацію [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. Він базується на файлі `~/.config/gcloud/active_config` та на `~/.config/gcloud/configurations/config_{CONFIG NAME}` і на змінній оточення `CLOUDSDK_CONFIG`.
@@ -1681,7 +1769,7 @@ tag_symbol = '🔖 '
## Git State
-Модуль `git_state` показується в теках, які є частиною репозиторію git, під час виконання операцій на зразок _REBASING_, _BISECTING1 > тощо. Інформація про прогрес операції (наприклад, REBASING 3/10), також буде показана якщо вона доступна.
+Модуль `git_state` показується в теках, які є частиною репозиторію git, під час виконання операцій на зразок _REBASING_, _BISECTING_ тощо. Якщо є інформація про прогрес (наприклад, REBASING 3/10), ця інформація також буде показана.
### Параметри
@@ -1725,7 +1813,7 @@ cherry_pick = '[🍒 PICKING](bold red)'
::: tip
-За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
+Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
:::
@@ -1767,7 +1855,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
::: tip
-Модуль Git Status дуже повільно працює в теках Windows у середовищі WSL (наприклад, під `/mnt/c/`). Ви можете вимкнути модуль або використати `windows_starship` для використання Windows-native Starship `git_status` для цих шляхів.
+Модуль Git Status дуже повільно працює в теках Windows у середовищі WSL (наприклад, під `/mnt/c/`). Ви можете вимкнути модуль або використати `windows_starship` для використання Windows-версії Starship для тримання `git_status` для цих шляхів.
:::
@@ -1931,8 +2019,8 @@ format = 'via [$symbol($version )($mod_version )]($style)'
| Параметр | Стандартно | Опис |
| ---------- | -------------------------- | ----------------------------------------------- |
| `format` | `'via [$symbol]($style) '` | Формат модуля. |
-| `symbol` | `"🐃 "` | Формат рядка, що представляє символ guix-shell. |
-| `style` | `"yellow bold"` | Стиль модуля. |
+| `symbol` | `'🐃 '` | Формат рядка, що представляє символ guix-shell. |
+| `style` | `'yellow bold'` | Стиль модуля. |
| `disabled` | `false` | Вимикає модуль `guix_shell`. |
### Змінні
@@ -1969,13 +2057,13 @@ format = 'via [🐂](yellow bold) '
| Параметр | Стандартно | Опис |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. |
-| `version_format` | `"v${raw}"` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` |
-| `symbol` | `"🅶 "` | Формат рядка, що представляє символ Gradle. |
-| `detect_extensions` | `["gradle", "gradle.kts"]` | Які розширення повинні запускати цей модуль. |
+| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. |
+| `version_format` | `'v${raw}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` |
+| `symbol` | `'🅶 '` | Формат рядка, що представляє символ Gradle. |
+| `detect_extensions` | `['gradle', 'gradle.kts']` | Які розширення повинні запускати цей модуль. |
| `detect_files` | `[]` | Які імена файлів мають запускати цей модуль. |
-| `detect_folders` | `["gradle"]` | В яких теках цей модуль має запускатись. |
-| `style` | `"bold bright-cyan"` | Стиль модуля. |
+| `detect_folders` | `['gradle']` | В яких теках цей модуль має запускатись. |
+| `style` | `'bold bright-cyan'` | Стиль модуля. |
| `disabled` | `false` | Вимикає модуль `gradle`. |
| `recursive` | `false` | Дозволяє рекурсивний пошук теки `gradle`. |
@@ -2034,13 +2122,13 @@ format = 'via [🐂](yellow bold) '
| Параметр | Стандартно | Опис |
| ------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. |
-| `version_format` | `"v${raw}"` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` |
-| `detect_extensions` | `["hx", "hxml"]` | Які розширення повинні запускати цей модуль. |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Які імена файлів мають запускати цей модуль. |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Які теки мають запускати цей модуль. |
-| `symbol` | `"⌘ "` | Формат рядка, що представляє символ Helm. |
-| `style` | `"bold fg:202"` | Стиль модуля. |
+| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. |
+| `version_format` | `'v${raw}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` |
+| `detect_extensions` | `['hx', 'hxml']` | Які розширення повинні запускати цей модуль. |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Які імена файлів мають запускати цей модуль. |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Які теки мають запускати цей модуль. |
+| `symbol` | `'⌘ '` | Формат рядка, що представляє символ Helm. |
+| `style` | `'bold fg:202'` | Стиль модуля. |
| `disabled` | `false` | Вимикає модуль `haxe`. |
### Змінні
@@ -2107,14 +2195,15 @@ format = 'via [⎈ $version](bold white) '
### Параметри
-| Параметр | Стандартно | Опис |
-| ------------ | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
-| `ssh_only` | `true` | Показувати назву хоста лише при підключенні через SSH. |
-| `ssh_symbol` | `'🌐 '` | Формат рядка для показу символу підключення до SSH-сеансу. |
-| `trim_at` | `'.'` | Рядок, у якому назва хоста буде обрізано після першого збігу. `'.'` зупиниться після першої точки. `''` вимкне будь-яке скорочення |
-| `format` | `'[$ssh_symbol$hostname]($style) in '` | Формат модуля. |
-| `style` | `'bold dimmed green'` | Стиль модуля. |
-| `disabled` | `false` | Вимикає модуль `hostname`. |
+| Параметр | Стандартно | Опис |
+| ----------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
+| `ssh_only` | `true` | Показувати назву хоста лише при підключенні через SSH. |
+| `ssh_symbol` | `'🌐 '` | Формат рядка для показу символу підключення до SSH-сеансу. |
+| `trim_at` | `'.'` | Рядок, у якому назва хоста буде обрізано після першого збігу. `'.'` зупиниться після першої точки. `''` вимкне будь-яке скорочення. |
+| `detect_env_vars` | `[]` | Які змінні середовища повинні запускати цей модуль. |
+| `format` | `'[$ssh_symbol$hostname]($style) in '` | Формат модуля. |
+| `style` | `'bold dimmed green'` | Стиль модуля. |
+| `disabled` | `false` | Вимикає модуль `hostname`. |
### Змінні
@@ -2126,7 +2215,9 @@ format = 'via [⎈ $version](bold white) '
*: Ця змінна може бути використана лише як частина стилю рядка
-### Приклад
+### Приклади
+
+#### Завжди показувати hostname
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Приховувати hostname для віддалених сеансів tmux
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
Модуль `java` показує поточну встановлену версію [Java](https://www.oracle.com/java/). Типово, модуль показується, якщо виконується будь-яка з наступних умов:
@@ -2211,7 +2313,7 @@ symbol = '🌟 '
| `style` | `'bold blue'` | Стиль модуля. |
| `disabled` | `false` | Вимикає модуль `jobs`. |
-*: Цей параметр застарів, використовуйте параметри `number_threshold` і `symbol_threshold` замість цього.
+*: Цей параметр застарів, використовуйте параметри `number_threshold` та `symbol_threshold` замість цього.
### Змінні
@@ -2327,7 +2429,7 @@ kotlin_binary = 'kotlinc'
::: tip
-За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
+Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
Коли модуль увімкнено, він завжди буде активним, якщо будь-який з параметрів `detect_extensions`, `detect_files` або `detect_folders` встановлені, модуль буде активним тільки в теках, що відповідають умовам.
@@ -2335,17 +2437,39 @@ kotlin_binary = 'kotlinc'
### Параметри
-| Параметр | Стандартно | Опис |
-| ------------------- | ---------------------------------------------------- | -------------------------------------------- |
-| `symbol` | `'☸ '` | Символ, що показується перед Кластером. |
-| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Формат модуля. |
-| `style` | `'cyan bold'` | Стиль модуля. |
-| `context_aliases` | `{}` | Таблиця контекстних псевдонімів. |
-| `user_aliases` | `{}` | Таблиця псевдонімів користувача. |
-| `detect_extensions` | `[]` | Які розширення повинні запускати цей модуль. |
-| `detect_files` | `[]` | Які імена файлів мають запускати цей модуль. |
-| `detect_folders` | `[]` | Які теки мають запускати цей модуль. |
-| `disabled` | `true` | Вимикає модуль `kubernetes`. |
+::: warning
+
+Параметри `context_aliases` та `user_aliases` є застарілими. Використовуйте `contexts` та, відповідно, `context_alias` та `user_alias`, натомість.
+
+:::
+
+| Параметр | Стандартно | Опис |
+| ------------------- | ---------------------------------------------------- | --------------------------------------------------------- |
+| `symbol` | `'☸ '` | Символ, що показується перед Кластером. |
+| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Формат модуля. |
+| `style` | `'cyan bold'` | Стиль модуля. |
+| `context_aliases`* | `{}` | Таблиця контекстних псевдонімів. |
+| `user_aliases`* | `{}` | Таблиця псевдонімів користувача. |
+| `detect_extensions` | `[]` | Які розширення повинні запускати цей модуль. |
+| `detect_files` | `[]` | Які імена файлів мають запускати цей модуль. |
+| `detect_folders` | `[]` | Які теки мають запускати цей модуль. |
+| `contexts` | `[]` | Кастомізовані стилі та символи для конкретних контекстів. |
+| `disabled` | `true` | Вимикає модуль `kubernetes`. |
+
+*: Цей параметр є застарілими, додайте `contexts`, відповідно, `context_alias` та `user_alias`, натомість.
+
+Для налаштування стилю модуля для конкретних середовищ використовуйте наступну конфігурацію як частину списку `contexts`:
+
+| Змінна | Опис |
+| ----------------- | --------------------------------------------------------------------------------------------------------- |
+| `context_pattern` | **Обовʼязково** Регулярний вираз, що повертає збіг з назвою поточного контексту Kubernetes. |
+| `user_pattern` | Регулярний вираз, що відповідає поточному імені користувача Kubernetes. |
+| `context_alias` | Псевдонім контексту для показу замість назви повного контексту. |
+| `user_alias` | Псевдонім користувача для показу замість повного імені користувача. |
+| `style` | Стиль для модуля, при використанні цього контексту. Якщо не вказано, використовуватиметься стиль модуля. |
+| `symbol` | Символ для модуля при використанні цього контексту. Якщо не вказано, використовуватиметься символ модуля. |
+
+Зверніть увагу, що всі регулярні вирази виглядають як `^$` і мають збігатись з усім рядком. Регулярний вираз `*_pattern` може мати групи, які можуть зазначатись у відповідних аліасах як `$name` та `$N` (дивіться приклад нижче та [документації rust Regex::replace()](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
### Змінні
@@ -2368,13 +2492,9 @@ kotlin_binary = 'kotlinc'
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Показує модуль лише у теках, що містять файл `k8s`.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Регулярні вирази
+#### Kubernetes Context спец налаштування
-Крім простого псевдоніма, `context_aliases` і `user_aliases` також підтримують розширене зіставлення та перейменування за допомогою регулярних виразів.
-
-Регулярний вираз має збігатися в усьому kube context, на групи захоплення можна посилатися за допомогою `$name` і `$N` при заміні. Трохи більше пояснень в документації [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace).
-
-Довгі автоматично згенеровані назви кластерів можуть бути визначені та скорочені за допомогою регулярних виразів:
+Параметр `contexts` використовується для налаштування того, як виглядає назва контексту Kubernetes (стиль та символ), якщо назва збігається з визначеною регулярним виразом.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
-# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
-# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
-# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+[[kubernetes.contexts]]
+# стиль "bold red" + типовий символ, коли назва поточного контексту Kubernetes збігається з "production" *та* поточний користувач
+# збігається з "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# стиль "green" + інший символ, коли назва поточного контексту Kubernetes містить openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Використання груп
+# Контекст з GKE, AWS та інших хмарних постачальників зазвичай має додаткову інформацію, наприклад регіон/зону.
+# Наступний елемент збігається з форматом GKE format (`gke_projectname_zone_cluster-name`)
+# та змінює кожний відповідний kube context на більш зрозумілий формат (`gke-cluster-name`):
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Line Break
@@ -2509,7 +2640,7 @@ format = 'via [🌕 $version](bold blue) '
::: tip
-За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
+Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
:::
@@ -2730,7 +2861,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
| `detect_folders` | `['node_modules']` | В яких теках цей модуль має запускатись. |
| `style` | `'bold green'` | Стиль модуля. |
| `disabled` | `false` | Вимикає модуль `nodejs`. |
-| `not_capable_style` | `bold red` | Стиль для модуля, коли версія рушія у package.json не відповідає версії Node.js. |
+| `not_capable_style` | `'bold red'` | Стиль для модуля, коли версія рушія у package.json не відповідає версії Node.js. |
### Змінні
@@ -2882,7 +3013,7 @@ symbol = '☁️ '
::: tip
-За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
+Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
:::
@@ -2890,12 +3021,12 @@ symbol = '☁️ '
| Параметр | Стандартно | Опис |
| ---------- | --------------------- | ------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | Формат модуля. |
-| `style` | `"bold white"` | Стиль модуля. |
+| `format` | `'[$symbol]($style)'` | Формат модуля. |
+| `style` | `'bold white'` | Стиль модуля. |
| `disabled` | `true` | Вимикає модуль `os`. |
| `symbols` | | Таблиця символів для кожної операційної системи. |
-`symbols` дозволяє визначити довільні символи для кожного типу операційної системи. Типи операційних систем не визначені вашою конфігурацією, використовують стандартну таблицю символів, дивись нижче. На цю мить усі операційні системи, що підтримуються модулем, перераховані нижче. Якщо ви бажаєте додати операційну систему, то можете створити [запит на функцію](https://github.com/starship/starship/issues/new/choose).
+`symbols` дозволяє визначити довільні символи для кожного типу операційної системи. Типи операційних систем не визначені вашою конфігурацією, використовують стандартну таблицю символів, дивись нижче. На цю мить усі операційні системи, що підтримуються модулем, перераховані нижче. Якщо ви бажаєте додати операційну систему, то можете створити [відповідний запит](https://github.com/starship/starship/issues/new/choose).
```toml
# Це таблиця стандартних символів.
@@ -2974,7 +3105,7 @@ Arch = "Arch is the best! "
## Package Version
-Модуль `package` показується, коли поточна тека є сховищем для пакунка, і показує його поточну версію. Наразі модуль підтримує такі пакунки: `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart`.
+Модуль `package` показується, коли поточна тека є сховищем для пакунка, і показує його поточну версію. Наразі модуль підтримує такі пакунки: `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` та `dart`.
- [**npm**](https://docs.npmjs.com/cli/commands/npm) — версія пакунка `npm` отримується з `package.json` з поточної теки
- [**Cargo**](https://doc.rust-lang.org/cargo/) — версія пакунка `cargo` отримується з `Cargo.toml` з поточної теки
@@ -3127,7 +3258,7 @@ format = 'via [🔹 $version](147 bold) '
::: tip
-За замовчуванням, версія Pulumi не показана, тому що отримання версії потребує на порядок більше часу, ніж потрібно іншим плагінам (близько 70мc). Якщо ви все ще хочете увімкнути показ версії, [дивіться приклад нижче](#with-pulumi-version).
+Стандартно версія Pulumi не показується, через те що для цього потрібно набагато більше часу ніж на завантаження більшості втулків (~70ms). Якщо ви все ще хочете увімкнути показ версії, [дивіться приклад нижче](#with-pulumi-version).
:::
@@ -3245,7 +3376,7 @@ format = 'via [$symbol$version](bold white)'
| `symbol` | `'🐍 '` | Формат рядка, що представляє символ Python |
| `style` | `'yellow bold'` | Стиль модуля. |
| `pyenv_version_name` | `false` | Використовувати pyenv для отримання версії Python |
-| `pyenv_prefix` | `pyenv` | Префікс перед версією pyenv, показується якщо pyenv використовується |
+| `pyenv_prefix` | `'pyenv'` | Префікс перед версією pyenv, показується якщо pyenv використовується |
| `python_binary` | `['python', 'python3', 'python2']` | Налаштовує бінарні файли python, який Starship буде використовувати для отримання версії. |
| `detect_extensions` | `['py']` | Які розширення повинні запускати цей модуль |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Назви файлів, які активують модуль |
@@ -3254,7 +3385,7 @@ format = 'via [$symbol$version](bold white)'
::: tip
-Змінна `python_binary` приймає як рядок, так список рядків. Starship спробує запустити кожен бінарний файл, поки це не дасть результат. Зауважте, що можна змінити двійковий файл, який використовується Starship, щоб отримати версію Python, а не параметрів, які використовуються.
+Змінна `python_binary` приймає як рядок, так і список рядків. Starship спробує запустити кожен бінарний файл, поки це не дасть результат. Зауважте, що можна змінити двійковий файл, який використовується Starship, щоб отримати версію Python, а не параметрів, які використовуються.
Стандартні значення та порядок для `python_binary` було вибрано так, щоб спочатку ідентифікувати версію Python у середовищах virtualenv/conda (які наразі все ще додають `python`, незалежно від того, чи вказує він на `python3` чи на `python2`). Це може мати побічний ефект: якщо у вас все ще встановлено системний Python 2, він може бути обраний перед будь-яким Python 3 (принаймні в дистрибутивах Linux, які завжди містять символічне посилання `/usr/bin/python` на Python 2). Якщо ви більше не працюєте з Python 2, але не можете видалити системний Python 2, змінивши його на `'python3'`, ви приховаєте будь-яку версію Python 2, див. приклад нижче.
@@ -3284,7 +3415,7 @@ pyenv_version_name = true
# ~/.config/starship.toml
[python]
-# Використання лише двійкового файлу `python3` для отримання версії.
+# Використання лише `python3` для отримання версії.
python_binary = 'python3'
```
@@ -3556,28 +3687,29 @@ symbol = '🌟 '
::: tip
-За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
+Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
:::
### Параметри
-| Параметр | Стандартно | Опис |
-| ---------------------- | ------------------------- | -------------------------------------------------------------- |
-| `bash_indicator` | `'bsh'` | Формат рядка, що використовується для bash. |
-| `fish_indicator` | `'fsh'` | Формат рядка, що використовується для fish. |
-| `zsh_indicator` | `'zsh'` | Формат рядка, що використовується для zsh. |
-| `powershell_indicator` | `'psh'` | Формат рядка, що використовується для powershell. |
-| `ion_indicator` | `'ion'` | Формат рядка, що використовується для ion. |
-| `elvish_indicator` | `'esh'` | Формат рядка, що використовується для elvish. |
-| `tcsh_indicator` | `'tsh'` | Формат рядка, що використовується для tcsh. |
-| `xonsh_indicator` | `'xsh'` | Формат рядка, що використовується для xonsh. |
-| `cmd_indicator` | `'cmd'` | Формат рядка, що використовується для cmd. |
-| `nu_indicator` | `'nu'` | Формат рядка, що використовується для nu. |
-| `unknown_indicator` | `''` | Типове значення, що буде показане, якщо оболонка не визначена. |
-| `format` | `'[$indicator]($style) '` | Формат модуля. |
-| `style` | `'white bold'` | Стиль модуля. |
-| `disabled` | `true` | Вимикає модуль `shell`. |
+| Параметр | Стандартно | Опис |
+| ---------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------- |
+| `bash_indicator` | `'bsh'` | Формат рядка, що використовується для bash. |
+| `fish_indicator` | `'fsh'` | Формат рядка, що використовується для fish. |
+| `zsh_indicator` | `'zsh'` | Формат рядка, що використовується для zsh. |
+| `powershell_indicator` | `'psh'` | Формат рядка, що використовується для powershell. |
+| `pwsh_indicator` | | Формат рядка, що використовується для pwsh. Типове значення віддзеркалює значення `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | Формат рядка, що використовується для ion. |
+| `elvish_indicator` | `'esh'` | Формат рядка, що використовується для elvish. |
+| `tcsh_indicator` | `'tsh'` | Формат рядка, що використовується для tcsh. |
+| `xonsh_indicator` | `'xsh'` | Формат рядка, що використовується для xonsh. |
+| `cmd_indicator` | `'cmd'` | Формат рядка, що використовується для cmd. |
+| `nu_indicator` | `'nu'` | Формат рядка, що використовується для nu. |
+| `unknown_indicator` | `''` | Типове значення, що буде показане, якщо оболонка не визначена. |
+| `format` | `'[$indicator]($style) '` | Формат модуля. |
+| `style` | `'white bold'` | Стиль модуля. |
+| `disabled` | `true` | Вимикає модуль `shell`. |
### Змінні
@@ -3686,7 +3818,7 @@ format = '[📦 \[$env\]]($style) '
## Solidity
-Модуль `solidity` показує поточну версію [Solidity](https://soliditylang.org/) Модуль буде показано, якщо буде вказано якісь з наступних умов:
+Модуль `solidity` показує поточну версію [Solidity](https://soliditylang.org/). Модуль буде показано, якщо буде виконуються наступні умови:
- Поточна тека містить файл `.sol`
@@ -3694,14 +3826,14 @@ format = '[📦 \[$env\]]($style) '
| Параметр | Стандартно | Опис |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` |
-| `symbol` | `"S "` | Формат рядка, що представляє символ Solidity |
-| `compiler | ["solc"] | Стандартний компілятор Solidity. |
-| `detect_extensions` | `["sol"]` | Які розширення повинні запускати цей модуль. |
+| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` |
+| `symbol` | `'S '` | Формат рядка, що представляє символ Solidity |
+| `compiler | ['solc'] | Стандартний компілятор Solidity. |
+| `detect_extensions` | `['sol']` | Які розширення повинні запускати цей модуль. |
| `detect_files` | `[]` | Які імена файлів мають запускати цей модуль. |
| `detect_folders` | `[]` | В яких теках цей модуль має запускатись. |
-| `style` | `"bold blue"` | Стиль модуля. |
+| `style` | `'bold blue'` | Стиль модуля. |
| `disabled` | `false` | Вмикає цей модуль. |
### Змінні
@@ -3761,7 +3893,7 @@ format = '[$symbol$environment](dimmed blue) '
::: tip
-За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
+Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
:::
@@ -3822,7 +3954,7 @@ disabled = false
::: tip
-За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
+Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
:::
@@ -3969,7 +4101,7 @@ format = '[🏎💨 $workspace]($style) '
::: tip
-За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
+Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань.
:::
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+Модуль `typst` показує поточну встановлену версію Typst, що використовується в проєкті.
+
+Типово, модуль показується, якщо виконується будь-яка з наступних умов:
+
+- Поточна тека містить файл `template.typ`
+- Поточна тека містить файл `.typ`
+
+### Параметри
+
+| Параметр | Стандартно | Опис |
+| ------------------- | ------------------------------------ | ----------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. |
+| `version_format` | `'v${raw}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` |
+| `symbol` | `'t '` | Формат рядка, що представляє символ Daml |
+| `style` | `'bold #0093A7'` | Стиль модуля. |
+| `detect_extensions` | `['.typ']` | Які розширення повинні запускати цей модуль. |
+| `detect_files` | `['template.typ']` | Які імена файлів мають запускати цей модуль. |
+| `detect_folders` | `[]` | В яких теках цей модуль має запускатись. |
+| `disabled` | `false` | Вимикає модуль `daml`. |
+
+### Змінні
+
+| Змінна | Приклад | Опис |
+| ------------- | --------- | ------------------------------------------- |
+| version | `v0.9.0` | Версія `typst`, псевдонім для typst_version |
+| typst_version | `default` | Поточна версія Typest |
+| symbol | | Віддзеркалює значення параметра `symbol` |
+| style\* | | Віддзеркалює значення параметра `style` |
+
+*: Ця змінна може бути використана лише як частина стилю рядка
+
## Username
Модуль `username` показує імʼя активного користувача. Модуль показується, якщо виконується будь-яка з наступних умов:
@@ -4204,8 +4369,8 @@ symbol = '⚡️ '
Модулі показуються, якщо виконується будь-яка з наступних умов:
-- Поточна тека містить файл, ім'я якого є в `detect_files`
-- Поточна тека містить теки, ім'я яких вказано в `detect_folders`
+- Поточна тека містить файл, імʼя якого є в `detect_files`
+- Поточна тека містить теки, імʼя яких вказано в `detect_folders`
- Поточна тека містить файл, розширення якого є в `detect_extensions`
- Команда `when` повертає 0
- Поточна операційна система (std::env::consts::OS) збігається з полем `os`, якщо визначено.
@@ -4228,7 +4393,7 @@ symbol = '⚡️ '
:::
-::: warning Вихідні дані команди друкуються без екранування
+::: warning Результати роботи команди виводяться без екранування
Незалежно від результату, який генерує команда, він виводиться в командний рядок у незміненому вигляді. Це означає, що якщо вивід містить спеціальні послідовності, які інтерпретуються оболонкою, вони будуть оброблені та перетворені оболонкою при виводі. Ці спеціальні послідовності є специфічними для оболонки, напр. ви можете написати модуль, який записує послідовності bash, наприклад. `\h`, але цей модуль не працюватиме в оболонці fish або zsh.
@@ -4244,7 +4409,7 @@ symbol = '⚡️ '
| `when` | `false` | Або булеве значення (`true` чи `false`, без лапок) або команди shell, що використовуються як умова для показу модуля. У випадку рядка команди, модуль буде показаний, якщо команда повертає код завершення `0`. |
| `require_repo` | `false` | Якщо `true`, модуль буде показано лише в шляхах, що містять репозиторій (git). Цей параметр сам по собі не є достатньою умовою для показу модуля за відсутності інших варіантів. |
| `shell` | | [Дивіться нижче](#custom-command-shell) |
-| `опис` | `''` | Опис модуля, який показується під час запуску `starship explain`. |
+| `description` | `''` | Опис модуля, який показується під час запуску `starship explain`. |
| `detect_files` | `[]` | Файли, які треба шукати у робочій теці для отримання збігу. |
| `detect_folders` | `[]` | Теки, які треба шукати у робочій теці для отримання збігу. |
| `detect_extensions` | `[]` | Розширення файлів, які треба шукати у робочій теці для отримання збігу. |
@@ -4285,13 +4450,13 @@ shell = ['pwsh', '-Command', '-']
::: warning Переконайтеся, що ваша оболонка завершує процеси правильно
-Якщо ви вказуєте власну команду, переконайтеся, що стандартний Shell, який використовується starship, буде виконувати команді з чистим (graceful) завершенням, за допомогою параметра `shell`.
+Якщо ви вказуєте власну команду, переконайтеся, що стандартний Shell, який використовується starship, буде виконувати команди з чистим (graceful) завершенням, за допомогою параметра `shell`.
Наприклад, PowerShell потребує параметр `-Command` для виконання однорядкової команди. Пропуск цього параметра може призвести до рекурсивного циклу starship, де оболонка може спробувати знову завантажити повний профіль середовища з самим starship і, отже, повторно виконати власну команду, потрапивши в нескінченний цикл.
Параметри, подібні до `-NoProfile` у PowerShell, також рекомендовані для інших оболонок, щоб уникнути додаткового часу завантаження власного профілю під час кожного виклику Starship.
-Наразі реалізовано автоматичне виявлення оболонок і правильне додавання параметрів, але можливо, що охоплено не всі оболонки. [Будь ласка, сповістіть про проблему](https://github.com/starship/starship/issues/new/choose) з подробицями про термінал та конфігурацію автозапуску, якщо ви зіткнулись з таким сценарій.
+Наразі реалізовано автоматичне виявлення оболонок і правильне додавання параметрів, але можливо, що охоплено не всі оболонки. [Будь ласка, сповістіть про проблему](https://github.com/starship/starship/issues/new/choose) з подробицями про термінал та конфігурацію автозапуску, якщо ви зіткнулись з таким сценарієм.
:::
diff --git a/docs/uk-UA/faq/README.md b/docs/uk-UA/faq/README.md
index 2d1f9fd2f..afdb13d6b 100644
--- a/docs/uk-UA/faq/README.md
+++ b/docs/uk-UA/faq/README.md
@@ -120,3 +120,11 @@ Starship так само легко видалити, як і встановит
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/uk-UA/guide/README.md b/docs/uk-UA/guide/README.md
index d93495bbc..5782ac00b 100644
--- a/docs/uk-UA/guide/README.md
+++ b/docs/uk-UA/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Слідкуйте за @StarshipPrompt на Twitter"
/>
+
@@ -147,8 +152,6 @@
/>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
Android
-Встановіть Starship використовуючи будь-який з наступних пакетних менеджерів:
+Встановіть Starship використовуючи будь-який з наступних менеджерів пакунків:
| Репозиторій | Команда для встановлення |
| --------------------------------------------------------------------------------- | ------------------------ |
@@ -197,7 +200,7 @@
BSD
-Встановіть Starship використовуючи будь-який з наступних пакетних менеджерів:
+Встановіть Starship використовуючи будь-який з наступних менеджерів пакунків:
| Дистрибутив | Репозиторій | Команда для встановлення |
| --------------- | -------------------------------------------------------- | --------------------------------- |
@@ -216,7 +219,7 @@
curl -sS https://starship.rs/install.sh | sh
```
-Як варіант, можете встановити Starship через будь-який з наступних пакетних менеджерів:
+Як варіант, можете встановити Starship скориставшись будь-яким з наступних менеджерів пакунків:
| Дистрибутив | Репозиторій | Команда для встановлення |
| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
@@ -229,6 +232,7 @@ curl -sS https://starship.rs/install.sh | sh
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
+| openSUSE | [OSS](https://software.opensuse.org/package/starship) | `zypper in starship` |
| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
@@ -242,7 +246,7 @@ curl -sS https://starship.rs/install.sh | sh
curl -sS https://starship.rs/install.sh | sh
```
-Як варіант, можете встановити Starship скориставшись будь-яким з наступних пакетних менеджерів:
+Як варіант, можете встановити Starship скориставшись будь-яким з наступних менеджерів пакунків:
| Репозиторій | Команда для встановлення |
| -------------------------------------------------------- | --------------------------------------- |
@@ -256,9 +260,9 @@ curl -sS https://starship.rs/install.sh | sh
Windows
-Встановіть останню версію системи за допомогою MSI-інсталятора з розділу [релізів](https://github.com/starship/starship/releases/latest).
+Встановіть останню версію для вашої системи за допомогою MSI-інсталятора з розділу [релізів](https://github.com/starship/starship/releases/latest).
-Встановіть Starship використовуючи будь-який з наступних менеджерів пакетів:
+Встановіть Starship використовуючи будь-який з наступних менеджерів пакунків:
| Репозиторій | Команда для встановлення |
| -------------------------------------------------------------------------------------------- | --------------------------------------- |
@@ -341,7 +345,7 @@ mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
```
-Додайте наступний рядок наприкінці налаштувань Nushell (знайдіть її за допомоги `$nu.config-path`):
+Додайте наступний рядок наприкінці Вашої конфігурації Nushell (знайдіть її виконавши `$nu.config-path`):
```sh
use ~/.cache/starship/init.nu
@@ -354,7 +358,7 @@ use ~/.cache/starship/init.nu
PowerShell
-Додайте наступний рядок наприкінці Вашої конфігурації PowerShell (знайдіть її виконавши `$PROFILE`):
+Додайте наступний рядок наприкінці вашої конфігурації PowerShell (знайдіть її виконавши команду `$PROFILE`):
```powershell
Invoke-Expression (&starship init powershell)
@@ -397,9 +401,9 @@ eval "$(starship init zsh)"
### Крок 3. Налаштуйте starship
-Запустіть новий екземпляр вашої оболонки і ви побачите новий яскравий командний рядок. Якщо вас влаштовують стандартні налаштування – насолоджуйтесь результатом!
+Запустіть новий екземпляр вашої оболонки і ви побачите новий яскравий командний рядок. Якщо ви задоволені налаштуваннями, насолоджуйтесь!
-Якщо ви бажаєте, ви можете продовжити налаштування Starship:
+Якщо ви бажаєте додатково налаштувати Starship:
- **[Налаштування](https://starship.rs/config/)** – дізнайтесь як налаштувати Starship, щоб підлаштувати командний рядок під свої потреби
@@ -425,7 +429,7 @@ eval "$(starship init zsh)"
## ❤️ Спонсори
-Підтримайте цей проект [ставши спонсором](https://github.com/sponsors/starship). Ваше імʼя або логотип показуватимуться тут з посиланням на ваш сайт.
+Підтримайте цей проєкт [ставши спонсором](https://github.com/sponsors/starship). Ваше імʼя або логотип показуватимуться тут з посиланням на ваш сайт.
**Підтримувачі**
diff --git a/docs/uk-UA/presets/README.md b/docs/uk-UA/presets/README.md
index 50c8fdbac..e1dc7d3c7 100644
--- a/docs/uk-UA/presets/README.md
+++ b/docs/uk-UA/presets/README.md
@@ -63,3 +63,9 @@
Цей шаблон створений під враженням від [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
[![Скріншот шаблона Tokyo Night](/presets/img/tokyo-night.png "Натисніть, щоб переглянути шаблон Токіо Night")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+Цей шаблон створено під впливом [Pastel Powerline](./pastel-powerline.md) та [Tokyo Night](./tokyo-night.md).
+
+[![Скріншот шаблона Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png "Натисніть, щоб переглянути шаблон Gruvbox Rainbow")](./gruvbox-rainbow)
diff --git a/docs/uk-UA/presets/gruvbox-rainbow.md b/docs/uk-UA/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..b6272ae5a
--- /dev/null
+++ b/docs/uk-UA/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[Повернутися до Шаблонів](./README.md#gruvbox-rainbow)
+
+# Шаблон Gruvbox Rainbow
+
+Цей шаблон створено під впливом [Pastel Powerline](./pastel-powerline.md) та [Tokyo Night](./tokyo-night.md).
+
+![Скріншот шаблона Gruvbox Rainbow](/presets/img/gruvbox-rainbow.png)
+
+### Передумови
+
+- Встановлений та увімкнений шрифт [Nerd Font](https://www.nerdfonts.com/) у вашому терміналі
+
+### Налаштування
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[Натисніть, щоб завантажити TOML](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/uk-UA/presets/jetpack.md b/docs/uk-UA/presets/jetpack.md
new file mode 100644
index 000000000..be6565d39
--- /dev/null
+++ b/docs/uk-UA/presets/jetpack.md
@@ -0,0 +1,24 @@
+[Повернутися до Шаблонів](./README.md#jetpack)
+
+# Jetpack
+
+Цей псевдомінімалістичний шаблон створений під враженням від [geometry](https://github.com/geometry-zsh/geometry) та командного рядка [spaceship](https://github.com/spaceship-prompt/spaceship-prompt).
+
+> Jetpack використовує колірну тему термінала.
+
+![Скріншот шаблона Jetpack](/presets/img/jetpack.png)
+
+### Передумови
+
+- Потрібна командна оболонка з підтримкою [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt).
+- Рекомендується [Jetbrains Mono](https://www.jetbrains.com/lp/mono/).
+
+### Налаштування
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[Натисніть, щоб завантажити TOML](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/vi-VN/config/README.md b/docs/vi-VN/config/README.md
index e38d4c4e0..72769990f 100644
--- a/docs/vi-VN/config/README.md
+++ b/docs/vi-VN/config/README.md
@@ -206,6 +206,13 @@ Cái này là danh sách các tuỳ chọn cho cấu hình prompt-wide.
| `add_newline` | `true` | Chèn dòng trắng giữa các dấu nhắc lệnh. |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
+
+::: tip
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
### Ví dụ
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
@@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform
| `region_aliases` | `{}` | Bảng của các region alias để hiển thị ngoài tên AWS. |
| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. |
| `style` | `'bold yellow'` | Kiểu cho module. |
-| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
+| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. |
| `disabled` | `false` | Vô hiệu `AWS` module. |
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
@@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu
### Options
-| Tuỳ chọn | Mặc định | Mô tả |
-| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
-| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'C '` | The symbol used before displaying the compiler details |
-| `detect_extensions` | `['c', 'h']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
-| `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. |
-| `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is |
-| `style` | `'bold 149'` | Kiểu cho module. |
-| `disabled` | `false` | Disables the `c` module. |
+| Tuỳ chọn | Mặc định | Mô tả |
+| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'C '` | The symbol used before displaying the compiler details |
+| `detect_extensions` | `['c', 'h']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
+| `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. |
+| `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is |
+| `style` | `'bold 149'` | Kiểu cho module. |
+| `disabled` | `false` | Disables the `c` module. |
### Các biến
@@ -671,7 +683,7 @@ Kí tự sẽ nói cho bạn câu lệnh cuối liệu thành công hay thất b
Mặc định, nó chỉ thay đổi màu. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
-::: warning
+::: cảnh báo
`vimcmd_symbol` is only supported in cmd, fish and zsh. `vimcmd_replace_one_symbol`, `vimcmd_replace_symbol`, and `vimcmd_visual_symbol` are only supported in fish due to [upstream issues with mode detection in zsh](https://github.com/starship/starship/issues/625#issuecomment-732454148).
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### Options
+
+| Tuỳ chọn | Mặc định | Mô tả |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | Định dạng cho module. |
+| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | Kiểu cho module. |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
+| `detect_files` | `['.envrc']` | Những tên tệp nào sẽ kích hoạt mô-đun này. |
+| `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### Các biến
+
+| Biến | Ví dụ | Mô tả |
+| --------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| symbol | | Giá trị ghi đè tuỳ chọn `symbol`. |
+| style\* | `red bold` | Giá trị ghi đè của `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
+
+[direnv]
+disabled = false
+```
+
## 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` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
@@ -1427,7 +1480,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
- The current directory contains a file with the `.fnl` extension
-### Options
+### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
@@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. |
| `style` | `'bold green'` | Kiểu cho module. |
-| `detect_extensions` | `[fnl]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
+| `detect_extensions` | `['fnl']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
| `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. |
| `detect_folders` | `[]` | Những thư mục nào nên kích hoạt các mô đun này. |
| `disabled` | `false` | Disables the `fennel` module. |
@@ -1463,7 +1516,7 @@ symbol = '⫰ '
The `fill` module fills any extra space on the line with a symbol. If multiple `fill` modules are present in a line they will split the space evenly between them. This is useful for aligning other modules.
-### Các tuỳ chọn
+### Options
| Tuỳ chọn | Mặc định | Mô tả |
| ---------- | -------------- | --------------------------------- |
@@ -1524,11 +1577,46 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
+
+### Options
+
+| Tuỳ chọn | Mặc định | Mô tả |
+| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
+| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Định dạng cho module. |
+| `added_style` | `'bold green'` | The style for the added count. |
+| `deleted_style` | `'bold red'` | The style for the deleted count. |
+| `only_nonzero_diffs` | `true` | Render status only for changed items. |
+| `disabled` | `true` | Disables the `fossil_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
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
Mô đun `gcloud` hiển thị cấu hình hiện tại của [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. Cái này dựa trên tập tin `~/.config/gcloud/active_config`, `~/.config/gcloud/configurations/config_{CONFIG NAME}` và biến môi trường `CLOUDSDK_CONFIG`.
-When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set.
+When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set.
### Options
@@ -1771,7 +1859,7 @@ The Git Status module is very slow in Windows directories (for example under `/m
:::
-### Options
+### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
@@ -1879,7 +1967,7 @@ The `golang` module shows the currently installed version of [Go](https://golang
- Thư mục hiện tại chứa một thư mục `Godeps`
- Thư mục hiện tại chứa một tệp tin với phần mở rộng `.go`
-### Options
+### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
@@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel
| Tuỳ chọn | Mặc định | Mô tả |
| ---------- | -------------------------- | ------------------------------------------------------ |
| `format` | `'via [$symbol]($style) '` | Định dạng cho module. |
-| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. |
-| `style` | `"yellow bold"` | Kiểu cho module. |
+| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. |
+| `style` | `'yellow bold'` | Kiểu cho module. |
| `disabled` | `false` | Disables the `guix_shell` module. |
### Các biến
@@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. |
-| `detect_extensions` | `["gradle", "gradle.kts"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
+| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. |
+| `detect_extensions` | `['gradle', 'gradle.kts']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
| `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. |
-| `detect_folders` | `["gradle"]` | Những thư mục nào sẽ kích hoạt mô-đun này. |
-| `style` | `"bold bright-cyan"` | Kiểu cho module. |
+| `detect_folders` | `['gradle']` | Những thư mục nào sẽ kích hoạt mô-đun này. |
+| `style` | `'bold bright-cyan'` | Kiểu cho module. |
| `disabled` | `false` | Disables the `gradle` module. |
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
@@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `detect_extensions` | `["hx", "hxml"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Những thư mục nào nên kích hoạt các mô đun này. |
-| `symbol` | `"⌘ "` | Một format string đại diện cho biểu tượng của Helm. |
-| `style` | `"bold fg:202"` | Kiểu cho module. |
+| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `detect_extensions` | `['hx', 'hxml']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Những tên tệp nào sẽ kích hoạt mô-đun này. |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Những thư mục nào nên kích hoạt các mô đun này. |
+| `symbol` | `'⌘ '` | Một format string đại diện cho biểu tượng của Helm. |
+| `style` | `'bold fg:202'` | Kiểu cho module. |
| `disabled` | `false` | Disables the `haxe` module. |
### Các biến
@@ -2107,14 +2195,15 @@ Mô đun `hostname` hiển thị hostnam hệ thống.
### Các tuỳ chọn
-| Tuỳ chọn | Mặc định | Mô tả |
-| ------------ | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
-| `ssh_only` | `true` | Chỉ hiển thị hostname khi được kết nối tới một phiên SSH. |
-| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
-| `trim_at` | `'.'` | Chuỗi mà hostname được cắt ngắn, sau khi khớp lần đầu tiên. `'.'` will stop after the first dot. `''` will disable any truncation |
-| `format` | `'[$ssh_symbol$hostname]($style) in '` | Định dạng cho module. |
-| `style` | `'bold dimmed green'` | Kiểu cho module. |
-| `disabled` | `false` | Vô hiệu `hastname` module. |
+| Tuỳ chọn | Mặc định | Mô tả |
+| ----------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
+| `ssh_only` | `true` | Chỉ hiển thị hostname khi được kết nối tới một phiên SSH. |
+| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
+| `trim_at` | `'.'` | Chuỗi mà hostname được cắt ngắn, sau khi khớp lần đầu tiên. `'.'` will stop after the first dot. `''` will disable any truncation. |
+| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
+| `format` | `'[$ssh_symbol$hostname]($style) in '` | Định dạng cho module. |
+| `style` | `'bold dimmed green'` | Kiểu cho module. |
+| `disabled` | `false` | Vô hiệu `hastname` module. |
### Các biến
@@ -2126,7 +2215,9 @@ Mô đun `hostname` hiển thị hostnam hệ thống.
*: Biến này có thể chỉ được sử dụng như một phần của style string
-### Ví dụ
+### Các ví dụ
+
+#### Always show the hostname
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Hide the hostname in remote tmux sessions
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn:
@@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes
-Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. Nếu biến môi trường `$KUBECONFIG` được thiết lập, mô đun sẽ sử dụng cái đó nếu nó không sử dụng `~/.kube/config`.
+Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. Nếu biến môi trường `$KUBECONFIG` được thiết lập, mô đun sẽ sử dụng cái đó nếu nó không sử dụng `~/.kube/config`.
::: tip
@@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### Các tuỳ chọn
+::: cảnh báo
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Định dạng cho module. |
| `style` | `'cyan bold'` | Kiểu cho module. |
-| `context_aliases` | `{}` | Table of context aliases to display. |
-| `user_aliases` | `{}` | Table of user aliases to display. |
+| `context_aliases`* | `{}` | Table of context aliases to display. |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
| `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. |
| `detect_folders` | `[]` | Những thư mục nào nên kích hoạt các mô đun này. |
+| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. |
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| Biến | Mô tả |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `style` | The style for the module when using this context. If not set, will use module's style. |
+| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### Các biến
| Biến | Ví dụ | Mô tả |
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Regex Matching
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
-
-Long and automatically generated cluster names can be identified and shortened using regular expressions:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Line Break
@@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| `detect_folders` | `['node_modules']` | Những thư mục nào sẽ kích hoạt mô-đun này. |
| `style` | `'bold green'` | Kiểu cho module. |
| `disabled` | `false` | Disables the `nodejs` module. |
-| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. |
+| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. |
### Các biến
@@ -2890,8 +3021,8 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế
| Tuỳ chọn | Mặc định | Mô tả |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | Định dạng cho module. |
-| `style` | `"bold white"` | Kiểu cho module. |
+| `format` | `'[$symbol]($style)'` | Định dạng cho module. |
+| `style` | `'bold white'` | Kiểu cho module. |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -3245,7 +3376,7 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki
| `symbol` | `'🐍 '` | A format string representing the symbol of Python |
| `style` | `'yellow bold'` | Kiểu cho module. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
-| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used |
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
| `detect_extensions` | `['py']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Tên tệp nào sẽ kích hoạt mô-đun này |
@@ -3562,22 +3693,23 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế
### Các tuỳ chọn
-| Tuỳ chọn | Mặc định | Mô tả |
-| ---------------------- | ------------------------- | ------------------------------------------------------------ |
-| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
-| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
-| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
-| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
-| `ion_indicator` | `'ion'` | A format string used to represent ion. |
-| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
-| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
-| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
-| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
-| `nu_indicator` | `'nu'` | A format string used to represent nu. |
-| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
-| `format` | `'[$indicator]($style) '` | Định dạng cho module. |
-| `style` | `'white bold'` | Kiểu cho module. |
-| `disabled` | `true` | Disables the `shell` module. |
+| Tuỳ chọn | Mặc định | Mô tả |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
+| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
+| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
+| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | A format string used to represent ion. |
+| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
+| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
+| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
+| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
+| `nu_indicator` | `'nu'` | A format string used to represent nu. |
+| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
+| `format` | `'[$indicator]($style) '` | Định dạng cho module. |
+| `style` | `'white bold'` | Kiểu cho module. |
+| `disabled` | `true` | Disables the `shell` module. |
### Các biến
@@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
+| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
| `detect_files` | `[]` | Những tên tệp nào sẽ kích hoạt mô-đun này. |
| `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. |
-| `style` | `"bold blue"` | Kiểu cho module. |
+| `style` | `'bold blue'` | Kiểu cho module. |
| `disabled` | `false` | Disables this module. |
### Các biến
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+By default, the module will be shown if any of the following conditions are met:
+
+- Thư mục hiện tại chứa một tập tin `template.typ`
+- The current directory contains any `*.typ` file
+
+### Các tuỳ chọn
+
+| Tuỳ chọn | Mặc định | Mô tả |
+| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | Định dạng cho module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'t '` | A format string representing the symbol of Daml |
+| `style` | `'bold #0093A7'` | Kiểu cho module. |
+| `detect_extensions` | `['.typ']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
+| `detect_files` | `['template.typ']` | Những tên tệp nào sẽ kích hoạt mô-đun này. |
+| `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. |
+| `disabled` | `false` | Disables the `daml` module. |
+
+### Các biến
+
+| Biến | Ví dụ | Mô tả |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| symbol | | Giá trị ghi đè tuỳ chọn `symbol` |
+| style\* | | Giá trị ghi đè của `style` |
+
+*: Biến này có thể chỉ được sử dụng như một phần của style string
+
## Username
The `username` module shows active user's username. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn:
diff --git a/docs/vi-VN/faq/README.md b/docs/vi-VN/faq/README.md
index 9af777e5b..04983a2de 100644
--- a/docs/vi-VN/faq/README.md
+++ b/docs/vi-VN/faq/README.md
@@ -120,3 +120,11 @@ If Starship was installed using the install script, the following command will d
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/vi-VN/guide/README.md b/docs/vi-VN/guide/README.md
index 0900d31b3..70bc2f10d 100644
--- a/docs/vi-VN/guide/README.md
+++ b/docs/vi-VN/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Theo dõi @StarshipPrompt trên Twitter"
/>
+
@@ -147,8 +152,6 @@
/>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
@@ -236,7 +240,7 @@ Hoặc là, cài đặt Starship bằng một package manager bất kì:
macOS
-Cài phiên bản mới nhất cho hệ điều hành của bạn:
+Cài đặt phiên bản mới nhất cho hệ điều hành của bạn:
```sh
curl -sS https://starship.rs/install.sh | sh
diff --git a/docs/vi-VN/presets/README.md b/docs/vi-VN/presets/README.md
index 0e28b2a59..ea3f1b6fc 100644
--- a/docs/vi-VN/presets/README.md
+++ b/docs/vi-VN/presets/README.md
@@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow)
diff --git a/docs/vi-VN/presets/gruvbox-rainbow.md b/docs/vi-VN/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..5986631c2
--- /dev/null
+++ b/docs/vi-VN/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[Return to Presets](./README.md#gruvbox-rainbow)
+
+# Gruvbox Rainbow Preset
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png)
+
+### Yêu cầu
+
+- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal
+
+### Cấu hình
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/vi-VN/presets/jetpack.md b/docs/vi-VN/presets/jetpack.md
new file mode 100644
index 000000000..4b83fa3d6
--- /dev/null
+++ b/docs/vi-VN/presets/jetpack.md
@@ -0,0 +1,24 @@
+[Return to Presets](./README.md#jetpack)
+
+# Jetpack Preset
+
+This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
+
+> Jetpack uses the terminal's color theme.
+
+![Screenshot of Jetpack preset](/presets/img/jetpack.png)
+
+### Prerequisite
+
+- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
+
+### Cấu hình
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md
index 90ac6fea5..316497e05 100644
--- a/docs/zh-CN/README.md
+++ b/docs/zh-CN/README.md
@@ -162,7 +162,7 @@ description: Starship是一款轻量级、反应迅速、可自定义的高颜
然后在您的 Nushell 配置文件的最后(使用 `$nu.config-path` 来获取它的路径),添加以下内容:
```sh
- use ~/.cache/starship/init.nu
+ 使用 ~/.cache/starship/init.nu
```
diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md
index 9807ad5dd..b41d3714e 100644
--- a/docs/zh-CN/config/README.md
+++ b/docs/zh-CN/config/README.md
@@ -206,6 +206,13 @@ detect_extensions = ['ts', '!video.ts', '!audio.ts']
| `add_newline` | `true` | 在 shell 提示符之间插入空行。 |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
+
+::: tip
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
### 示例
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### 配置项
| 选项 | 默认值 | 描述 |
@@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform
| `region_aliases` | `{}` | 地区缩写列表,用来显示在 AWS 主机名之后。 |
| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. |
| `style` | `'bold yellow'` | 此组件的样式。 |
-| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
+| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. |
| `disabled` | `false` | 禁用 `AWS` 组件。 |
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
@@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu
### 配置项
-| 选项 | 默认值 | 描述 |
-| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
-| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `符号` | `'C '` | The symbol used before displaying the compiler details |
-| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
-| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is |
-| `style` | `'bold 149'` | 此组件的样式。 |
-| `disabled` | `false` | Disables the `c` module. |
+| 选项 | 默认值 | 描述 |
+| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `符号` | `'C '` | The symbol used before displaying the compiler details |
+| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
+| `detect_files` | `[]` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is |
+| `style` | `'bold 149'` | 此组件的样式。 |
+| `disabled` | `false` | Disables the `c` module. |
### 变量
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### 配置项
+
+| 选项 | 默认值 | 描述 |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | 组件格式化模板。 |
+| `符号` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | 此组件的样式。 |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | Which extensions should trigger this module. |
+| `detect_files` | `['.envrc']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### 变量
+
+| 字段 | 示例 | 描述 |
+| --------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| 符号 | | `symbol`对应值. |
+| style\* | `red bold` | `style`对应值. |
+
+*: 此变量只能作为样式字符串的一部分使用
+
+### 示例
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## 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` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
@@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `符号` | `'🧅 '` | The symbol used before displaying the version of fennel. |
| `style` | `'bold green'` | 此组件的样式。 |
-| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. |
+| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `false` | Disables the `fennel` module. |
@@ -1524,11 +1577,46 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
+
+### 配置项
+
+| 选项 | 默认值 | 描述 |
+| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
+| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | 组件格式化模板。 |
+| `added_style` | `'bold green'` | The style for the added count. |
+| `deleted_style` | `'bold red'` | The style for the deleted count. |
+| `only_nonzero_diffs` | `true` | Render status only for changed items. |
+| `disabled` | `true` | Disables the `fossil_metrics` module. |
+
+### 变量
+
+| 字段 | 示例 | 描述 |
+| ----------------- | --- | ------------------------------------------- |
+| added | `1` | The current number of added lines |
+| deleted | `2` | The current number of deleted lines |
+| added_style\* | | Mirrors the value of option `added_style` |
+| deleted_style\* | | Mirrors the value of option `deleted_style` |
+
+*: 此变量只能作为样式字符串的一部分使用
+
+### 示例
+
+```toml
+# ~/.config/starship.toml
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
-When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set.
+When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set.
### 配置项
@@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel
| 选项 | 默认值 | 描述 |
| ---------- | -------------------------- | ------------------------------------------------------ |
| `format` | `'via [$symbol]($style) '` | 组件格式化模板。 |
-| `符号` | `"🐃 "` | A format string representing the symbol of guix-shell. |
-| `style` | `"yellow bold"` | 此组件的样式。 |
+| `符号` | `'🐃 '` | A format string representing the symbol of guix-shell. |
+| `style` | `'yellow bold'` | 此组件的样式。 |
| `disabled` | `false` | Disables the `guix_shell` module. |
### 变量
@@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c
| 选项 | 默认值 | 描述 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `符号` | `"🅶 "` | A format string representing the symbol of Gradle. |
-| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `符号` | `'🅶 '` | A format string representing the symbol of Gradle. |
+| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `["gradle"]` | Which folders should trigger this module. |
-| `style` | `"bold bright-cyan"` | 此组件的样式。 |
+| `detect_folders` | `['gradle']` | Which folders should trigger this module. |
+| `style` | `'bold bright-cyan'` | 此组件的样式。 |
| `disabled` | `false` | Disables the `gradle` module. |
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
@@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| 选项 | 默认值 | 描述 |
| ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. |
-| `符号` | `"⌘ "` | A format string representing the symbol of Helm. |
-| `style` | `"bold fg:202"` | 此组件的样式。 |
+| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
+| `符号` | `'⌘ '` | A format string representing the symbol of Helm. |
+| `style` | `'bold fg:202'` | 此组件的样式。 |
| `disabled` | `false` | Disables the `haxe` module. |
### 变量
@@ -2107,14 +2195,15 @@ format = 'via [⎈ $version](bold white) '
### 配置项
-| 选项 | 默认值 | 描述 |
-| ------------ | -------------------------------------- | ----------------------------------------------------------------------------------------------------- |
-| `ssh_only` | `true` | 仅在连接到 SSH 会话时显示主机名。 |
-| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
-| `trim_at` | `'.'` | 当主机名过长被截断时,会截断成第一次匹配该字符串之前的主机名。 `'.'` will stop after the first dot. `''` will disable any truncation |
-| `format` | `'[$ssh_symbol$hostname]($style) in '` | 组件格式化模板。 |
-| `style` | `'bold dimmed green'` | 此组件的样式。 |
-| `disabled` | `false` | 禁用 `hostname` 组件。 |
+| 选项 | 默认值 | 描述 |
+| ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `ssh_only` | `true` | 仅在连接到 SSH 会话时显示主机名。 |
+| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
+| `trim_at` | `'.'` | 当主机名过长被截断时,会截断成第一次匹配该字符串之前的主机名。 `'.'` will stop after the first dot. `''` will disable any truncation. |
+| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
+| `format` | `'[$ssh_symbol$hostname]($style) in '` | 组件格式化模板。 |
+| `style` | `'bold dimmed green'` | 此组件的样式。 |
+| `disabled` | `false` | 禁用 `hostname` 组件。 |
### 变量
@@ -2126,7 +2215,9 @@ format = 'via [⎈ $version](bold white) '
*: 此变量只能作为样式字符串的一部分使用
-### 示例
+### Examples
+
+#### Always show the hostname
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Hide the hostname in remote tmux sessions
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
@@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes
-Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
+Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
::: tip
@@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### 配置项
+::: warning
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
| 选项 | 默认值 | 描述 |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `符号` | `'☸ '` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | 组件格式化模板。 |
| `style` | `'cyan bold'` | 此组件的样式。 |
-| `context_aliases` | `{}` | Table of context aliases to display. |
-| `user_aliases` | `{}` | Table of user aliases to display. |
+| `context_aliases`* | `{}` | Table of context aliases to display. |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
+| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. |
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| 字段 | 描述 |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `style` | The style for the module when using this context. If not set, will use module's style. |
+| `符号` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### 变量
| 字段 | 示例 | 描述 |
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Regex Matching
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
-
-Long and automatically generated cluster names can be identified and shortened using regular expressions:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## Line Break
@@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| `detect_folders` | `['node_modules']` | Which folders should trigger this module. |
| `style` | `'bold green'` | 此组件的样式。 |
| `disabled` | `false` | 禁用 `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. |
+| `not_capable_style` | `'bold red'` | The style for the module when an engines property in package.json does not match the Node.js version. |
### 变量
@@ -2890,8 +3021,8 @@ The [os_info](https://lib.rs/crates/os_info) crate used by this module is known
| 选项 | 默认值 | 描述 |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | 组件格式化模板。 |
-| `style` | `"bold white"` | 此组件的样式。 |
+| `format` | `'[$symbol]($style)'` | 组件格式化模板。 |
+| `style` | `'bold white'` | 此组件的样式。 |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met:
| `符号` | `'🐍 '` | 用于表示Python的格式化字符串。 |
| `style` | `'yellow bold'` | 此组件的样式。 |
| `pyenv_version_name` | `false` | 使用 pyenv 获取 Python 版本 |
-| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used |
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
| `detect_extensions` | `['py']` | Which extensions should trigger this module |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
@@ -3562,22 +3693,23 @@ The `shell` module shows an indicator for currently used shell.
### 配置项
-| 选项 | 默认值 | 描述 |
-| ---------------------- | ------------------------- | ------------------------------------------------------------ |
-| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
-| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
-| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
-| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
-| `ion_indicator` | `'ion'` | A format string used to represent ion. |
-| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
-| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
-| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
-| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
-| `nu_indicator` | `'nu'` | A format string used to represent nu. |
-| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
-| `format` | `'[$indicator]($style) '` | 组件格式化模板。 |
-| `style` | `'white bold'` | 此组件的样式。 |
-| `disabled` | `true` | Disables the `shell` module. |
+| 选项 | 默认值 | 描述 |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
+| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
+| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
+| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | A format string used to represent ion. |
+| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
+| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
+| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
+| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
+| `nu_indicator` | `'nu'` | A format string used to represent nu. |
+| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
+| `format` | `'[$indicator]($style) '` | 组件格式化模板。 |
+| `style` | `'white bold'` | 此组件的样式。 |
+| `disabled` | `true` | Disables the `shell` module. |
### 变量
@@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| 选项 | 默认值 | 描述 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 |
-| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `符号` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 |
+| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `符号` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `style` | `"bold blue"` | 此组件的样式。 |
+| `style` | `'bold blue'` | 此组件的样式。 |
| `disabled` | `false` | Disables this module. |
### 变量
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+By default, the module will be shown if any of the following conditions are met:
+
+- 当前目录包含一个 `template.typ` 文件
+- The current directory contains any `*.typ` file
+
+### 配置项
+
+| 选项 | 默认值 | 描述 |
+| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `符号` | `'t '` | A format string representing the symbol of Daml |
+| `style` | `'bold #0093A7'` | 此组件的样式。 |
+| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. |
+| `detect_files` | `['template.typ']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `disabled` | `false` | Disables the `daml` module. |
+
+### 变量
+
+| 字段 | 示例 | 描述 |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| 符号 | | `symbol`对应值 |
+| style\* | | `style`对应值 |
+
+*: 此变量只能作为样式字符串的一部分使用
+
## Username
`username` 组件显示当前活跃的用户名。 此组件将在符合以下任意条件时显示:
diff --git a/docs/zh-CN/faq/README.md b/docs/zh-CN/faq/README.md
index ece4a97e9..9d21b2225 100644
--- a/docs/zh-CN/faq/README.md
+++ b/docs/zh-CN/faq/README.md
@@ -120,3 +120,11 @@ Starship 的卸载过程与安装过程一样简单。
# 找到并且删除 Starship 二进制文件
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/zh-CN/guide/README.md b/docs/zh-CN/guide/README.md
index eeeeebc3d..b2b95546b 100644
--- a/docs/zh-CN/guide/README.md
+++ b/docs/zh-CN/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="在 Twitter 上关注 @Starshipmpt"
/>
+
@@ -119,7 +124,7 @@
>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
Android
@@ -224,11 +227,12 @@ curl -sS https://starship.rs/install.sh | sh
| _任意发行版_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| _任意发行版_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` |
-| Arch Linux | [Arch Linux Extra](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` |
+| Arch Linux | [Arch Linux 额外](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` |
| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship` `dnf install starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
+| openSUSE | [OSS](https://software.opensuse.org/package/starship) | `zypper in starship` |
| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
@@ -270,7 +274,7 @@ curl -sS https://starship.rs/install.sh | sh
-### 步骤 2. Set up your shell to use Starship
+### 步骤 2. 设置您的 shell 以使用 Starship
配置你的终端来初始化 starship。 请从下面列表选择你的终端:
@@ -341,10 +345,10 @@ mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
```
-然后将以下内容添加到您 Nushell 配置文件的末尾(使用 `$nu.config-path` 来获取它的路径):
+然后在您的 Nushell 配置文件的最后(使用 `$nu.config-path` 来获取它的路径),添加以下内容:
```sh
-use ~/.cache/starship/init.nu
+使用 ~/.cache/starship/init.nu
```
注意:仅支持 Nushell v0.78+
diff --git a/docs/zh-CN/presets/README.md b/docs/zh-CN/presets/README.md
index 6dd4b87d8..1bec89ef2 100644
--- a/docs/zh-CN/presets/README.md
+++ b/docs/zh-CN/presets/README.md
@@ -63,3 +63,9 @@ This preset does not show icons if the toolset is not found.
此预设受 [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme) 的启发。
[![Tokyo Night预设预览](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow)
diff --git a/docs/zh-CN/presets/gruvbox-rainbow.md b/docs/zh-CN/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..4701cd1ae
--- /dev/null
+++ b/docs/zh-CN/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[返回全部预设](./README.md#gruvbox-rainbow)
+
+# Gruvbox Rainbow Preset
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png)
+
+### 前置要求
+
+- 安装一种 [Nerd fonts](https://www.nerdfonts.com/) 并在您的终端启用。
+
+### 配置
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[点击下载 TOML 文件](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/zh-CN/presets/jetpack.md b/docs/zh-CN/presets/jetpack.md
new file mode 100644
index 000000000..27ba891e5
--- /dev/null
+++ b/docs/zh-CN/presets/jetpack.md
@@ -0,0 +1,24 @@
+[返回全部预设](./README.md#jetpack)
+
+# Jetpack Preset
+
+This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
+
+> Jetpack uses the terminal's color theme.
+
+![Screenshot of Jetpack preset](/presets/img/jetpack.png)
+
+### Prerequisite
+
+- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
+
+### 配置
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[点击下载 TOML 文件](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/docs/zh-TW/README.md b/docs/zh-TW/README.md
index 4b57ac590..3f72e0d48 100644
--- a/docs/zh-TW/README.md
+++ b/docs/zh-TW/README.md
@@ -179,7 +179,7 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化
#### 命令提示字元
- You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
+ 您需要在 Cmd 中使用 [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+)。 Add the following to a file `starship.lua` and place this file in Clink scripts directory:
```lua
-- starship.lua
diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md
index 6626d765f..7f0845e4a 100644
--- a/docs/zh-TW/config/README.md
+++ b/docs/zh-TW/config/README.md
@@ -206,6 +206,13 @@ detect_extensions = ['ts', '!video.ts', '!audio.ts']
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
+| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
+
+::: tip
+
+If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
+
+:::
### 範例
@@ -253,6 +260,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
+$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@@ -301,6 +309,7 @@ $scala\
$solidity\
$swift\
$terraform\
+$typst\
$vlang\
$vagrant\
$zig\
@@ -314,6 +323,7 @@ $aws\
$gcloud\
$openstack\
$azure\
+$direnv\
$env_var\
$crystal\
$custom\
@@ -351,6 +361,8 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
When using [saml2aws](https://github.com/Versent/saml2aws) the expiration information obtained from `~/.aws/credentials` falls back to the `x_security_token_expires` key.
+When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile is read from the `AWS_SSO_PROFILE` env var.
+
### 選項
| Option | 預設 | 說明 |
@@ -360,7 +372,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform
| `region_aliases` | `{}` | 除了AWS名稱外,顯示區域別名表 |
| `profile_aliases` | `{}` | Table of profile aliases to display in addition to the AWS name. |
| `style` | `'bold yellow'` | 這個模組的風格。 |
-| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
+| `expiration_symbol` | `'X'` | The symbol displayed when the temporary credentials have expired. |
| `disabled` | `false` | 停用 `AWS` 模組。 |
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
@@ -620,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu
### 選項
-| Option | 預設 | 說明 |
-| ------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
-| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `'C '` | The symbol used before displaying the compiler details |
-| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
-| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `commands` | [ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ] | How to detect what the compiler is |
-| `style` | `'bold 149'` | 這個模組的風格。 |
-| `disabled` | `false` | Disables the `c` module. |
+| Option | 預設 | 說明 |
+| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'C '` | The symbol used before displaying the compiler details |
+| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. |
+| `detect_files` | `[]` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is |
+| `style` | `'bold 149'` | 這個模組的風格。 |
+| `disabled` | `false` | Disables the `c` module. |
### Variables
@@ -1137,6 +1149,47 @@ truncation_length = 8
truncation_symbol = '…/'
```
+## Direnv
+
+The `direnv` module shows the status of the current rc file if one is present. The status includes the path to the rc file, whether it is loaded, and whether it has been allowed by `direnv`.
+
+### 選項
+
+| Option | 預設 | 說明 |
+| ------------------- | -------------------------------------- | ----------------------------------------------------- |
+| `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. |
+| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. |
+| `style` | `'bold orange'` | 這個模組的風格。 |
+| `disabled` | `true` | Disables the `direnv` module. |
+| `detect_extensions` | `[]` | Which extensions should trigger this module. |
+| `detect_files` | `['.envrc']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. |
+| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. |
+| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. |
+| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. |
+
+### Variables
+
+| 變數 | 範例 | 說明 |
+| --------- | ------------------- | --------------------------------------- |
+| loaded | `loaded` | Whether the current rc file is loaded. |
+| allowed | `denied` | Whether the current rc file is allowed. |
+| rc_path | `/home/test/.envrc` | The current rc file path. |
+| symbol | | Mirrors the value of option `symbol`. |
+| style\* | `red bold` | Mirrors the value of option `style`. |
+
+*: This variable can only be used as a part of a style string
+
+### 範例
+
+```toml
+# ~/.config/starship.toml
+
+[direnv]
+disabled = false
+```
+
## 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` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
@@ -1435,7 +1488,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🧅 '` | The symbol used before displaying the version of fennel. |
| `style` | `'bold green'` | 這個模組的風格。 |
-| `detect_extensions` | `[fnl]` | Which extensions should trigger this module. |
+| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `disabled` | `false` | Disables the `fennel` module. |
@@ -1524,11 +1577,46 @@ truncation_length = 4
truncation_symbol = ''
```
+## Fossil Metrics
+
+The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
+
+### 選項
+
+| Option | 預設 | 說明 |
+| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
+| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
+| `added_style` | `'bold green'` | The style for the added count. |
+| `deleted_style` | `'bold red'` | The style for the deleted count. |
+| `only_nonzero_diffs` | `true` | Render status only for changed items. |
+| `disabled` | `true` | Disables the `fossil_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
+
+[fossil_metrics]
+added_style = 'bold blue'
+format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
+```
+
## Google Cloud (`gcloud`)
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var.
-When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active be active when one of the environment variables has been set.
+When the module is enabled it will always be active, unless `detect_env_vars` has been set in which case the module will only be active when one of the environment variables has been set.
### 選項
@@ -1931,8 +2019,8 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel
| Option | 預設 | 說明 |
| ---------- | -------------------------- | ------------------------------------------------------ |
| `format` | `'via [$symbol]($style) '` | The format for the module. |
-| `symbol` | `"🐃 "` | A format string representing the symbol of guix-shell. |
-| `style` | `"yellow bold"` | 這個模組的風格。 |
+| `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. |
+| `style` | `'yellow bold'` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `guix_shell` module. |
### Variables
@@ -1969,13 +2057,13 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c
| Option | 預設 | 說明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"🅶 "` | A format string representing the symbol of Gradle. |
-| `detect_extensions` | `["gradle", "gradle.kts"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'🅶 '` | A format string representing the symbol of Gradle. |
+| `detect_extensions` | `['gradle', 'gradle.kts']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
-| `detect_folders` | `["gradle"]` | Which folders should trigger this module. |
-| `style` | `"bold bright-cyan"` | 這個模組的風格。 |
+| `detect_folders` | `['gradle']` | Which folders should trigger this module. |
+| `style` | `'bold bright-cyan'` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `gradle` module. |
| `recursive` | `false` | Enables recursive finding for the `gradle` directory. |
@@ -2034,13 +2122,13 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
| Option | 預設 | 說明 |
| ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `detect_extensions` | `["hx", "hxml"]` | Which extensions should trigger this module. |
-| `detect_files` | `["project.xml", "Project.xml", "application.xml", "haxelib.json", "hxformat.json", ".haxerc"]` | Which filenames should trigger this module. |
-| `detect_folders` | `[".haxelib", "haxe_libraries"]` | Which folders should trigger this modules. |
-| `symbol` | `"⌘ "` | A format string representing the symbol of Helm. |
-| `style` | `"bold fg:202"` | 這個模組的風格。 |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
+| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
+| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
+| `symbol` | `'⌘ '` | A format string representing the symbol of Helm. |
+| `style` | `'bold fg:202'` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `haxe` module. |
### Variables
@@ -2107,14 +2195,15 @@ format = 'via [⎈ $version](bold white) '
### 選項
-| Option | 預設 | 說明 |
-| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------- |
-| `ssh_only` | `true` | 只在連接到一個 SSH session 時顯示主機名稱。 |
-| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
-| `trim_at` | `'.'` | 擷取出主機名稱的斷點,以第一個符合的為準。 `'.'` will stop after the first dot. `''` will disable any truncation |
-| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. |
-| `style` | `'bold dimmed green'` | 這個模組的風格。 |
-| `disabled` | `false` | 停用 `hostname` 模組。 |
+| Option | 預設 | 說明 |
+| ----------------- | -------------------------------------- | -------------------------------------------------------------------------------------------- |
+| `ssh_only` | `true` | 只在連接到一個 SSH session 時顯示主機名稱。 |
+| `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. |
+| `trim_at` | `'.'` | 擷取出主機名稱的斷點,以第一個符合的為準。 `'.'` will stop after the first dot. `''` will disable any truncation. |
+| `detect_env_vars` | `[]` | Which environment variable(s) should trigger this module. |
+| `format` | `'[$ssh_symbol$hostname]($style) in '` | The format for the module. |
+| `style` | `'bold dimmed green'` | 這個模組的風格。 |
+| `disabled` | `false` | 停用 `hostname` 模組。 |
### Variables
@@ -2126,7 +2215,9 @@ format = 'via [⎈ $version](bold white) '
*: This variable can only be used as a part of a style string
-### 範例
+### Examples
+
+#### Always show the hostname
```toml
# ~/.config/starship.toml
@@ -2138,6 +2229,17 @@ trim_at = '.companyname.com'
disabled = false
```
+#### Hide the hostname in remote tmux sessions
+
+```toml
+# ~/.config/starship.toml
+
+[hostname]
+ssh_only = false
+detect_env_vars = ['!TMUX', 'SSH_CONNECTION']
+disabled = false
+```
+
## Java
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
@@ -2323,7 +2425,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes
-Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
+Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
::: tip
@@ -2335,18 +2437,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### 選項
+::: warning
+
+The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
+
+:::
+
| Option | 預設 | 說明 |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `'cyan bold'` | 這個模組的風格。 |
-| `context_aliases` | `{}` | Table of context aliases to display. |
-| `user_aliases` | `{}` | Table of user aliases to display. |
+| `context_aliases`* | `{}` | Table of context aliases to display. |
+| `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
+| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. |
+*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
+
+To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
+
+| 變數 | 說明 |
+| ----------------- | ---------------------------------------------------------------------------------------- |
+| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
+| `user_pattern` | Regular expression to match current Kubernetes user name. |
+| `context_alias` | Context alias to display instead of the full context name. |
+| `user_alias` | User alias to display instead of the full user name. |
+| `style` | The style for the module when using this context. If not set, will use module's style. |
+| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. |
+
+Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
+
### Variables
| 變數 | 範例 | 說明 |
@@ -2368,13 +2492,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false
-[kubernetes.context_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'.*/openshift-cluster/.*' = 'openshift'
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
-[kubernetes.user_aliases]
-'dev.local.cluster.k8s' = 'dev'
-'root/.*' = 'root'
+contexts = [
+ { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
+]
```
Only show the module in directories that contain a `k8s` file.
@@ -2387,25 +2507,36 @@ disabled = false
detect_files = ['k8s']
```
-#### Regex Matching
+#### Kubernetes Context specific config
-Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions.
-
-The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
-
-Long and automatically generated cluster names can be identified and shortened using regular expressions:
+The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
```toml
-[kubernetes.context_aliases]
-# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
-'.*/openshift-cluster/.*' = 'openshift'
-# Or better, to rename every OpenShift cluster at once:
-'.*/(?P[\w-]+)/.*' = '$var_cluster'
+# ~/.config/starship.toml
+[[kubernetes.contexts]]
+# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
+# equals "admin_user"
+context_pattern = "production"
+user_pattern = "admin_user"
+style = "bold red"
+context_alias = "prod"
+user_alias = "admin"
+
+[[kubernetes.contexts]]
+# "green" style + a different symbol when Kubernetes current context name contains openshift
+context_pattern = ".*openshift.*"
+style = "green"
+symbol = "💔 "
+context_alias = "openshift"
+
+[[kubernetes.contexts]]
+# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
-'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster'
+context_pattern = "gke_.*_(?P[\\w-]+)"
+context_alias = "gke-$cluster"
```
## 換行
@@ -2730,7 +2861,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| `detect_folders` | `['node_modules']` | Which folders should trigger this module. |
| `style` | `'bold green'` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `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. |
+| `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
@@ -2890,8 +3021,8 @@ The [os_info](https://lib.rs/crates/os_info) crate used by this module is known
| Option | 預設 | 說明 |
| ---------- | --------------------- | ------------------------------------------------------ |
-| `format` | `"[$symbol]($style)"` | The format for the module. |
-| `style` | `"bold white"` | 這個模組的風格。 |
+| `format` | `'[$symbol]($style)'` | The format for the module. |
+| `style` | `'bold white'` | 這個模組的風格。 |
| `disabled` | `true` | Disables the `os` module. |
| `symbols` | | A table that maps each operating system to its symbol. |
@@ -3245,7 +3376,7 @@ By default the module will be shown if any of the following conditions are met:
| `symbol` | `'🐍 '` | A format string representing the symbol of Python |
| `style` | `'yellow bold'` | 這個模組的風格。 |
| `pyenv_version_name` | `false` | 使用 pyenv 取得 Python 的版本。 |
-| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used |
+| `pyenv_prefix` | `'pyenv'` | Prefix before pyenv version display, only used if pyenv is used |
| `python_binary` | `['python', 'python3', 'python2']` | Configures the python binaries that Starship should executes when getting the version. |
| `detect_extensions` | `['py']` | Which extensions should trigger this module |
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
@@ -3562,22 +3693,23 @@ The `shell` module shows an indicator for currently used shell.
### 選項
-| Option | 預設 | 說明 |
-| ---------------------- | ------------------------- | ------------------------------------------------------------ |
-| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
-| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
-| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
-| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
-| `ion_indicator` | `'ion'` | A format string used to represent ion. |
-| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
-| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
-| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
-| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
-| `nu_indicator` | `'nu'` | A format string used to represent nu. |
-| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
-| `format` | `'[$indicator]($style) '` | The format for the module. |
-| `style` | `'white bold'` | 這個模組的風格。 |
-| `disabled` | `true` | Disables the `shell` module. |
+| Option | 預設 | 說明 |
+| ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
+| `bash_indicator` | `'bsh'` | A format string used to represent bash. |
+| `fish_indicator` | `'fsh'` | A format string used to represent fish. |
+| `zsh_indicator` | `'zsh'` | A format string used to represent zsh. |
+| `powershell_indicator` | `'psh'` | A format string used to represent powershell. |
+| `pwsh_indicator` | | A format string used to represent pwsh. The default value mirrors the value of `powershell_indicator`. |
+| `ion_indicator` | `'ion'` | A format string used to represent ion. |
+| `elvish_indicator` | `'esh'` | A format string used to represent elvish. |
+| `tcsh_indicator` | `'tsh'` | A format string used to represent tcsh. |
+| `xonsh_indicator` | `'xsh'` | A format string used to represent xonsh. |
+| `cmd_indicator` | `'cmd'` | A format string used to represent cmd. |
+| `nu_indicator` | `'nu'` | A format string used to represent nu. |
+| `unknown_indicator` | `''` | The default value to be displayed when the shell is unknown. |
+| `format` | `'[$indicator]($style) '` | The format for the module. |
+| `style` | `'white bold'` | 這個模組的風格。 |
+| `disabled` | `true` | Disables the `shell` module. |
### Variables
@@ -3694,14 +3826,14 @@ The `solidity` module shows the currently installed version of [Solidity](https:
| Option | 預設 | 說明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
-| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
-| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
-| `symbol` | `"S "` | A format string representing the symbol of Solidity |
-| `compiler | ["solc"] | The default compiler for Solidity. |
-| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'S '` | A format string representing the symbol of Solidity |
+| `compiler | ['solc'] | The default compiler for Solidity. |
+| `detect_extensions` | `['sol']` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
-| `style` | `"bold blue"` | 這個模組的風格。 |
+| `style` | `'bold blue'` | 這個模組的風格。 |
| `disabled` | `false` | Disables this module. |
### Variables
@@ -4009,6 +4141,39 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
+## Typst
+
+The `typst` module shows the current installed version of Typst used in a project.
+
+By default, the module will be shown if any of the following conditions are met:
+
+- 目前資料夾中有一個 `template.typ` 檔案
+- The current directory contains any `*.typ` file
+
+### 選項
+
+| Option | 預設 | 說明 |
+| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
+| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
+| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
+| `symbol` | `'t '` | A format string representing the symbol of Daml |
+| `style` | `'bold #0093A7'` | 這個模組的風格。 |
+| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. |
+| `detect_files` | `['template.typ']` | Which filenames should trigger this module. |
+| `detect_folders` | `[]` | Which folders should trigger this module. |
+| `disabled` | `false` | Disables the `daml` module. |
+
+### Variables
+
+| 變數 | 範例 | 說明 |
+| ------------- | --------- | ----------------------------------------------- |
+| version | `v0.9.0` | The version of `typst`, alias for typst_version |
+| typst_version | `default` | The current Typst version |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
+
+*: This variable can only be used as a part of a style string
+
## 使用者名稱
`username` 模組顯示現在使用中的使用者名稱。 這個模組將在下列其中一個條件滿足時顯示:
diff --git a/docs/zh-TW/faq/README.md b/docs/zh-TW/faq/README.md
index 372f6d5ba..f19960c72 100644
--- a/docs/zh-TW/faq/README.md
+++ b/docs/zh-TW/faq/README.md
@@ -120,3 +120,11 @@ echo -e "\xee\x82\xa0"
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```
+
+## How do I install Starship without `sudo`?
+
+The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
+
+For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
+
+When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
diff --git a/docs/zh-TW/guide/README.md b/docs/zh-TW/guide/README.md
index c93a1f460..f17404c24 100644
--- a/docs/zh-TW/guide/README.md
+++ b/docs/zh-TW/guide/README.md
@@ -32,6 +32,11 @@
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="在推特上追蹤 @StarshipPrompt"
/>
+
@@ -79,7 +84,7 @@
>
-[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
-
@@ -270,7 +274,7 @@ Install Starship using any of the following package managers:
-### 第二步 Set up your shell to use Starship
+### 第二步 設定您的 shell 以啟用 Starship
設定您的 shell 以啟用 Starship。 請從下列選單選取您的 shell:
@@ -288,7 +292,7 @@ eval "$(starship init bash)"
命令提示字元
-You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
+您需要在 Cmd 中使用 [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+)。 在此路徑 `%LocalAppData%\clink\starship.lua` 建立一個檔案,並填入以下內容:
```lua
load(io.popen('starship init cmd'):read("*a"))()
@@ -305,7 +309,7 @@ load(io.popen('starship init cmd'):read("*a"))()
eval (starship init elvish)
```
-Note: Only Elvish v0.18+ is supported
+注意:只支援 Elvish v0.18+ 以上的版本
@@ -376,7 +380,7 @@ eval `starship init tcsh`
Xonsh
-將以下內容放到 `~/.xonshrc` 的結尾:
+將以下內容加到 `~/.xonshrc` 的結尾:
```python
execx($(starship init xonsh))
@@ -423,13 +427,13 @@ eval "$(starship init zsh)"
- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.
-## ❤️ Sponsors
+## ❤️ 贊助我們
-Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website.
+你可以[成爲一個贊助者](https://github.com/sponsors/starship)來支持這個專案! 你的名字和頭像會在這裏顯示,並且會帶有一個前往你網站的鏈接。
-**Supporter Tier**
+**贊助者等級**
-- [Appwrite](https://appwrite.io/)
+- [後端](https://appwrite.io/)
diff --git a/docs/zh-TW/presets/README.md b/docs/zh-TW/presets/README.md
index 7bc035a34..0e6678b39 100644
--- a/docs/zh-TW/presets/README.md
+++ b/docs/zh-TW/presets/README.md
@@ -63,3 +63,9 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
[![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png "Click to view Tokyo Night preset")](./tokyo-night)
+
+## [Gruvbox Rainbow](./gruvbox-rainbow.md)
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow)
diff --git a/docs/zh-TW/presets/gruvbox-rainbow.md b/docs/zh-TW/presets/gruvbox-rainbow.md
new file mode 100644
index 000000000..d1f3c343b
--- /dev/null
+++ b/docs/zh-TW/presets/gruvbox-rainbow.md
@@ -0,0 +1,21 @@
+[Return to Presets](./README.md#gruvbox-rainbow)
+
+# Gruvbox Rainbow Preset
+
+This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
+
+![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png)
+
+### 先決要求
+
+- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal
+
+### 設定
+
+```sh
+starship preset gruvbox-rainbow -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/gruvbox-rainbow.toml)
+
+<<< @/.vuepress/public/presets/toml/gruvbox-rainbow.toml
diff --git a/docs/zh-TW/presets/jetpack.md b/docs/zh-TW/presets/jetpack.md
new file mode 100644
index 000000000..0d85a56bb
--- /dev/null
+++ b/docs/zh-TW/presets/jetpack.md
@@ -0,0 +1,24 @@
+[Return to Presets](./README.md#jetpack)
+
+# Jetpack Preset
+
+This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
+
+> Jetpack uses the terminal's color theme.
+
+![Screenshot of Jetpack preset](/presets/img/jetpack.png)
+
+### Prerequisite
+
+- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
+- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
+
+### 設定
+
+```sh
+starship preset jetpack -o ~/.config/starship.toml
+```
+
+[Click to download TOML](/presets/toml/jetpack.toml)
+
+<<< @/.vuepress/public/presets/toml/jetpack.toml
diff --git a/release-please-config.json b/release-please-config.json
new file mode 100644
index 000000000..0a580e7ec
--- /dev/null
+++ b/release-please-config.json
@@ -0,0 +1,4 @@
+{
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
+ "draft": true
+}
diff --git a/src/configs/aws.rs b/src/configs/aws.rs
index 92e981d4d..22be05422 100644
--- a/src/configs/aws.rs
+++ b/src/configs/aws.rs
@@ -27,6 +27,9 @@ use std::collections::HashMap;
/// When using [`AWSume`](https://awsu.me) the profile
/// is read from the `AWSUME_PROFILE` env var and the credentials expiration
/// date is read from the `AWSUME_EXPIRATION` env var.
+///
+/// When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile
+/// is read from the `AWS_SSO_PROFILE` env var.
pub struct AwsConfig<'a> {
/// The format for the module.
pub format: &'a str,
diff --git a/src/configs/direnv.rs b/src/configs/direnv.rs
new file mode 100755
index 000000000..5ca1e1853
--- /dev/null
+++ b/src/configs/direnv.rs
@@ -0,0 +1,42 @@
+use serde::{Deserialize, Serialize};
+
+#[derive(Clone, Deserialize, Serialize)]
+#[cfg_attr(
+ feature = "config-schema",
+ derive(schemars::JsonSchema),
+ schemars(deny_unknown_fields)
+)]
+#[serde(default)]
+pub struct DirenvConfig<'a> {
+ pub format: &'a str,
+ pub symbol: &'a str,
+ pub style: &'a str,
+ pub disabled: bool,
+ pub detect_extensions: Vec<&'a str>,
+ pub detect_files: Vec<&'a str>,
+ pub detect_folders: Vec<&'a str>,
+ pub allowed_msg: &'a str,
+ pub not_allowed_msg: &'a str,
+ pub denied_msg: &'a str,
+ pub loaded_msg: &'a str,
+ pub unloaded_msg: &'a str,
+}
+
+impl<'a> Default for DirenvConfig<'a> {
+ fn default() -> Self {
+ Self {
+ format: "[$symbol$loaded/$allowed]($style) ",
+ symbol: "direnv ",
+ style: "bold orange",
+ disabled: true,
+ detect_extensions: vec![],
+ detect_files: vec![".envrc"],
+ detect_folders: vec![],
+ allowed_msg: "allowed",
+ not_allowed_msg: "not allowed",
+ denied_msg: "denied",
+ loaded_msg: "loaded",
+ unloaded_msg: "not loaded",
+ }
+ }
+}
diff --git a/src/configs/mod.rs b/src/configs/mod.rs
index aeb8193fd..c2cf0a8d9 100644
--- a/src/configs/mod.rs
+++ b/src/configs/mod.rs
@@ -19,6 +19,7 @@ pub mod daml;
pub mod dart;
pub mod deno;
pub mod directory;
+pub mod direnv;
pub mod docker_context;
pub mod dotnet;
pub mod elixir;
@@ -84,6 +85,7 @@ pub mod sudo;
pub mod swift;
pub mod terraform;
pub mod time;
+pub mod typst;
pub mod username;
pub mod v;
pub mod vagrant;
@@ -142,6 +144,8 @@ pub struct FullConfig<'a> {
#[serde(borrow)]
directory: directory::DirectoryConfig<'a>,
#[serde(borrow)]
+ direnv: direnv::DirenvConfig<'a>,
+ #[serde(borrow)]
docker_context: docker_context::DockerContextConfig<'a>,
#[serde(borrow)]
dotnet: dotnet::DotnetConfig<'a>,
@@ -269,6 +273,8 @@ pub struct FullConfig<'a> {
#[serde(borrow)]
time: time::TimeConfig<'a>,
#[serde(borrow)]
+ typst: typst::TypstConfig<'a>,
+ #[serde(borrow)]
username: username::UsernameConfig<'a>,
#[serde(borrow)]
vagrant: vagrant::VagrantConfig<'a>,
diff --git a/src/configs/rlang.rs b/src/configs/rlang.rs
index 3982b723d..c759f570f 100644
--- a/src/configs/rlang.rs
+++ b/src/configs/rlang.rs
@@ -27,7 +27,7 @@ impl<'a> Default for RLangConfig<'a> {
symbol: "📐 ",
disabled: false,
detect_extensions: vec!["R", "Rd", "Rmd", "Rproj", "Rsx"],
- detect_files: vec![".Rprofile"],
+ detect_files: vec!["DESCRIPTION"],
detect_folders: vec![".Rproj.user"],
}
}
diff --git a/src/configs/shell.rs b/src/configs/shell.rs
index 540ea8e32..9d0bd3aa0 100644
--- a/src/configs/shell.rs
+++ b/src/configs/shell.rs
@@ -13,6 +13,8 @@ pub struct ShellConfig<'a> {
pub fish_indicator: &'a str,
pub zsh_indicator: &'a str,
pub powershell_indicator: &'a str,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub pwsh_indicator: Option<&'a str>,
pub ion_indicator: &'a str,
pub elvish_indicator: &'a str,
pub tcsh_indicator: &'a str,
@@ -32,6 +34,7 @@ impl<'a> Default for ShellConfig<'a> {
fish_indicator: "fsh",
zsh_indicator: "zsh",
powershell_indicator: "psh",
+ pwsh_indicator: None,
ion_indicator: "ion",
elvish_indicator: "esh",
tcsh_indicator: "tsh",
diff --git a/src/configs/starship_root.rs b/src/configs/starship_root.rs
index aa3d65f9f..86fe7e754 100644
--- a/src/configs/starship_root.rs
+++ b/src/configs/starship_root.rs
@@ -18,6 +18,7 @@ pub struct StarshipRootConfig {
pub scan_timeout: u64,
pub command_timeout: u64,
pub add_newline: bool,
+ pub follow_symlinks: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub palette: Option,
pub palettes: HashMap,
@@ -90,6 +91,7 @@ pub const PROMPT_ORDER: &[&str] = &[
"solidity",
"swift",
"terraform",
+ "typst",
"vlang",
"vagrant",
"zig",
@@ -105,6 +107,7 @@ pub const PROMPT_ORDER: &[&str] = &[
"gcloud",
"openstack",
"azure",
+ "direnv",
"env_var",
"crystal",
"custom",
@@ -134,6 +137,7 @@ impl Default for StarshipRootConfig {
scan_timeout: 30,
command_timeout: 500,
add_newline: true,
+ follow_symlinks: true,
palette: None,
palettes: HashMap::default(),
}
diff --git a/src/configs/typst.rs b/src/configs/typst.rs
new file mode 100644
index 000000000..28f4fc62b
--- /dev/null
+++ b/src/configs/typst.rs
@@ -0,0 +1,34 @@
+use serde::{Deserialize, Serialize};
+
+#[derive(Clone, Deserialize, Serialize)]
+#[cfg_attr(
+ feature = "config-schema",
+ derive(schemars::JsonSchema),
+ schemars(deny_unknown_fields)
+)]
+#[serde(default)]
+pub struct TypstConfig<'a> {
+ pub format: &'a str,
+ pub version_format: &'a str,
+ pub symbol: &'a str,
+ pub style: &'a str,
+ pub disabled: bool,
+ pub detect_extensions: Vec<&'a str>,
+ pub detect_files: Vec<&'a str>,
+ pub detect_folders: Vec<&'a str>,
+}
+
+impl<'a> Default for TypstConfig<'a> {
+ fn default() -> Self {
+ TypstConfig {
+ format: "via [$symbol($version )]($style)",
+ version_format: "v${raw}",
+ symbol: "t ",
+ style: "bold #0093A7",
+ disabled: false,
+ detect_extensions: vec!["typ"],
+ detect_files: vec!["template.typ"],
+ detect_folders: vec![],
+ }
+ }
+}
diff --git a/src/configure.rs b/src/configure.rs
index ec23cf799..9ce0be34a 100644
--- a/src/configure.rs
+++ b/src/configure.rs
@@ -1,3 +1,4 @@
+use std::fmt::Write as _;
use std::process;
use std::process::Stdio;
use std::str::FromStr;
@@ -96,8 +97,10 @@ pub fn print_configuration(context: &Context, use_default: bool, paths: &[String
"# $all is shorthand for {}",
PROMPT_ORDER
.iter()
- .map(|module_name| format!("${module_name}"))
- .collect::()
+ .fold(String::new(), |mut output, module_name| {
+ let _ = write!(output, "${module_name}");
+ output
+ })
);
// Unwrapping is fine because config is based on FullConfig
@@ -105,10 +108,10 @@ pub fn print_configuration(context: &Context, use_default: bool, paths: &[String
if !use_default && !custom_modules.is_empty() {
println!(
"# $custom (excluding any modules already listed in `format`) is shorthand for {}",
- custom_modules
- .keys()
- .map(|module_name| format!("${{custom.{module_name}}}"))
- .collect::()
+ custom_modules.keys().fold(String::new(), |mut output, b| {
+ let _ = write!(output, "${{custom.{b}}}");
+ output
+ })
);
}
}
diff --git a/src/context.rs b/src/context.rs
index a07530093..4a651908f 100644
--- a/src/context.rs
+++ b/src/context.rs
@@ -8,6 +8,7 @@ use crate::modules;
use crate::utils;
use clap::Parser;
use gix::{
+ repository::Kind,
sec::{self as git_sec, trust::DefaultForLevel},
state as git_state, Repository, ThreadSafeRepository,
};
@@ -243,7 +244,7 @@ impl<'a> Context<'a> {
.any(|env_var| self.get_env(env_var).is_some())
}
- /// Returns true if 'detect_env_vars' is empty,
+ /// Returns true if `detect_env_vars` is empty,
/// or if at least one environment variable is set and no negated environment variable is set
pub fn detect_env_vars(&'a self, env_vars: &'a [&'a str]) -> bool {
if env_vars.is_empty() {
@@ -318,7 +319,10 @@ impl<'a> Context<'a> {
let shared_repo =
match ThreadSafeRepository::discover_with_environment_overrides_opts(
&self.current_dir,
- Default::default(),
+ gix::discover::upwards::Options {
+ match_ceiling_dir_or_error: false,
+ ..Default::default()
+ },
git_open_opts_map,
) {
Ok(repo) => repo,
@@ -335,7 +339,10 @@ impl<'a> Context<'a> {
);
let branch = get_current_branch(&repository);
- let remote = get_remote_repository_info(&repository, branch.as_deref());
+ let remote = get_remote_repository_info(
+ &repository,
+ branch.as_ref().map(|name| name.as_ref()),
+ );
let path = repository.path().to_path_buf();
let fs_monitor_value_is_true = repository
@@ -345,12 +352,13 @@ impl<'a> Context<'a> {
Ok(Repo {
repo: shared_repo,
- branch,
+ branch: branch.map(|b| b.shorten().to_string()),
workdir: repository.work_dir().map(PathBuf::from),
path,
state: repository.state(),
remote,
fs_monitor_value_is_true,
+ kind: repository.kind(),
})
})
}
@@ -358,7 +366,11 @@ impl<'a> Context<'a> {
pub fn dir_contents(&self) -> Result<&DirContents, std::io::Error> {
self.dir_contents.get_or_try_init(|| {
let timeout = self.root_config.scan_timeout;
- DirContents::from_path_with_timeout(&self.current_dir, Duration::from_millis(timeout))
+ DirContents::from_path_with_timeout(
+ &self.current_dir,
+ Duration::from_millis(timeout),
+ self.root_config.follow_symlinks,
+ )
})
}
@@ -368,7 +380,8 @@ impl<'a> Context<'a> {
"bash" => Shell::Bash,
"fish" => Shell::Fish,
"ion" => Shell::Ion,
- "powershell" | "pwsh" => Shell::PowerShell,
+ "pwsh" => Shell::Pwsh,
+ "powershell" => Shell::PowerShell,
"zsh" => Shell::Zsh,
"elvish" => Shell::Elvish,
"tcsh" => Shell::Tcsh,
@@ -479,11 +492,15 @@ pub struct DirContents {
impl DirContents {
#[cfg(test)]
- fn from_path(base: &Path) -> Result {
- Self::from_path_with_timeout(base, Duration::from_secs(30))
+ fn from_path(base: &Path, follow_symlinks: bool) -> Result {
+ Self::from_path_with_timeout(base, Duration::from_secs(30), follow_symlinks)
}
- fn from_path_with_timeout(base: &Path, timeout: Duration) -> Result {
+ fn from_path_with_timeout(
+ base: &Path,
+ timeout: Duration,
+ follow_symlinks: bool,
+ ) -> Result {
let start = Instant::now();
let mut folders: HashSet = HashSet::new();
@@ -501,7 +518,15 @@ impl DirContents {
.filter_map(|(_, entry)| entry.ok())
.for_each(|entry| {
let path = PathBuf::from(entry.path().strip_prefix(base).unwrap());
- if entry.path().is_dir() {
+
+ let is_dir = match follow_symlinks {
+ true => entry.path().is_dir(),
+ false => fs::symlink_metadata(entry.path())
+ .map(|m| m.is_dir())
+ .unwrap_or(false),
+ };
+
+ if is_dir {
folders.insert(path);
} else {
if !path.to_string_lossy().starts_with('.') {
@@ -605,7 +630,8 @@ pub struct Repo {
pub repo: ThreadSafeRepository,
/// If `current_dir` is a git repository or is contained within one,
- /// this is the current branch name of that repo.
+ /// this is the short name of the current branch name of that repo,
+ /// i.e. `main`.
pub branch: Option,
/// If `current_dir` is a git repository or is contained within one,
@@ -624,6 +650,9 @@ pub struct Repo {
/// Contains `true` if the value of `core.fsmonitor` is set to `true`.
/// If not `true`, `fsmonitor` is explicitly disabled in git commands.
fs_monitor_value_is_true: bool,
+
+ // Kind of repository, work tree or bare
+ pub kind: Kind,
}
impl Repo {
@@ -766,24 +795,21 @@ impl<'a> ScanAncestors<'a> {
}
}
-fn get_current_branch(repository: &Repository) -> Option {
- let name = repository.head_name().ok()??;
- let shorthand = name.shorten();
-
- Some(shorthand.to_string())
+fn get_current_branch(repository: &Repository) -> Option {
+ repository.head_name().ok()?
}
fn get_remote_repository_info(
repository: &Repository,
- branch_name: Option<&str>,
+ branch_name: Option<&gix::refs::FullNameRef>,
) -> Option {
let branch_name = branch_name?;
let branch = repository
- .branch_remote_ref(branch_name)
+ .branch_remote_ref_name(branch_name, gix::remote::Direction::Fetch)
.and_then(std::result::Result::ok)
.map(|r| r.shorten().to_string());
let name = repository
- .branch_remote_name(branch_name)
+ .branch_remote_name(branch_name.shorten(), gix::remote::Direction::Fetch)
.map(|n| n.as_bstr().to_string());
Some(Remote { branch, name })
@@ -794,6 +820,7 @@ pub enum Shell {
Bash,
Fish,
Ion,
+ Pwsh,
PowerShell,
Zsh,
Elvish,
@@ -897,10 +924,63 @@ mod tests {
Ok(dir)
}
+ #[test]
+ fn test_scan_dir_no_symlinks() -> Result<(), Box> {
+ #[cfg(not(target_os = "windows"))]
+ use std::os::unix::fs::symlink;
+ #[cfg(target_os = "windows")]
+ use std::os::windows::fs::symlink_dir as symlink;
+
+ let d = testdir(&["file"])?;
+ fs::create_dir(d.path().join("folder"))?;
+
+ symlink(d.path().join("folder"), d.path().join("link_to_folder"))?;
+ symlink(d.path().join("file"), d.path().join("link_to_file"))?;
+
+ let dc_following_symlinks = DirContents::from_path(d.path(), true)?;
+
+ assert!(ScanDir {
+ dir_contents: &dc_following_symlinks,
+ files: &["link_to_file"],
+ extensions: &[],
+ folders: &[],
+ }
+ .is_match());
+
+ assert!(ScanDir {
+ dir_contents: &dc_following_symlinks,
+ files: &[],
+ extensions: &[],
+ folders: &["link_to_folder"],
+ }
+ .is_match());
+
+ let dc_not_following_symlinks = DirContents::from_path(d.path(), false)?;
+
+ assert!(ScanDir {
+ dir_contents: &dc_not_following_symlinks,
+ files: &["link_to_file"],
+ extensions: &[],
+ folders: &[],
+ }
+ .is_match());
+
+ assert!(!ScanDir {
+ dir_contents: &dc_not_following_symlinks,
+ files: &[],
+ extensions: &[],
+ folders: &["link_to_folder"],
+ }
+ .is_match());
+
+ Ok(())
+ }
+
#[test]
fn test_scan_dir() -> Result<(), Box> {
let empty = testdir(&[])?;
- let empty_dc = DirContents::from_path(empty.path())?;
+ let follow_symlinks = true;
+ let empty_dc = DirContents::from_path(empty.path(), follow_symlinks)?;
assert!(!ScanDir {
dir_contents: &empty_dc,
@@ -912,7 +992,7 @@ mod tests {
empty.close()?;
let rust = testdir(&["README.md", "Cargo.toml", "src/main.rs"])?;
- let rust_dc = DirContents::from_path(rust.path())?;
+ let rust_dc = DirContents::from_path(rust.path(), follow_symlinks)?;
assert!(!ScanDir {
dir_contents: &rust_dc,
files: &["package.json"],
@@ -923,7 +1003,7 @@ mod tests {
rust.close()?;
let java = testdir(&["README.md", "src/com/test/Main.java", "pom.xml"])?;
- let java_dc = DirContents::from_path(java.path())?;
+ let java_dc = DirContents::from_path(java.path(), follow_symlinks)?;
assert!(!ScanDir {
dir_contents: &java_dc,
files: &["package.json"],
@@ -934,7 +1014,7 @@ mod tests {
java.close()?;
let node = testdir(&["README.md", "node_modules/lodash/main.js", "package.json"])?;
- let node_dc = DirContents::from_path(node.path())?;
+ let node_dc = DirContents::from_path(node.path(), follow_symlinks)?;
assert!(ScanDir {
dir_contents: &node_dc,
files: &["package.json"],
@@ -945,7 +1025,7 @@ mod tests {
node.close()?;
let tarballs = testdir(&["foo.tgz", "foo.tar.gz"])?;
- let tarballs_dc = DirContents::from_path(tarballs.path())?;
+ let tarballs_dc = DirContents::from_path(tarballs.path(), follow_symlinks)?;
assert!(ScanDir {
dir_contents: &tarballs_dc,
files: &[],
@@ -956,7 +1036,7 @@ mod tests {
tarballs.close()?;
let dont_match_ext = testdir(&["foo.js", "foo.ts"])?;
- let dont_match_ext_dc = DirContents::from_path(dont_match_ext.path())?;
+ let dont_match_ext_dc = DirContents::from_path(dont_match_ext.path(), follow_symlinks)?;
assert!(!ScanDir {
dir_contents: &dont_match_ext_dc,
files: &[],
@@ -967,7 +1047,7 @@ mod tests {
dont_match_ext.close()?;
let dont_match_file = testdir(&["goodfile", "evilfile"])?;
- let dont_match_file_dc = DirContents::from_path(dont_match_file.path())?;
+ let dont_match_file_dc = DirContents::from_path(dont_match_file.path(), follow_symlinks)?;
assert!(!ScanDir {
dir_contents: &dont_match_file_dc,
files: &["goodfile", "!notfound", "!evilfile"],
@@ -978,7 +1058,8 @@ mod tests {
dont_match_file.close()?;
let dont_match_folder = testdir(&["gooddir/somefile", "evildir/somefile"])?;
- let dont_match_folder_dc = DirContents::from_path(dont_match_folder.path())?;
+ let dont_match_folder_dc =
+ DirContents::from_path(dont_match_folder.path(), follow_symlinks)?;
assert!(!ScanDir {
dir_contents: &dont_match_folder_dc,
files: &[],
diff --git a/src/init/starship.zsh b/src/init/starship.zsh
index 01229be5b..2ca01052b 100644
--- a/src/init/starship.zsh
+++ b/src/init/starship.zsh
@@ -23,23 +23,22 @@ else
}
fi
-
# The two functions below follow the naming convention `prompt__`
# for compatibility with Zsh's prompt system. See
# https://github.com/zsh-users/zsh/blob/2876c25a28b8052d6683027998cc118fc9b50157/Functions/Prompts/promptinit#L155
# Runs before each new command line.
prompt_starship_precmd() {
- # Save the status, because commands in this pipeline will change $?
+ # Save the status, because subsequent commands in this function will change $?
STARSHIP_CMD_STATUS=$? STARSHIP_PIPE_STATUS=(${pipestatus[@]})
- # Compute cmd_duration, if we have a time to consume, otherwise clear the
- # previous duration
+ # Calculate duration if a command was executed
if (( ${+STARSHIP_START_TIME} )); then
__starship_get_time && (( STARSHIP_DURATION = STARSHIP_CAPTURED_TIME - STARSHIP_START_TIME ))
unset STARSHIP_START_TIME
+ # Drop status and duration otherwise
else
- unset STARSHIP_DURATION
+ unset STARSHIP_DURATION STARSHIP_CMD_STATUS STARSHIP_PIPE_STATUS
fi
# Use length of jobstates array as number of jobs. Expansion fails inside
@@ -47,7 +46,8 @@ prompt_starship_precmd() {
STARSHIP_JOBS_COUNT=${#jobstates}
}
-# Runs after the user submits the command line, but before it is executed.
+# Runs after the user submits the command line, but before it is executed and
+# only if there's an actual command to run
prompt_starship_preexec() {
__starship_get_time && STARSHIP_START_TIME=$STARSHIP_CAPTURED_TIME
}
@@ -76,8 +76,6 @@ else
zle -N zle-keymap-select starship_zle-keymap-select-wrapped;
fi
-__starship_get_time && STARSHIP_START_TIME=$STARSHIP_CAPTURED_TIME
-
export STARSHIP_SHELL="zsh"
# Set up the session key that will be used to store logs
@@ -89,7 +87,6 @@ VIRTUAL_ENV_DISABLE_PROMPT=1
setopt promptsubst
-PROMPT='$(::STARSHIP:: prompt --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")'
-RPROMPT='$(::STARSHIP:: prompt --right --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")'
+PROMPT='$('::STARSHIP::' prompt --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")'
+RPROMPT='$('::STARSHIP::' prompt --right --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")'
PROMPT2="$(::STARSHIP:: prompt --continuation)"
-
diff --git a/src/main.rs b/src/main.rs
index cc30950a4..1e22ce6cf 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -188,7 +188,7 @@ fn main() {
(_, _, true) => Target::Continuation,
(_, _, _) => Target::Main,
};
- print::prompt(properties, target)
+ print::prompt(properties, target);
}
Commands::Module {
name,
@@ -211,7 +211,7 @@ fn main() {
let context = Context::default();
if let Some(name) = name {
if let Some(value) = value {
- configure::update_configuration(&context, &name, &value)
+ configure::update_configuration(&context, &name, &value);
}
} else if let Err(reason) = configure::edit_configuration(&context, None) {
eprintln!("Could not edit configuration: {reason}");
@@ -222,7 +222,7 @@ fn main() {
configure::print_configuration(&Context::default(), default, &name);
}
Commands::Toggle { name, value } => {
- configure::toggle_configuration(&Context::default(), &name, &value)
+ configure::toggle_configuration(&Context::default(), &name, &value);
}
Commands::BugReport => bug_report::create(),
Commands::Time => {
diff --git a/src/module.rs b/src/module.rs
index 26d46c976..0dcc0aad4 100644
--- a/src/module.rs
+++ b/src/module.rs
@@ -27,6 +27,7 @@ pub const ALL_MODULES: &[&str] = &[
"dart",
"deno",
"directory",
+ "direnv",
"docker_context",
"dotnet",
"elixir",
@@ -90,6 +91,7 @@ pub const ALL_MODULES: &[&str] = &[
"swift",
"terraform",
"time",
+ "typst",
"username",
"vagrant",
"vcsh",
diff --git a/src/modules/aws.rs b/src/modules/aws.rs
index 0d837c2ce..fa455862f 100644
--- a/src/modules/aws.rs
+++ b/src/modules/aws.rs
@@ -97,7 +97,13 @@ fn get_aws_profile_and_region(
context: &Context,
aws_config: &AwsConfigFile,
) -> (Option, Option) {
- let profile_env_vars = ["AWSU_PROFILE", "AWS_VAULT", "AWSUME_PROFILE", "AWS_PROFILE"];
+ let profile_env_vars = [
+ "AWSU_PROFILE",
+ "AWS_VAULT",
+ "AWSUME_PROFILE",
+ "AWS_PROFILE",
+ "AWS_SSO_PROFILE",
+ ];
let region_env_vars = ["AWS_REGION", "AWS_DEFAULT_REGION"];
let profile = profile_env_vars
.iter()
@@ -414,6 +420,20 @@ mod tests {
assert_eq!(expected, actual);
}
+ #[test]
+ fn profile_set_from_awsssocli() {
+ let actual = ModuleRenderer::new("aws")
+ .env("AWS_SSO_PROFILE", "astronauts-awsssocli")
+ .env("AWS_ACCESS_KEY_ID", "dummy")
+ .collect();
+ let expected = Some(format!(
+ "on {}",
+ Color::Yellow.bold().paint("☁️ astronauts-awsssocli ")
+ ));
+
+ assert_eq!(expected, actual);
+ }
+
#[test]
fn profile_and_region_set() {
let actual = ModuleRenderer::new("aws")
@@ -668,7 +688,7 @@ credential_process = /opt/bin/awscreds-retriever
let expiration_env_vars = ["AWS_SESSION_EXPIRATION", "AWS_CREDENTIAL_EXPIRATION"];
expiration_env_vars.iter().for_each(|env_var| {
- let now_plus_half_hour: DateTime = chrono::DateTime::from_utc(
+ let now_plus_half_hour: DateTime = DateTime::from_naive_utc_and_offset(
NaiveDateTime::from_timestamp_opt(chrono::Local::now().timestamp() + 1800, 0)
.unwrap(),
Utc,
@@ -683,14 +703,21 @@ credential_process = /opt/bin/awscreds-retriever
now_plus_half_hour.to_rfc3339_opts(SecondsFormat::Secs, true),
)
.collect();
- let expected = Some(format!(
- "on {}",
- Color::Yellow
- .bold()
- .paint("☁️ astronauts (ap-northeast-2) [30m] ")
- ));
- assert_eq!(expected, actual);
+ let possible_values = [
+ "30m2s", "30m1s", "30m", "29m59s", "29m58s", "29m57s", "29m56s", "29m55s",
+ ];
+ let possible_values = possible_values.map(|duration| {
+ let segment_colored = format!("☁️ astronauts (ap-northeast-2) [{duration}] ");
+ Some(format!(
+ "on {}",
+ Color::Yellow.bold().paint(segment_colored)
+ ))
+ });
+ assert!(
+ possible_values.contains(&actual),
+ "time is not in range: {actual:?}"
+ );
});
}
@@ -702,7 +729,7 @@ credential_process = /opt/bin/awscreds-retriever
use chrono::{DateTime, NaiveDateTime, Utc};
- let now_plus_half_hour: DateTime = chrono::DateTime::from_utc(
+ let now_plus_half_hour: DateTime = DateTime::from_naive_utc_and_offset(
NaiveDateTime::from_timestamp_opt(chrono::Local::now().timestamp() + 1800, 0).unwrap(),
Utc,
);
@@ -723,46 +750,32 @@ aws_secret_access_key=dummy
)
.unwrap();
- let actual = ModuleRenderer::new("aws")
- .env("AWS_PROFILE", "astronauts")
- .env("AWS_REGION", "ap-northeast-2")
- .env(
- "AWS_SHARED_CREDENTIALS_FILE",
- credentials_path.to_string_lossy().as_ref(),
- )
- .collect();
+ let credentials_env_vars = ["AWS_SHARED_CREDENTIALS_FILE", "AWS_CREDENTIALS_FILE"];
+ credentials_env_vars.iter().for_each(|env_var| {
+ let actual = ModuleRenderer::new("aws")
+ .env("AWS_PROFILE", "astronauts")
+ .env("AWS_REGION", "ap-northeast-2")
+ .env(env_var, credentials_path.to_string_lossy().as_ref())
+ .collect();
- let actual_variant = ModuleRenderer::new("aws")
- .env("AWS_PROFILE", "astronauts")
- .env("AWS_REGION", "ap-northeast-2")
- .env(
- "AWS_CREDENTIALS_FILE",
- credentials_path.to_string_lossy().as_ref(),
- )
- .collect();
+ // In principle, "30m" should be correct. However, bad luck in scheduling
+ // on shared runners may delay it.
+ let possible_values = [
+ "30m2s", "30m1s", "30m", "29m59s", "29m58s", "29m57s", "29m56s", "29m55s",
+ ];
+ let possible_values = possible_values.map(|duration| {
+ let segment_colored = format!("☁️ astronauts (ap-northeast-2) [{duration}] ");
+ Some(format!(
+ "on {}",
+ Color::Yellow.bold().paint(segment_colored)
+ ))
+ });
- assert_eq!(
- actual, actual_variant,
- "both AWS_SHARED_CREDENTIALS_FILE and AWS_CREDENTIALS_FILE should work"
- );
-
- // In principle, "30m" should be correct. However, bad luck in scheduling
- // on shared runners may delay it.
- let possible_values = [
- "30m2s", "30m1s", "30m", "29m59s", "29m58s", "29m57s", "29m56s", "29m55s",
- ];
- let possible_values = possible_values.map(|duration| {
- let segment_colored = format!("☁️ astronauts (ap-northeast-2) [{duration}] ");
- Some(format!(
- "on {}",
- Color::Yellow.bold().paint(segment_colored)
- ))
+ assert!(
+ possible_values.contains(&actual),
+ "time is not in range: {actual:?}"
+ );
});
-
- assert!(
- possible_values.contains(&actual),
- "time is not in range: {actual:?}"
- );
});
dir.close()
@@ -789,7 +802,7 @@ aws_secret_access_key=dummy
fn expiration_date_set_expired() {
use chrono::{DateTime, NaiveDateTime, SecondsFormat, Utc};
- let now: DateTime = chrono::DateTime::from_utc(
+ let now: DateTime = DateTime::from_naive_utc_and_offset(
NaiveDateTime::from_timestamp_opt(chrono::Local::now().timestamp() - 1800, 0).unwrap(),
Utc,
);
diff --git a/src/modules/c.rs b/src/modules/c.rs
index b8aa3b0ec..3e520f4dc 100644
--- a/src/modules/c.rs
+++ b/src/modules/c.rs
@@ -47,7 +47,7 @@ pub fn module<'a>(context: &'a Context) -> Option> {
} else {
return None;
};
- Some(c_compiler).map(Cow::Borrowed).map(Ok)
+ Some(Ok(Cow::Borrowed(c_compiler)))
}
"version" => {
let c_compiler_info = &c_compiler_info.deref().as_ref()?.stdout;
diff --git a/src/modules/direnv.rs b/src/modules/direnv.rs
new file mode 100644
index 000000000..4816a7ebb
--- /dev/null
+++ b/src/modules/direnv.rs
@@ -0,0 +1,406 @@
+use std::borrow::Cow;
+use std::path::PathBuf;
+use std::str::FromStr;
+
+use super::{Context, Module, ModuleConfig};
+
+use crate::configs::direnv::DirenvConfig;
+use crate::formatter::StringFormatter;
+
+/// Creates a module with the current direnv rc
+pub fn module<'a>(context: &'a Context) -> Option> {
+ let mut module = context.new_module("direnv");
+ let config = DirenvConfig::try_load(module.config);
+
+ let direnv_applies = !config.disabled
+ && context
+ .try_begin_scan()?
+ .set_extensions(&config.detect_extensions)
+ .set_files(&config.detect_files)
+ .set_folders(&config.detect_folders)
+ .is_match();
+
+ if !direnv_applies {
+ return None;
+ }
+
+ let direnv_status = &context.exec_cmd("direnv", &["status"])?.stdout;
+ let state = match DirenvState::from_str(direnv_status) {
+ Ok(s) => s,
+ Err(e) => {
+ log::warn!("{e}");
+
+ return None;
+ }
+ };
+
+ let parsed = StringFormatter::new(config.format).and_then(|formatter| {
+ formatter
+ .map_style(|variable| match variable {
+ "style" => Some(Ok(config.style)),
+ _ => None,
+ })
+ .map(|variable| match variable {
+ "symbol" => Some(Ok(Cow::from(config.symbol))),
+ "rc_path" => Some(Ok(state.rc_path.to_string_lossy())),
+ "allowed" => Some(Ok(match state.allowed {
+ AllowStatus::Allowed => Cow::from(config.allowed_msg),
+ AllowStatus::NotAllowed => Cow::from(config.not_allowed_msg),
+ AllowStatus::Denied => Cow::from(config.denied_msg),
+ })),
+ "loaded" => state
+ .loaded
+ .then_some(config.loaded_msg)
+ .or(Some(config.unloaded_msg))
+ .map(Cow::from)
+ .map(Ok),
+ _ => None,
+ })
+ .parse(None, Some(context))
+ });
+
+ module.set_segments(match parsed {
+ Ok(segments) => segments,
+ Err(e) => {
+ log::warn!("{e}");
+
+ return None;
+ }
+ });
+
+ Some(module)
+}
+
+struct DirenvState {
+ pub rc_path: PathBuf,
+ pub allowed: AllowStatus,
+ pub loaded: bool,
+}
+
+impl FromStr for DirenvState {
+ type Err = Cow<'static, str>;
+
+ fn from_str(s: &str) -> Result {
+ let mut rc_path = PathBuf::new();
+ let mut allowed = None;
+ let mut loaded = true;
+
+ for line in s.lines() {
+ if let Some(path) = line.strip_prefix("Found RC path") {
+ rc_path = PathBuf::from_str(path.trim()).map_err(|e| Cow::from(e.to_string()))?
+ } else if let Some(value) = line.strip_prefix("Found RC allowed") {
+ allowed = Some(AllowStatus::from_str(value.trim())?);
+ } else if line.contains("No .envrc or .env loaded") {
+ loaded = false;
+ };
+ }
+
+ if rc_path.as_os_str().is_empty() || allowed.is_none() {
+ return Err(Cow::from("unknown direnv state"));
+ }
+
+ Ok(Self {
+ rc_path,
+ allowed: allowed.unwrap(),
+ loaded,
+ })
+ }
+}
+
+#[derive(Debug)]
+enum AllowStatus {
+ Allowed,
+ NotAllowed,
+ Denied,
+}
+
+impl FromStr for AllowStatus {
+ type Err = Cow<'static, str>;
+
+ fn from_str(s: &str) -> Result {
+ match s {
+ "0" | "true" => Ok(Self::Allowed),
+ "1" => Ok(Self::NotAllowed),
+ "2" | "false" => Ok(Self::Denied),
+ _ => Err(Cow::from("invalid allow status")),
+ }
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use crate::test::ModuleRenderer;
+ use crate::utils::CommandOutput;
+ use std::io;
+ use std::path::Path;
+ #[test]
+ fn folder_without_rc_files() {
+ let renderer = ModuleRenderer::new("direnv")
+ .config(toml::toml! {
+ [direnv]
+ disabled = false
+ })
+ .cmd(
+ "direnv status",
+ Some(CommandOutput {
+ stdout: status_cmd_output_without_rc(),
+ stderr: String::default(),
+ }),
+ );
+
+ assert_eq!(None, renderer.collect());
+ }
+ #[test]
+ fn folder_with_unloaded_rc_file_pre_2_33() -> io::Result<()> {
+ let dir = tempfile::tempdir()?;
+ let rc_path = dir.path().join(".envrc");
+
+ std::fs::File::create(&rc_path)?.sync_all()?;
+
+ let renderer = ModuleRenderer::new("direnv")
+ .config(toml::toml! {
+ [direnv]
+ disabled = false
+ })
+ .path(dir.path())
+ .cmd(
+ "direnv status",
+ Some(CommandOutput {
+ stdout: status_cmd_output_with_rc(dir.path(), false, "0", true),
+ stderr: String::default(),
+ }),
+ );
+
+ assert_eq!(
+ Some(format!("direnv not loaded/allowed ")),
+ renderer.collect()
+ );
+
+ dir.close()
+ }
+ #[test]
+ fn folder_with_unloaded_rc_file() -> io::Result<()> {
+ let dir = tempfile::tempdir()?;
+ let rc_path = dir.path().join(".envrc");
+
+ std::fs::File::create(rc_path)?.sync_all()?;
+
+ let renderer = ModuleRenderer::new("direnv")
+ .config(toml::toml! {
+ [direnv]
+ disabled = false
+ })
+ .path(dir.path())
+ .cmd(
+ "direnv status",
+ Some(CommandOutput {
+ stdout: status_cmd_output_with_rc(dir.path(), false, "0", false),
+ stderr: String::default(),
+ }),
+ );
+
+ assert_eq!(
+ Some("direnv not loaded/allowed ".to_string()),
+ renderer.collect()
+ );
+
+ dir.close()
+ }
+ #[test]
+ fn folder_with_loaded_rc_file_pre_2_33() -> io::Result<()> {
+ let dir = tempfile::tempdir()?;
+ let rc_path = dir.path().join(".envrc");
+
+ std::fs::File::create(&rc_path)?.sync_all()?;
+
+ let renderer = ModuleRenderer::new("direnv")
+ .config(toml::toml! {
+ [direnv]
+ disabled = false
+ })
+ .path(dir.path())
+ .cmd(
+ "direnv status",
+ Some(CommandOutput {
+ stdout: status_cmd_output_with_rc(dir.path(), true, "0", true),
+ stderr: String::default(),
+ }),
+ );
+
+ assert_eq!(Some(format!("direnv loaded/allowed ")), renderer.collect());
+
+ dir.close()
+ }
+ #[test]
+ fn folder_with_loaded_rc_file() -> io::Result<()> {
+ let dir = tempfile::tempdir()?;
+ let rc_path = dir.path().join(".envrc");
+
+ std::fs::File::create(rc_path)?.sync_all()?;
+
+ let renderer = ModuleRenderer::new("direnv")
+ .config(toml::toml! {
+ [direnv]
+ disabled = false
+ })
+ .path(dir.path())
+ .cmd(
+ "direnv status",
+ Some(CommandOutput {
+ stdout: status_cmd_output_with_rc(dir.path(), true, "0", false),
+ stderr: String::default(),
+ }),
+ );
+
+ assert_eq!(
+ Some("direnv loaded/allowed ".to_string()),
+ renderer.collect()
+ );
+
+ dir.close()
+ }
+ #[test]
+ fn folder_with_loaded_and_denied_rc_file_pre_2_33() -> io::Result<()> {
+ let dir = tempfile::tempdir()?;
+ let rc_path = dir.path().join(".envrc");
+
+ std::fs::File::create(&rc_path)?.sync_all()?;
+
+ let renderer = ModuleRenderer::new("direnv")
+ .config(toml::toml! {
+ [direnv]
+ disabled = false
+ })
+ .path(dir.path())
+ .cmd(
+ "direnv status",
+ Some(CommandOutput {
+ stdout: status_cmd_output_with_rc(dir.path(), true, "2", true),
+ stderr: String::default(),
+ }),
+ );
+
+ assert_eq!(Some(format!("direnv loaded/denied ")), renderer.collect());
+
+ dir.close()
+ }
+ #[test]
+ fn folder_with_loaded_and_not_allowed_rc_file() -> io::Result<()> {
+ let dir = tempfile::tempdir()?;
+ let rc_path = dir.path().join(".envrc");
+
+ std::fs::File::create(&rc_path)?.sync_all()?;
+
+ let renderer = ModuleRenderer::new("direnv")
+ .config(toml::toml! {
+ [direnv]
+ disabled = false
+ })
+ .path(dir.path())
+ .cmd(
+ "direnv status",
+ Some(CommandOutput {
+ stdout: status_cmd_output_with_rc(dir.path(), true, "1", false),
+ stderr: String::default(),
+ }),
+ );
+
+ assert_eq!(
+ Some(format!("direnv loaded/not allowed ")),
+ renderer.collect()
+ );
+
+ dir.close()
+ }
+ #[test]
+ fn folder_with_loaded_and_denied_rc_file() -> io::Result<()> {
+ let dir = tempfile::tempdir()?;
+ let rc_path = dir.path().join(".envrc");
+
+ std::fs::File::create(rc_path)?.sync_all()?;
+
+ let renderer = ModuleRenderer::new("direnv")
+ .config(toml::toml! {
+ [direnv]
+ disabled = false
+ })
+ .path(dir.path())
+ .cmd(
+ "direnv status",
+ Some(CommandOutput {
+ stdout: status_cmd_output_with_rc(dir.path(), true, "2", false),
+ stderr: String::default(),
+ }),
+ );
+
+ assert_eq!(
+ Some("direnv loaded/denied ".to_string()),
+ renderer.collect()
+ );
+
+ dir.close()
+ }
+ fn status_cmd_output_without_rc() -> String {
+ String::from(
+ r"\
+direnv exec path /usr/bin/direnv
+DIRENV_CONFIG /home/test/.config/direnv
+bash_path /usr/bin/bash
+disable_stdin false
+warn_timeout 5s
+whitelist.prefix []
+whitelist.exact map[]
+No .envrc or .env loaded
+No .envrc or .env found",
+ )
+ }
+ fn status_cmd_output_with_rc(
+ dir: impl AsRef,
+ loaded: bool,
+ allowed: &str,
+ use_legacy_boolean_flags: bool,
+ ) -> String {
+ let rc_path = dir.as_ref().join(".envrc");
+ let rc_path = rc_path.to_string_lossy();
+
+ let allowed_value = match (use_legacy_boolean_flags, allowed) {
+ (true, "0") => "true",
+ (true, ..) => "false",
+ (false, val) => val,
+ };
+
+ let loaded = if loaded {
+ format!(
+ r#"\
+ Loaded RC path {rc_path}
+ Loaded watch: ".envrc" - 2023-04-30T09:51:04-04:00
+ Loaded watch: "../.local/share/direnv/allow/abcd" - 2023-04-30T09:52:58-04:00
+ Loaded RC allowed {allowed_value}
+ Loaded RC allowPath
+ "#
+ )
+ } else {
+ String::from("No .envrc or .env loaded")
+ };
+
+ let state = allowed.to_string();
+
+ format!(
+ r#"\
+direnv exec path /usr/bin/direnv
+DIRENV_CONFIG /home/test/.config/direnv
+bash_path /usr/bin/bash
+disable_stdin false
+warn_timeout 5s
+whitelist.prefix []
+whitelist.exact map[]
+{loaded}
+Found RC path {rc_path}
+Found watch: ".envrc" - 2023-04-25T18:45:54-04:00
+Found watch: "../.local/share/direnv/allow/abcd" - 1969-12-31T19:00:00-05:00
+Found RC allowed {state}
+Found RC allowPath /home/test/.local/share/direnv/allow/abcd
+"#
+ )
+ }
+}
diff --git a/src/modules/docker_context.rs b/src/modules/docker_context.rs
index 1c30001a8..ad6c258a7 100644
--- a/src/modules/docker_context.rs
+++ b/src/modules/docker_context.rs
@@ -57,7 +57,7 @@ pub fn module<'a>(context: &'a Context) -> Option> {
}
};
- if ctx == "default" {
+ if ctx == "default" || ctx.starts_with("unix://") {
return None;
}
@@ -293,6 +293,24 @@ mod tests {
cfg_dir.close()
}
+ #[test]
+ fn test_docker_host_env_with_unix_path() -> io::Result<()> {
+ let cfg_dir = tempfile::tempdir()?;
+
+ let actual = ModuleRenderer::new("docker_context")
+ .env("DOCKER_HOST", "unix:///run/user/1001/podman/podman.sock")
+ .config(toml::toml! {
+ [docker_context]
+ only_with_files = false
+ })
+ .collect();
+ let expected = None;
+
+ assert_eq!(expected, actual);
+
+ cfg_dir.close()
+ }
+
#[test]
fn test_docker_context_env() -> io::Result<()> {
let cfg_dir = tempfile::tempdir()?;
diff --git a/src/modules/dotnet.rs b/src/modules/dotnet.rs
index e3c59008a..4539b4d58 100644
--- a/src/modules/dotnet.rs
+++ b/src/modules/dotnet.rs
@@ -599,13 +599,13 @@ mod tests {
}
fn make_csproj_with_tfm(tfm_element: &str, tfm: &str) -> String {
- let json_text = r#"
+ let json_text = r"
TFM_VALUE
- "#;
+ ";
json_text
.replace("TFM_ELEMENT", tfm_element)
.replace("TFM_VALUE", tfm)
diff --git a/src/modules/fossil_metrics.rs b/src/modules/fossil_metrics.rs
index 5ec97b6c1..45ceb2b40 100644
--- a/src/modules/fossil_metrics.rs
+++ b/src/modules/fossil_metrics.rs
@@ -287,10 +287,10 @@ mod tests {
"{}{}",
expect_added
.map(|added| format!("{} ", expect_added_style.paint(format!("+{added}"))))
- .unwrap_or(String::from("")),
+ .unwrap_or_default(),
expect_deleted
.map(|deleted| format!("{} ", expect_deleted_style.paint(format!("-{deleted}"))))
- .unwrap_or(String::from("")),
+ .unwrap_or_default(),
));
assert_eq!(expected, actual);
}
diff --git a/src/modules/git_status.rs b/src/modules/git_status.rs
index e54ba7000..d1dd4c098 100644
--- a/src/modules/git_status.rs
+++ b/src/modules/git_status.rs
@@ -34,6 +34,11 @@ pub fn module<'a>(context: &'a Context) -> Option> {
// Return None if not in git repository
let repo = context.get_repo().ok()?;
+ if repo.kind.is_bare() {
+ log::debug!("This is a bare repository, git_status is not applicable");
+ return None;
+ }
+
if let Some(git_status) = git_status_wsl(context, &config) {
if git_status.is_empty() {
return None;
@@ -251,11 +256,12 @@ fn get_repo_status(
fn get_stashed_count(repo: &context::Repo) -> Option {
let repo = repo.open();
let reference = match repo.try_find_reference("refs/stash") {
- Ok(Some(reference)) => reference,
+ // Only proceed if the found reference has the expected name (not tags/refs/stash etc.)
+ Ok(Some(reference)) if reference.name().as_bstr() == b"refs/stash".as_slice() => reference,
// No stash reference found
- Ok(None) => return Some(0),
+ Ok(_) => return Some(0),
Err(err) => {
- log::warn!("Error finding stash reference: {err}");
+ log::debug!("Error finding stash reference: {err}");
return None;
}
};
@@ -267,7 +273,7 @@ fn get_stashed_count(repo: &context::Repo) -> Option {
Some(0)
}
Err(err) => {
- log::warn!("Error getting stash log: {err}");
+ log::debug!("Error getting stash log: {err}");
None
}
}
@@ -1166,6 +1172,21 @@ mod tests {
repo_dir.close()
}
+ #[test]
+ fn doesnt_generate_git_status_for_bare_repo() -> io::Result<()> {
+ let repo_dir = fixture_repo(FixtureProvider::GitBare)?;
+
+ create_added(repo_dir.path())?;
+
+ let actual = ModuleRenderer::new("git_status")
+ .path(repo_dir.path())
+ .collect();
+
+ assert_eq!(None, actual);
+
+ repo_dir.close()
+ }
+
fn ahead(repo_dir: &Path) -> io::Result<()> {
File::create(repo_dir.join("readme.md"))?.sync_all()?;
diff --git a/src/modules/kubernetes.rs b/src/modules/kubernetes.rs
index c56514ba8..042f47734 100644
--- a/src/modules/kubernetes.rs
+++ b/src/modules/kubernetes.rs
@@ -21,7 +21,7 @@ fn get_current_kube_context_name(filename: path::PathBuf) -> Option {
let contents = utils::read_file(filename).ok()?;
let yaml_docs = YamlLoader::load_from_str(&contents).ok()?;
- let conf = yaml_docs.get(0)?;
+ let conf = yaml_docs.first()?;
conf["current-context"]
.as_str()
.filter(|s| !s.is_empty())
@@ -35,7 +35,7 @@ fn get_kube_ctx_components(
let contents = utils::read_file(filename).ok()?;
let yaml_docs = YamlLoader::load_from_str(&contents).ok()?;
- let conf = yaml_docs.get(0)?;
+ let conf = yaml_docs.first()?;
let contexts = conf["contexts"].as_vec()?;
// Find the context with the name we're looking for
@@ -118,16 +118,13 @@ pub fn module<'a>(context: &'a Context) -> Option> {
.any(|v| !v.is_empty());
let is_kube_project = have_scan_config.then(|| {
- context
- .try_begin_scan()
- .map(|scanner| {
- scanner
- .set_files(&config.detect_files)
- .set_folders(&config.detect_folders)
- .set_extensions(&config.detect_extensions)
- .is_match()
- })
- .unwrap_or(false)
+ context.try_begin_scan().map_or(false, |scanner| {
+ scanner
+ .set_files(&config.detect_files)
+ .set_folders(&config.detect_folders)
+ .set_extensions(&config.detect_extensions)
+ .is_match()
+ })
});
if !is_kube_project.unwrap_or(true) {
diff --git a/src/modules/mod.rs b/src/modules/mod.rs
index fe4f42305..57983cd1e 100644
--- a/src/modules/mod.rs
+++ b/src/modules/mod.rs
@@ -16,6 +16,7 @@ mod daml;
mod dart;
mod deno;
mod directory;
+mod direnv;
mod docker_context;
mod dotnet;
mod elixir;
@@ -89,6 +90,7 @@ mod zig;
#[cfg(feature = "battery")]
mod battery;
+mod typst;
#[cfg(feature = "battery")]
pub use self::battery::{BatteryInfoProvider, BatteryInfoProviderImpl};
@@ -121,6 +123,7 @@ pub fn handle<'a>(module: &str, context: &'a Context) -> Option> {
"dart" => dart::module(context),
"deno" => deno::module(context),
"directory" => directory::module(context),
+ "direnv" => direnv::module(context),
"docker_context" => docker_context::module(context),
"dotnet" => dotnet::module(context),
"elixir" => elixir::module(context),
@@ -185,6 +188,7 @@ pub fn handle<'a>(module: &str, context: &'a Context) -> Option> {
"sudo" => sudo::module(context),
"terraform" => terraform::module(context),
"time" => time::module(context),
+ "typst" => typst::module(context),
"crystal" => crystal::module(context),
"username" => username::module(context),
"vlang" => vlang::module(context),
@@ -238,6 +242,7 @@ pub fn description(module: &str) -> &'static str {
"dart" => "The currently installed version of Dart",
"deno" => "The currently installed version of Deno",
"directory" => "The current working directory",
+ "direnv" => "The currently applied direnv file",
"docker_context" => "The current docker context",
"dotnet" => "The relevant version of the .NET Core SDK for the current directory",
"elixir" => "The currently installed versions of Elixir and OTP",
@@ -303,6 +308,7 @@ pub fn description(module: &str) -> &'static str {
"swift" => "The currently installed version of Swift",
"terraform" => "The currently selected terraform workspace and version",
"time" => "The current local time",
+ "typst" => "The current installed version of typst",
"username" => "The active user's username",
"vagrant" => "The currently installed version of Vagrant",
"vcsh" => "The currently active VCSH repository",
diff --git a/src/modules/nix_shell.rs b/src/modules/nix_shell.rs
index d8666ee84..4d5cc9a11 100644
--- a/src/modules/nix_shell.rs
+++ b/src/modules/nix_shell.rs
@@ -23,7 +23,7 @@ impl NixShellType {
};
if use_heuristic {
- Self::in_new_nix_shell(context).map(|_| Unknown)
+ Self::in_new_nix_shell(context).map(|()| Unknown)
} else {
None
}
diff --git a/src/modules/openstack.rs b/src/modules/openstack.rs
index 35c488bab..d5e59f63d 100644
--- a/src/modules/openstack.rs
+++ b/src/modules/openstack.rs
@@ -27,7 +27,7 @@ fn get_osp_project_from_config(context: &Context, osp_cloud: &str) -> Option Option Option {
+ let file_contents = context.read_file_from_pwd("DESCRIPTION")?;
+ let re = Regex::new(r"(?m)^Version:\s*(?P.*$)").unwrap();
+ let caps = re.captures(&file_contents)?;
+ format_version(&caps["version"], config.version_format)
+}
+
fn get_version(context: &Context, config: &PackageConfig) -> Option {
let package_version_fn: Vec Option> = vec![
get_cargo_version,
@@ -330,6 +337,7 @@ fn get_version(context: &Context, config: &PackageConfig) -> Option {
get_sbt_version,
get_daml_project_version,
get_dart_pub_version,
+ get_rlang_version,
];
package_version_fn.iter().find_map(|f| f(context, config))
@@ -1402,6 +1410,19 @@ environment:
project_dir.close()
}
+ #[test]
+ fn test_extract_rlang_version() -> io::Result<()> {
+ let config_name = "DESCRIPTION";
+ let config_content = "
+Package: starship
+Version: 1.0.0
+Title: Starship
+";
+ let project_dir = create_project_dir()?;
+ fill_config(&project_dir, config_name, Some(config_content))?;
+ expect_output(&project_dir, Some("v1.0.0"), None);
+ project_dir.close()
+ }
fn create_project_dir() -> io::Result {
tempfile::tempdir()
}
diff --git a/src/modules/pulumi.rs b/src/modules/pulumi.rs
index 093014492..6df36dde4 100644
--- a/src/modules/pulumi.rs
+++ b/src/modules/pulumi.rs
@@ -285,8 +285,9 @@ mod tests {
let project_file = PathBuf::from("/hello/Pulumi.yaml");
assert_eq!(
get_pulumi_workspace(&context, name, &project_file),
- Some("/home/sweet/home/.pulumi/workspaces/foobar-test-workspace.json")
- .map(PathBuf::from)
+ Some(PathBuf::from(
+ "/home/sweet/home/.pulumi/workspaces/foobar-test-workspace.json"
+ ))
);
}
diff --git a/src/modules/python.rs b/src/modules/python.rs
index d2b3cdec6..df4cfab5f 100644
--- a/src/modules/python.rs
+++ b/src/modules/python.rs
@@ -376,10 +376,10 @@ Python 3.7.9 (7e6e2bb30ac5fbdbd443619cae28c51d5c162a02, Nov 24 2020, 10:03:59)
create_dir_all(dir.path().join("my_venv"))?;
let mut venv_cfg = File::create(dir.path().join("my_venv").join("pyvenv.cfg"))?;
venv_cfg.write_all(
- br#"
+ br"
home = something
prompt = 'foo'
- "#,
+ ",
)?;
venv_cfg.sync_all()?;
@@ -403,10 +403,10 @@ prompt = 'foo'
create_dir_all(dir.path().join("my_venv"))?;
let mut venv_cfg = File::create(dir.path().join("my_venv").join("pyvenv.cfg"))?;
venv_cfg.write_all(
- br#"
+ br"
home = something
prompt = '(foo)'
- "#,
+ ",
)?;
venv_cfg.sync_all()?;
diff --git a/src/modules/rlang.rs b/src/modules/rlang.rs
index a3902497f..5620e025e 100644
--- a/src/modules/rlang.rs
+++ b/src/modules/rlang.rs
@@ -133,9 +133,9 @@ https://www.gnu.org/licenses/."#;
}
#[test]
- fn folder_with_rprofile_files() -> io::Result<()> {
+ fn folder_with_description_files() -> io::Result<()> {
let dir = tempfile::tempdir()?;
- File::create(dir.path().join(".Rprofile"))?.sync_all()?;
+ File::create(dir.path().join("DESCRIPTION"))?.sync_all()?;
check_r_render(&dir);
dir.close()
}
diff --git a/src/modules/rust.rs b/src/modules/rust.rs
index 221111ea1..6544eba77 100644
--- a/src/modules/rust.rs
+++ b/src/modules/rust.rs
@@ -914,32 +914,32 @@ version = "12"
};
}
- static STABLE: &str = r#"rustc 1.40.0 (73528e339 2019-12-16)
+ static STABLE: &str = r"rustc 1.40.0 (73528e339 2019-12-16)
binary: rustc
commit-hash: 73528e339aae0f17a15ffa49a8ac608f50c6cf14
commit-date: 2019-12-16
host: x86_64-unknown-linux-gnu
release: 1.40.0
LLVM version: 9.0
-"#;
+";
- static BETA: &str = r#"rustc 1.41.0-beta.1 (eb3f7c2d3 2019-12-17)
+ static BETA: &str = r"rustc 1.41.0-beta.1 (eb3f7c2d3 2019-12-17)
binary: rustc
commit-hash: eb3f7c2d3aec576f47eba854cfbd3c1187b8a2a0
commit-date: 2019-12-17
host: x86_64-unknown-linux-gnu
release: 1.41.0-beta.1
LLVM version: 9.0
-"#;
+";
- static NIGHTLY: &str = r#"rustc 1.42.0-nightly (da3629b05 2019-12-29)
+ static NIGHTLY: &str = r"rustc 1.42.0-nightly (da3629b05 2019-12-29)
binary: rustc
commit-hash: da3629b05f8f1b425a738bfe9fe9aedd47c5417a
commit-date: 2019-12-29
host: x86_64-unknown-linux-gnu
release: 1.42.0-nightly
LLVM version: 9.0
-"#;
+";
test!(
(STABLE, None) => Some(("v1.40.0", "x86_64-unknown-linux-gnu")),
diff --git a/src/modules/shell.rs b/src/modules/shell.rs
index c9b6df157..98502a266 100644
--- a/src/modules/shell.rs
+++ b/src/modules/shell.rs
@@ -20,6 +20,7 @@ pub fn module<'a>(context: &'a Context) -> Option> {
Shell::Bash => Some(config.bash_indicator),
Shell::Fish => Some(config.fish_indicator),
Shell::Zsh => Some(config.zsh_indicator),
+ Shell::Pwsh => config.pwsh_indicator.or(Some(config.powershell_indicator)),
Shell::PowerShell => Some(config.powershell_indicator),
Shell::Ion => Some(config.ion_indicator),
Shell::Elvish => Some(config.elvish_indicator),
@@ -40,6 +41,7 @@ pub fn module<'a>(context: &'a Context) -> Option> {
"fish_indicator" => Some(Ok(config.fish_indicator)),
"zsh_indicator" => Some(Ok(config.zsh_indicator)),
"powershell_indicator" => Some(Ok(config.powershell_indicator)),
+ "pwsh_indicator" => config.pwsh_indicator.map(Ok),
"ion_indicator" => Some(Ok(config.ion_indicator)),
"elvish_indicator" => Some(Ok(config.elvish_indicator)),
"tcsh_indicator" => Some(Ok(config.tcsh_indicator)),
@@ -200,6 +202,50 @@ mod tests {
assert_eq!(expected, actual);
}
+ #[test]
+ fn test_pwsh_default_format() {
+ let expected = Some(format!("{} ", Color::White.bold().paint("psh")));
+ let actual = ModuleRenderer::new("shell")
+ .shell(Shell::Pwsh)
+ .config(toml::toml! {
+ [shell]
+ disabled = false
+ })
+ .collect();
+
+ assert_eq!(expected, actual);
+ }
+
+ #[test]
+ fn test_pwsh_custom_format() {
+ let expected = Some(format!("{} ", Color::Cyan.bold().paint("pwsh")));
+ let actual = ModuleRenderer::new("shell")
+ .shell(Shell::Pwsh)
+ .config(toml::toml! {
+ [shell]
+ pwsh_indicator = "[pwsh](bold cyan)"
+ disabled = false
+ })
+ .collect();
+
+ assert_eq!(expected, actual);
+ }
+
+ #[test]
+ fn test_pwsh_custom_format_fallback() {
+ let expected = Some(format!("{} ", Color::Cyan.bold().paint("pwsh")));
+ let actual = ModuleRenderer::new("shell")
+ .shell(Shell::Pwsh)
+ .config(toml::toml! {
+ [shell]
+ powershell_indicator = "[pwsh](bold cyan)"
+ disabled = false
+ })
+ .collect();
+
+ assert_eq!(expected, actual);
+ }
+
#[test]
fn test_ion_default_format() {
let expected = Some(format!("{} ", Color::White.bold().paint("ion")));
diff --git a/src/modules/shlvl.rs b/src/modules/shlvl.rs
index 48d22ec89..03e32728e 100644
--- a/src/modules/shlvl.rs
+++ b/src/modules/shlvl.rs
@@ -242,7 +242,7 @@ mod tests {
disabled = false
threshold = threshold
})
- .env(SHLVL_ENV_VAR, format!("{}", shlvl))
+ .env(SHLVL_ENV_VAR, format!("{shlvl}"))
.collect()
}
diff --git a/src/modules/typst.rs b/src/modules/typst.rs
new file mode 100644
index 000000000..a1c0ba4a0
--- /dev/null
+++ b/src/modules/typst.rs
@@ -0,0 +1,98 @@
+use super::{Context, Module, ModuleConfig};
+
+use crate::configs::typst::TypstConfig;
+use crate::formatter::{StringFormatter, VersionFormatter};
+
+/// Creates a module with the current Typst version
+pub fn module<'a>(context: &'a Context) -> Option> {
+ let mut module = context.new_module("typst");
+ let config = TypstConfig::try_load(module.config);
+
+ let is_typst_project = context
+ .try_begin_scan()?
+ .set_files(&config.detect_files)
+ .set_extensions(&config.detect_extensions)
+ .set_folders(&config.detect_folders)
+ .is_match();
+
+ if !is_typst_project {
+ return None;
+ }
+
+ let parsed = StringFormatter::new(config.format).and_then(|formatter| {
+ formatter
+ .map_meta(|var, _| match var {
+ "symbol" => Some(config.symbol),
+ _ => None,
+ })
+ .map_style(|variable| match variable {
+ "style" => Some(Ok(config.style)),
+ _ => None,
+ })
+ .map(|variable| match variable {
+ "version" => {
+ let version = get_typst_config(context)?;
+ VersionFormatter::format_module_version(
+ module.get_name(),
+ &version,
+ config.version_format,
+ )
+ .map(Ok)
+ }
+ _ => None,
+ })
+ .parse(None, Some(context))
+ });
+
+ module.set_segments(match parsed {
+ Ok(segments) => segments,
+ Err(error) => {
+ log::warn!("Error in module `typst`:\n{}", error);
+ return None;
+ }
+ });
+
+ Some(module)
+}
+
+fn get_typst_config(context: &Context) -> Option {
+ context
+ .exec_cmd("typst", &["--version"])?
+ .stdout
+ .trim()
+ .strip_prefix("typst ")
+ .and_then(|version| version.split_whitespace().next().map(ToOwned::to_owned))
+}
+
+#[cfg(test)]
+mod tests {
+ use crate::test::ModuleRenderer;
+ use nu_ansi_term::Color;
+ use std::fs::File;
+ use std::io;
+ #[test]
+ fn read_typst_not_present() -> io::Result<()> {
+ let dir = tempfile::tempdir()?;
+
+ let actual = ModuleRenderer::new("typst").path(dir.path()).collect();
+
+ let expected = None;
+ assert_eq!(expected, actual);
+ dir.close()
+ }
+
+ #[test]
+ fn read_typst_present() -> io::Result<()> {
+ let dir = tempfile::tempdir()?;
+
+ File::create(dir.path().join("test.typ"))?.sync_all()?;
+
+ let actual = ModuleRenderer::new("typst").path(dir.path()).collect();
+ let expected = Some(format!(
+ "via {}",
+ Color::Rgb(0, 147, 167).bold().paint("t v0.10 ")
+ ));
+ assert_eq!(expected, actual);
+ dir.close()
+ }
+}
diff --git a/src/print.rs b/src/print.rs
index 742dfdb98..78c3dd6cd 100644
--- a/src/print.rs
+++ b/src/print.rs
@@ -391,7 +391,7 @@ pub fn format_duration(duration: &Duration) -> String {
/// Return the modules from $all that are not already in the list
fn all_modules_uniq(module_list: &BTreeSet) -> Vec {
let mut prompt_order: Vec = Vec::new();
- for module in PROMPT_ORDER.iter() {
+ for module in PROMPT_ORDER {
if !module_list.contains(*module) {
prompt_order.push(String::from(*module))
}
@@ -452,7 +452,7 @@ fn load_formatter_and_modules<'a>(context: &'a Context) -> (StringFormatter<'a>,
let modules = [&lf, &rf]
.into_iter()
.flatten()
- .flat_map(|f| f.get_variables())
+ .flat_map(VariableHolder::get_variables)
.collect();
let main_formatter = match context.target {
@@ -507,8 +507,10 @@ pub fn preset_command(name: Option, output: Option, list: bool)
fn preset_list() -> String {
Preset::value_variants()
.iter()
- .map(|v| format!("{}\n", v.0))
- .collect()
+ .fold(String::new(), |mut output, b| {
+ let _ = writeln!(output, "{}", b.0);
+ output
+ })
}
#[cfg(test)]
diff --git a/src/test/mod.rs b/src/test/mod.rs
index dd26ea820..9cbb749d7 100644
--- a/src/test/mod.rs
+++ b/src/test/mod.rs
@@ -166,6 +166,7 @@ impl<'a> ModuleRenderer<'a> {
pub enum FixtureProvider {
Fossil,
Git,
+ GitBare,
Hg,
Pijul,
}
@@ -229,6 +230,16 @@ pub fn fixture_repo(provider: FixtureProvider) -> io::Result {
Ok(path)
}
+ FixtureProvider::GitBare => {
+ let path = tempfile::tempdir()?;
+ gix::ThreadSafeRepository::init(
+ &path,
+ gix::create::Kind::Bare,
+ gix::create::Options::default(),
+ )
+ .map_err(|err| io::Error::new(io::ErrorKind::Other, err))?;
+ Ok(path)
+ }
FixtureProvider::Hg => {
let path = tempfile::tempdir()?;
diff --git a/src/utils.rs b/src/utils.rs
index d4d68a812..7eaeba3f4 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -71,7 +71,7 @@ pub fn write_file, S: AsRef>(file_name: P, text: S) -> Resul
};
match file.write_all(text.as_bytes()) {
- Ok(_) => {
+ Ok(()) => {
log::trace!("File {file_name:?} written successfully");
}
Err(err) => {
@@ -341,6 +341,11 @@ WebAssembly: unavailable
stdout: String::from("default\n"),
stderr: String::default(),
}),
+ "typst --version" => Some(CommandOutput {
+ stdout: String::from("typst 0.10 (360cc9b9)"),
+ stderr: String::default(),
+ }),
+
"esy ocaml -vnum" => Some(CommandOutput {
stdout: String::from("4.08.1\n"),
stderr: String::default(),
|