1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2025-01-11 17:38:48 +00:00

New translations README.md (Russian)

This commit is contained in:
Matan Kushner 2023-09-02 08:30:30 +01:00
parent d73d0aeff8
commit 3209e26c7f

View File

@ -253,6 +253,7 @@ $kubernetes\
$directory\
$vcsh\
$fossil_branch\
$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
@ -1524,6 +1525,41 @@ 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.
@ -1600,9 +1636,9 @@ format = 'on [$symbol$account(@$domain)(\($project\))]($style) '
very-long-project-name = 'vlpn'
```
## Ветвь Git
## Git Branch
Модуль `git_branch` показывает активную ветку репозитория в вашем текущей директории.
The `git_branch` module shows the active branch of the repo in your current directory.
### Опции
@ -1616,7 +1652,7 @@ very-long-project-name = 'vlpn'
| `truncation_symbol` | `'…'` | Символ, используемый для обозначения усечения названия ветки. You can use `''` for no symbol. |
| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. |
| `ignore_branches` | `[]` | A list of names to avoid displaying. Useful for 'master' or 'main'. |
| `disabled` | `false` | Отключает модуль `git_branch`. |
| `disabled` | `false` | Disables the `git_branch` module. |
### Переменные
@ -1650,14 +1686,14 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
| Параметр | По умолчанию | Описание |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | Длина отображаемого хэша коммита git. |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `'[\($hash$tag\)]($style) '` | Формат модуля. |
| `style` | `'bold green'` | Стиль модуля. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `' 🏷 '` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Отключает модуль `git_commit`. |
| `disabled` | `false` | Disables the `git_commit` module. |
### Переменные
@ -1679,9 +1715,9 @@ commit_hash_length = 4
tag_symbol = '🔖 '
```
## Состояние Git
## Git State
Модуль `git_state` будет отображаться в директориях, являющимися частью репозитория git, и там, где выполняется операция, такие как: _REBASING_, _BISECTING_, и т. д. Если есть информация о прогрессе (например, REBASING 3/10), эта информация также будет показана.
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
### Опции
@ -1696,7 +1732,7 @@ tag_symbol = '🔖 '
| `am_or_rebase` | `'AM/REBASE'` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
| `style` | `'bold yellow'` | Стиль модуля. |
| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | Формат модуля. |
| `disabled` | `false` | Отключает модуль `git_state`. |
| `disabled` | `false` | Disables the `git_state` module. |
### Переменные
@ -1725,7 +1761,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
::: tip
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@ -1763,7 +1799,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
## Статус Git
Модуль `git_status` отображает символы, представляющие состояние репозитория в вашей текущей директории.
The `git_status` module shows symbols representing the state of the repo in your current directory.
::: tip
@ -1776,7 +1812,7 @@ The Git Status module is very slow in Windows directories (for example under `/m
| Параметр | По умолчанию | Описание |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
| `conflicted` | `'='` | Эта ветка имеет конфликты слияния. |
| `conflicted` | `'='` | This branch has merge conflicts. |
| `ahead` | `'⇡'` | The format of `ahead` |
| `behind` | `'⇣'` | The format of `behind` |
| `diverged` | `'⇕'` | The format of `diverged` |
@ -1790,7 +1826,7 @@ The Git Status module is very slow in Windows directories (for example under `/m
| `typechanged` | `""` | The format of `typechange` |
| `style` | `'bold red'` | Стиль модуля. |
| `ignore_submodules` | `false` | Ignore changes to submodules. |
| `disabled` | `false` | Отключает модуль `git_status`. |
| `disabled` | `false` | Disables the `git_status` module. |
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
### Переменные
@ -1822,9 +1858,9 @@ The following variables can be used in `diverged`:
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
| Переменная | Описание |
| ---------- | -------------------------- |
| `count` | Показать количество файлов |
| Переменная | Описание |
| ---------- | ------------------------ |
| `count` | Show the number of files |
### Пример
@ -1845,7 +1881,7 @@ renamed = '👅'
deleted = '🗑'
```
Показывать счетчик впереди/позади для отслеживаемой ветки
Show ahead/behind count of the branch being tracked
```toml
# ~/.config/starship.toml
@ -1891,7 +1927,7 @@ The `golang` module shows the currently installed version of [Go](https://golang
| `detect_folders` | `['Godeps']` | Which folders should trigger this module. |
| `style` | `'bold cyan'` | Стиль модуля. |
| `not_capable_style` | `'bold red'` | The style for the module when the go directive in the go.mod file does not match the installed Go version. |
| `disabled` | `false` | Отключает модуль `golang`. |
| `disabled` | `false` | Disables the `golang` module. |
### Переменные
@ -2008,7 +2044,7 @@ By default the module will be shown if any of the following conditions are met:
| `detect_files` | `['stack.yaml', 'cabal.project']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `style` | `'bold purple'` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `haskell`. |
| `disabled` | `false` | Disables the `haskell` module. |
### Переменные
@ -2103,24 +2139,24 @@ format = 'via [⎈ $version](bold white) '
## Имя хоста
Модуль `hostname` отображает имя системы (хоста).
The `hostname` module shows the system 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 |
| `format` | `'[$ssh_symbol$hostname]($style) in '` | Формат модуля. |
| `style` | `'bold dimmed green'` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `hostname`. |
| Параметр | По умолчанию | Описание |
| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `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 '` | Формат модуля. |
| `style` | `'bold dimmed green'` | Стиль модуля. |
| `disabled` | `false` | Disables the `hostname` module. |
### Переменные
| Переменная | Пример | Описание |
| ---------- | ---------- | ----------------------------------------------------- |
| имя хоста | `computer` | The hostname of the computer |
| hostname | `computer` | The hostname of the computer |
| style\* | | Отражает значение параметра `style` |
| ssh_symbol | `'🌏 '` | The symbol to represent when connected to SSH session |
@ -2156,7 +2192,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `'☕ '` | A format string representing the symbol of Java |
| `style` | `'red dimmed'` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `java`. |
| `disabled` | `false` | Disables the `java` module. |
### Переменные
@ -2177,9 +2213,9 @@ The `java` module shows the currently installed version of [Java](https://www.or
symbol = '🌟 '
```
## Работы
## Jobs
Модуль `jobs` отображает текущее количество запущенных работ. Модуль будет показан только если работы выполняются в фоне. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running.
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running.
The default functionality is:
@ -2203,13 +2239,13 @@ The `threshold` option is deprecated, but if you want to use it, the module will
| Параметр | По умолчанию | Описание |
| ------------------ | ----------------------------- | ------------------------------------------------------------------------ |
| `threshold`* | `1` | Показывать количество работ, если превышено. |
| `threshold`* | `1` | Show number of jobs if exceeded. |
| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. |
| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. |
| `format` | `'[$symbol$number]($style) '` | Формат модуля. |
| `symbol` | `'✦'` | The string used to represent the `symbol` variable. |
| `style` | `'bold blue'` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `jobs`. |
| `disabled` | `false` | Disables the `jobs` module. |
*: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead.
@ -2323,11 +2359,11 @@ 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
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
When the module is enabled it will always be active, unless any of `detect_extensions`, `detect_files` or `detect_folders` have been set in which case the module will only be active in directories that match those conditions.
@ -2335,17 +2371,39 @@ 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. |
| `disabled` | `true` | Отключает модуль `kubernetes`. |
| `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 `^<pattern>$` 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 +2426,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<var_cluster>[\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,36 +2441,47 @@ 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<var_cluster>[\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<var_cluster>[\w-]+)' = 'gke-$var_cluster'
context_pattern = "gke_.*_(?P<cluster>[\\w-]+)"
context_alias = "gke-$cluster"
```
## Разрыв Строки
## Line Break
Модуль `line_break` разделяет командную строку на две строки.
The `line_break` module separates the prompt into two lines.
### Опции
| Параметр | По умолчанию | Описание |
| ---------- | ------------ | ------------------------------------------------------------------------ |
| `disabled` | `false` | Отключает модуль `line_break`, отображая командную строку в одну строку. |
| Параметр | По умолчанию | Описание |
| ---------- | ------------ | ------------------------------------------------------------------ |
| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. |
### Пример
@ -2501,27 +2566,27 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
format = 'via [🌕 $version](bold blue) '
```
## Использование памяти
## Memory Usage
Модуль `memory_usage` отображает текущую системную память и использование подкачки.
The `memory_usage` module shows current system memory and swap usage.
По умолчанию использование подкачки отображается, если общая сумма подкачки системы не равна нулю.
By default the swap usage is displayed if the total system swap is non-zero.
::: tip
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### Опции
| Параметр | По умолчанию | Описание |
| ----------- | ----------------------------------------------- | ------------------------------------------------------------------ |
| `threshold` | `75` | Скрывать использование памяти, если она не превышает этот процент. |
| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | Формат модуля. |
| `symbol` | `'🐏'` | Символ, используемый перед отображением использования памяти. |
| `style` | `'bold dimmed white'` | Стиль модуля. |
| `disabled` | `true` | Отключает модуль `memory_usage`. |
| Параметр | По умолчанию | Описание |
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
| `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | Формат модуля. |
| `symbol` | `'🐏'` | The symbol used before displaying the memory usage. |
| `style` | `'bold dimmed white'` | Стиль модуля. |
| `disabled` | `true` | Disables the `memory_usage` module. |
### Переменные
@ -2587,20 +2652,20 @@ symbol = ' '
style = 'bold dimmed green'
```
## Ветвь Mercurial
## Mercurial Branch
The `hg_branch` module shows the active branch and topic of the repo in your current directory.
### Опции
| Параметр | По умолчанию | Описание |
| ------------------- | ----------------------------------------- | ---------------------------------------------------------------------------------------- |
| `symbol` | `' '` | Символ, используемый перед закладкой hg или именем ветви репозитория в текущем каталоге. |
| `style` | `'bold purple'` | Стиль модуля. |
| `format` | `'on [$symbol$branch(:$topic)]($style) '` | Формат модуля. |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch / topic name to `N` graphemes |
| `truncation_symbol` | `'…'` | Символ, используемый для обозначения усечения названия ветки. |
| `disabled` | `true` | Отключает модуль `hg_branch`. |
| Параметр | По умолчанию | Описание |
| ------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------- |
| `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
| `style` | `'bold purple'` | Стиль модуля. |
| `format` | `'on [$symbol$branch(:$topic)]($style) '` | Формат модуля. |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch / topic name to `N` graphemes |
| `truncation_symbol` | `'…'` | Символ, используемый для обозначения усечения названия ветки. |
| `disabled` | `true` | Disables the `hg_branch` module. |
### Переменные
@ -2637,7 +2702,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
| Параметр | По умолчанию | Описание |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | Формат модуля |
| `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. |
| `detect_extensions` | `['nim', 'nims', 'nimble']` | Which extensions should trigger this module. |
@ -2668,7 +2733,7 @@ symbol = '🎣 '
## Nix-shell
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. Модуль будет показываться внутри среды nix-shell.
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment.
### Опции
@ -2680,7 +2745,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
| `impure_msg` | `'impure'` | A format string shown when the shell is impure. |
| `pure_msg` | `'pure'` | A format string shown when the shell is pure. |
| `unknown_msg` | `''` | A format string shown when it is unknown if the shell is pure/impure. |
| `disabled` | `false` | Отключает модуль `nix_shell`. |
| `disabled` | `false` | Disables the `nix_shell` module. |
| `heuristic` | `false` | Attempts to detect new `nix shell`-style shells with a heuristic. |
### Переменные
@ -2729,7 +2794,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
| `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'` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `nodejs`. |
| `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. |
### Переменные
@ -2882,7 +2947,7 @@ The [os_info](https://lib.rs/crates/os_info) crate used by this module is known
::: tip
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@ -2972,9 +3037,9 @@ Windows = " "
Arch = "Arch is the best! "
```
## Версия пакета
## Package Version
Модуль `package` отображается, когда текущий каталог является репозиторием для пакета и показывает его текущую версию. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart` packages.
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart` packages.
- [**npm**](https://docs.npmjs.com/cli/commands/npm) The `npm` package version is extracted from the `package.json` present in the current directory
- [**Cargo**](https://doc.rust-lang.org/cargo/) The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
@ -3001,11 +3066,11 @@ Arch = "Arch is the best! "
| Параметр | По умолчанию | Описание |
| ----------------- | --------------------------------- | ------------------------------------------------------------------------- |
| `format` | `'is [$symbol$version]($style) '` | Формат модуля. |
| `symbol` | `'📦 '` | Символ, используемый перед отображением версии пакета. |
| `symbol` | `'📦 '` | 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'` | Стиль модуля. |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | Отключает модуль `package`. |
| `disabled` | `false` | Disables the `package` module. |
### Переменные
@ -3080,12 +3145,12 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. |
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🐘 '` | Символ, используемый перед отображением версии PHP. |
| `symbol` | `'🐘 '` | 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. |
| `style` | `'147 bold'` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `php`. |
| `disabled` | `false` | Disables the `php` module. |
### Переменные
@ -3149,13 +3214,13 @@ By default the module will be shown if any of the following conditions are met:
### Переменные
| Переменная | Пример | Описание |
| ---------------- | ---------- | ------------------------------------ |
| version | `v0.12.24` | The version of `pulumi` |
| stack | `dev` | The current Pulumi stack |
| имя пользователя | `alice` | The current Pulumi username |
| symbol | | Отражает значение параметра `symbol` |
| style\* | | Отражает значение параметра `style` |
| Переменная | Пример | Описание |
| ---------- | ---------- | ------------------------------------ |
| version | `v0.12.24` | The version of `pulumi` |
| stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Отражает значение параметра `symbol` |
| style\* | | Отражает значение параметра `style` |
*: Эта переменная может использоваться только в качестве части строки style
@ -3244,7 +3309,7 @@ By default the module will be shown if any of the following conditions are met:
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🐍 '` | A format string representing the symbol of Python |
| `style` | `'yellow bold'` | Стиль модуля. |
| `pyenv_version_name` | `false` | Использовать pyenv для получения версии Python |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `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 |
@ -3389,7 +3454,7 @@ format = 'via [🦪 $version]($style) '
## Red
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). Модуль будет показан, если любое из следующих условий соблюдено:
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
- The current directory contains a file with `.red` or `.reds` extension
@ -3427,7 +3492,7 @@ symbol = '🔴 '
## Ruby
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). Модуль будет показан, если любое из следующих условий соблюдено:
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met:
- Текущий каталог содержит файл `Gemfile`
- Текущий каталог содержит файл `.ruby-version`
@ -3448,7 +3513,7 @@ Starship gets the current Ruby version by running `ruby -v`.
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. |
| `style` | `'bold red'` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `ruby`. |
| `disabled` | `false` | Disables the `ruby` module. |
### Переменные
@ -3471,7 +3536,7 @@ symbol = '🔺 '
## Rust
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). Модуль будет показан, если любое из следующих условий соблюдено:
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met:
- Текущий каталог содержит файл `Cargo.toml`
- Текущий каталог содержит файл с расширением `.rs`
@ -3487,7 +3552,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt
| `detect_files` | `['Cargo.toml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `style` | `'bold red'` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `rust`. |
| `disabled` | `false` | Disables the `rust` module. |
### Переменные
@ -3556,7 +3621,7 @@ The `shell` module shows an indicator for currently used shell.
::: tip
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@ -3584,7 +3649,7 @@ The `shell` module shows an indicator for currently used shell.
| Переменная | По умолчанию | Описание |
| ---------- | ------------ | ---------------------------------------------------------- |
| indicator | | Mirrors the value of `indicator` for currently used shell. |
| style\* | | Отражает значение параметра `style`. |
| style\* | | Mirrors the value of option `style`. |
*: Эта переменная может использоваться только в качестве части строки style
@ -3761,7 +3826,7 @@ The `status` module displays the exit code of the previous command. If $success_
::: tip
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@ -3822,7 +3887,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module
::: tip
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@ -3867,7 +3932,7 @@ disabled = false
## Swift
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). Модуль будет показан, если любое из следующих условий соблюдено:
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met:
- The current directory contains a `Package.swift` file
- The current directory contains a file with the `.swift` extension
@ -3930,7 +3995,7 @@ By default the module will be shown if any of the following conditions are met:
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `['.terraform']` | Which folders should trigger this module. |
| `style` | `'bold 105'` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `terraform`. |
| `disabled` | `false` | Disables the `terraform` module. |
### Переменные
@ -3965,25 +4030,25 @@ format = '[🏎💨 $workspace]($style) '
## Время
Модуль `time` показывает текущее **локальное** время. Значение конфигурации `format` используется пакетом [`chrono`](https://crates.io/crates/chrono) для контроля того, как отображается время. Ознакомьтесь с [документацией chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), чтобы увидеть доступные параметры.
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
::: tip
По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации.
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
### Опции
| Параметр | По умолчанию | Описание |
| ----------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | `'at [$time]($style) '` | The format string for the module. |
| `use_12hr` | `false` | Включить 12-часовое форматирование |
| `time_format` | см. ниже | [Строка формата chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), используемая для форматирования времени. |
| `style` | `'bold yellow'` | Стиль модуля времени |
| `utc_time_offset` | `'local'` | Устанавливает смещение UTC. Range from -24 &lt; x &lt; 24. Разрешает числам с плавающей точкой встраивать 30/45-минутное смещение временной зоны. |
| `disabled` | `true` | Отключает модуль `time`. |
| `time_range` | `'-'` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
| Параметр | По умолчанию | Описание |
| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `format` | `'at [$time]($style) '` | The format string for the module. |
| `use_12hr` | `false` | Enables 12 hour formatting |
| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. |
| `style` | `'bold yellow'` | The style for the module time |
| `utc_time_offset` | `'local'` | Sets the UTC offset to use. Range from -24 &lt; x &lt; 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Disables the `time` module. |
| `time_range` | `'-'` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it defaults to `'%T'`. Manually setting `time_format` will override the `use_12hr` setting.
@ -3991,7 +4056,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it de
| Переменная | Пример | Описание |
| ---------- | ---------- | ----------------------------------- |
| время | `13:08:10` | The current time. |
| time | `13:08:10` | The current time. |
| style\* | | Отражает значение параметра `style` |
*: Эта переменная может использоваться только в качестве части строки style
@ -4009,9 +4074,9 @@ utc_time_offset = '-5'
time_range = '10:00:00-14:00:00'
```
## Имя пользователя
## Username
Модуль `username` показывает имя текущего пользователя. Модуль будет показан, если любое из следующих условий соблюдено:
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
- The current user is root/admin
- Текущий пользователь отличается от залогиненного
@ -4026,13 +4091,13 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
### Опции
| Параметр | По умолчанию | Описание |
| ------------- | ----------------------- | ------------------------------------------------------- |
| `style_root` | `'bold red'` | The style used when the user is root/admin. |
| `style_user` | `'bold yellow'` | Стиль, используемый для всех пользователей, кроме root. |
| `format` | `'[$user]($style) in '` | Формат модуля. |
| `show_always` | `false` | Всегда показывать модуль `username`. |
| `disabled` | `false` | Отключает модуль `username`. |
| Параметр | По умолчанию | Описание |
| ------------- | ----------------------- | ------------------------------------------- |
| `style_root` | `'bold red'` | The style used when the user is root/admin. |
| `style_user` | `'bold yellow'` | The style used for non-root users. |
| `format` | `'[$user]($style) in '` | Формат модуля. |
| `show_always` | `false` | Always shows the `username` module. |
| `disabled` | `false` | Disables the `username` module. |
### Переменные
@ -4162,7 +4227,7 @@ format = '[🆅 $repo](bold blue) '
## Zig
By default the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). Модуль будет показан, если любое из следующих условий соблюдено:
By default the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met:
- The current directory contains a `.zig` file
@ -4244,7 +4309,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. |
| `require_repo` | `false` | If `true`, the module will only be shown in paths containing a (git) repository. This option alone is not sufficient display condition in absence of other options. |
| `shell` | | [See below](#custom-command-shell) |
| `описание` | `'<custom module>'` | The description of the module that is shown when running `starship explain`. |
| `description` | `'<custom module>'` | The description of the module that is shown when running `starship explain`. |
| `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. |