diff --git a/docs/ar-SA/advanced-config/README.md b/docs/ar-SA/advanced-config/README.md index 7fd8bfb9..f16f8268 100644 --- a/docs/ar-SA/advanced-config/README.md +++ b/docs/ar-SA/advanced-config/README.md @@ -193,7 +193,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/ar-SA/config/README.md b/docs/ar-SA/config/README.md index fd6bfada..e3a5f380 100644 --- a/docs/ar-SA/config/README.md +++ b/docs/ar-SA/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### Options -| Variable | الافتراضي | الوصف | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'ﴃ '` | The symbol used in the format. | -| `style` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| Variable | الافتراضي | الوصف | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | 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 @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Battery The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. @@ -467,11 +478,11 @@ The `battery` module shows how charged the device's battery is and its current c | Option | الافتراضي | الوصف | | -------------------- | --------------------------------- | --------------------------------------------------- | -| `full_symbol` | `' '` | The symbol shown when the battery is full. | -| `charging_symbol` | `' '` | The symbol shown when the battery is charging. | -| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. | -| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. | -| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. | +| `full_symbol` | `'󰁹 '` | The symbol shown when the battery is full. | +| `charging_symbol` | `'󰂄 '` | The symbol shown when the battery is charging. | +| `discharging_symbol` | `'󰂃 '` | The symbol shown when the battery is discharging. | +| `unknown_symbol` | `'󰁽 '` | The symbol shown when the battery state is unknown. | +| `empty_symbol` | `'󰂎 '` | The symbol shown when the battery state is empty. | | `format` | `'[$symbol$percentage]($style) '` | The format for the module. | | `display` | [link](#battery-display) | Display threshold and style for the module. | | `disabled` | `false` | Disables the `battery` module. | @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Options | Option | الافتراضي | الوصف | @@ -1525,6 +1538,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `gcloud` module. | @@ -1724,6 +1738,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### Variables @@ -1772,6 +1787,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `staged` | `'+'` | The format of `staged` | | `renamed` | `'»'` | The format of `renamed` | | `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | The style for the module. | | `ignore_submodules` | `false` | Ignore changes to submodules. | | `disabled` | `false` | Disables the `git_status` module. | @@ -1792,6 +1808,7 @@ The following variables can be used in `format`: | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -1864,24 +1881,26 @@ The `golang` module shows the currently installed version of [Go](https://golang ### Options -| 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 Go. | -| `detect_extensions` | `['go']` | Which extensions should trigger this module. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | -| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | -| `style` | `'bold cyan'` | The style for the module. | -| `disabled` | `false` | Disables the `golang` module. | +| 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 Go. | +| `detect_extensions` | `['go']` | Which extensions should trigger this module. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | +| `style` | `'bold cyan'` | The style for the module. | +| `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` | Disables the `golang` module. | ### Variables -| Variable | مثال | الوصف | -| --------- | --------- | ------------------------------------ | -| version | `v1.12.1` | The version of `go` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | مثال | الوصف | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` 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 @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Variables -| Variable | مثال | الوصف | -| --------- | ---------- | ------------------------------------ | -| version | `v13.12.0` | The version of `node` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | مثال | الوصف | +| --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3565,7 +3594,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Options + +| 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. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables this module. | + +### Variables + +| Variable | مثال | الوصف | +| --------- | -------- | ------------------------------------ | +| version | `v0.8.1` | The version of `solidity` | +| 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 + +### مثال + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. @@ -4162,7 +4229,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) | -| `description` | `''` | The description of the module that is shown when running `starship explain`. | +| `الوصف` | `''` | 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. | diff --git a/docs/ar-SA/guide/README.md b/docs/ar-SA/guide/README.md index 68b6f4c4..9fe3ee79 100644 --- a/docs/ar-SA/guide/README.md +++ b/docs/ar-SA/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + /> +   + Українська   -### الخطوة الثانية. قم بإعداد ال shell الخاص بك +### الخطوة الثانية. Set up your shell to use Starship لإعداد ال starship قم بإعداد ال shell الخاص بك. اختر ما يناسبك من هذه القائمة: diff --git a/docs/ckb-IR/advanced-config/README.md b/docs/ckb-IR/advanced-config/README.md index 68f03211..9b407722 100644 --- a/docs/ckb-IR/advanced-config/README.md +++ b/docs/ckb-IR/advanced-config/README.md @@ -193,7 +193,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/ckb-IR/config/README.md b/docs/ckb-IR/config/README.md index fd9007ee..2f68e00f 100644 --- a/docs/ckb-IR/config/README.md +++ b/docs/ckb-IR/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### Options -| گۆڕاو | Default | Description | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'ﴃ '` | The symbol used in the format. | -| `style` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| گۆڕاو | Default | Description | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | 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 @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Battery The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. @@ -467,11 +478,11 @@ The `battery` module shows how charged the device's battery is and its current c | Option | Default | Description | | -------------------- | --------------------------------- | --------------------------------------------------- | -| `full_symbol` | `' '` | The symbol shown when the battery is full. | -| `charging_symbol` | `' '` | The symbol shown when the battery is charging. | -| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. | -| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. | -| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. | +| `full_symbol` | `'󰁹 '` | The symbol shown when the battery is full. | +| `charging_symbol` | `'󰂄 '` | The symbol shown when the battery is charging. | +| `discharging_symbol` | `'󰂃 '` | The symbol shown when the battery is discharging. | +| `unknown_symbol` | `'󰁽 '` | The symbol shown when the battery state is unknown. | +| `empty_symbol` | `'󰂎 '` | The symbol shown when the battery state is empty. | | `format` | `'[$symbol$percentage]($style) '` | The format for the module. | | `display` | [link](#battery-display) | Display threshold and style for the module. | | `disabled` | `false` | Disables the `battery` module. | @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Options | Option | Default | Description | @@ -1525,6 +1538,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `gcloud` module. | @@ -1724,6 +1738,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### Variables @@ -1772,6 +1787,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `staged` | `'+'` | The format of `staged` | | `renamed` | `'»'` | The format of `renamed` | | `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | The style for the module. | | `ignore_submodules` | `false` | Ignore changes to submodules. | | `disabled` | `false` | Disables the `git_status` module. | @@ -1792,6 +1808,7 @@ The following variables can be used in `format`: | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -1864,24 +1881,26 @@ The `golang` module shows the currently installed version of [Go](https://golang ### 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` | `'🐹 '` | A format string representing the symbol of Go. | -| `detect_extensions` | `['go']` | Which extensions should trigger this module. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | -| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | -| `style` | `'bold cyan'` | The style for the module. | -| `disabled` | `false` | Disables the `golang` module. | +| 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 Go. | +| `detect_extensions` | `['go']` | Which extensions should trigger this module. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | +| `style` | `'bold cyan'` | The style for the module. | +| `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` | Disables the `golang` module. | ### Variables -| گۆڕاو | نموونە | Description | -| --------- | --------- | ------------------------------------ | -| version | `v1.12.1` | The version of `go` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| گۆڕاو | نموونە | Description | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` 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 @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Variables -| گۆڕاو | نموونە | Description | -| --------- | ---------- | ------------------------------------ | -| version | `v13.12.0` | The version of `node` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| گۆڕاو | نموونە | 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` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3565,7 +3594,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Options + +| 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. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables this module. | + +### Variables + +| گۆڕاو | نموونە | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.8.1` | The version of `solidity` | +| 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 + +### نموونە + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. diff --git a/docs/ckb-IR/guide/README.md b/docs/ckb-IR/guide/README.md index 82f0979b..8fdcb935 100644 --- a/docs/ckb-IR/guide/README.md +++ b/docs/ckb-IR/guide/README.md @@ -108,6 +108,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + /> +   + Українська   -### Step 2. Setup your shell to use Starship +### Step 2. Set up your shell to use Starship Configure your shell to initialize starship. Select yours from the list below: diff --git a/docs/de-DE/advanced-config/README.md b/docs/de-DE/advanced-config/README.md index 8b76a6f4..ff7eb281 100644 --- a/docs/de-DE/advanced-config/README.md +++ b/docs/de-DE/advanced-config/README.md @@ -193,7 +193,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/de-DE/config/README.md b/docs/de-DE/config/README.md index 5b3b17f6..8807560b 100644 --- a/docs/de-DE/config/README.md +++ b/docs/de-DE/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### Optionen -| Variable | Standartwert | Beschreibung | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'ﴃ '` | The symbol used in the format. | -| `style` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| Variable | Standartwert | Beschreibung | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | 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. | ### Beispiele @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Akkustand Das `battery` Modul zeigt, wie hoch der Akku des Geräts geladen ist und den aktuellen Ladestatus. Das Modul ist nur sichtbar, wenn der Akku des Geräts unter 10% geladen ist. @@ -467,11 +478,11 @@ Das `battery` Modul zeigt, wie hoch der Akku des Geräts geladen ist und den akt | Option | Standardwert | Beschreibung | | -------------------- | --------------------------------- | ----------------------------------------------------------------------------------- | -| `full_symbol` | `' '` | Das Symbol das angezeigt wird wenn der Akku voll geladen ist. | -| `charging_symbol` | `' '` | Das Symbol das angezeigt wird wenn der Akku aufgeladen wird. | -| `discharging_symbol` | `' '` | Das Symbol, das angezeigt wird, wenn die Batterie entladen wird. | -| `unknown_symbol` | `' '` | Das Symbol, das angezeigt wird, wenn der Batteriezustand unbekannt ist. | -| `empty_symbol` | `' '` | Das Symbol, das angezeigt wird, wenn die Batterie leer ist. | +| `full_symbol` | `'󰁹 '` | Das Symbol das angezeigt wird wenn der Akku voll geladen ist. | +| `charging_symbol` | `'󰂄 '` | Das Symbol das angezeigt wird wenn der Akku aufgeladen wird. | +| `discharging_symbol` | `'󰂃 '` | Das Symbol, das angezeigt wird, wenn die Batterie entladen wird. | +| `unknown_symbol` | `'󰁽 '` | Das Symbol, das angezeigt wird, wenn der Batteriezustand unbekannt ist. | +| `empty_symbol` | `'󰂎 '` | Das Symbol, das angezeigt wird, wenn die Batterie leer ist. | | `format` | `'[$symbol$percentage]($style) '` | Das Format für das Modul. | | `display` | [link](#battery-display) | Stellt den Grenzwert ein ab dem der Ladezustand (das battery-Modul) angezeigt wird. | | `disabled` | `false` | Wenn der Wert auf `true` steht, wird das Akkustand-Modul deaktiviert. | @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Optionen | Option | Standartwert | Beschreibung | @@ -1525,6 +1538,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `gcloud` module. | @@ -1724,6 +1738,7 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Das Format für das Modul. | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### Variables @@ -1772,6 +1787,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `staged` | `'+'` | The format of `staged` | | `renamed` | `'»'` | The format of `renamed` | | `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | Stil für dieses Modul. | | `ignore_submodules` | `false` | Ignore changes to submodules. | | `disabled` | `false` | Deaktiviert das `git_status`-Modul. | @@ -1792,6 +1808,7 @@ The following variables can be used in `format`: | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Spiegelt den Wert der Option `style` | *: This variable can only be used as a part of a style string @@ -1864,24 +1881,26 @@ The `golang` module shows the currently installed version of [Go](https://golang ### Optionen -| Option | Standartwert | Beschreibung | -| ------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `'🐹 '` | A format string representing the symbol of Go. | -| `detect_extensions` | `['go']` | Which extensions should trigger this module. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | -| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | -| `style` | `'bold cyan'` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `golang`-Modul. | +| Option | Standartwert | Beschreibung | +| ------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | Das Format für das Modul. | +| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `'🐹 '` | A format string representing the symbol of Go. | +| `detect_extensions` | `['go']` | Which extensions should trigger this module. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | +| `style` | `'bold cyan'` | Stil für dieses Modul. | +| `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` | Deaktiviert das `golang`-Modul. | ### Variables -| Variable | Beispiel | Beschreibung | -| --------- | --------- | ------------------------------------- | -| version | `v1.12.1` | The version of `go` | -| symbol | | Spiegelt den Wert der Option `symbol` | -| style\* | | Spiegelt den Wert der Option `style` | +| Variable | Beispiel | Beschreibung | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` version. | +| symbol | | Spiegelt den Wert der Option `symbol` | +| style\* | | Spiegelt den Wert der Option `style` | *: This variable can only be used as a part of a style string @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Variables -| Variable | Beispiel | Beschreibung | -| --------- | ---------- | ------------------------------------- | -| version | `v13.12.0` | The version of `node` | -| symbol | | Spiegelt den Wert der Option `symbol` | -| style\* | | Spiegelt den Wert der Option `style` | +| Variable | Beispiel | Beschreibung | +| --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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 | | Spiegelt den Wert der Option `symbol` | +| style\* | | Spiegelt den Wert der Option `style` | *: This variable can only be used as a part of a style string @@ -3565,7 +3594,7 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Optionen + +| Option | Standartwert | Beschreibung | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | +| `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"` | Stil für dieses Modul. | +| `disabled` | `false` | Disables this module. | + +### Variables + +| Variable | Beispiel | Beschreibung | +| --------- | -------- | ------------------------------------- | +| version | `v0.8.1` | The version of `solidity` | +| symbol | | Spiegelt den Wert der Option `symbol` | +| style\* | | Spiegelt den Wert der Option `style` | + +*: This variable can only be used as a part of a style string + +### Beispiel + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. @@ -4162,7 +4229,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) | -| `description` | `''` | The description of the module that is shown when running `starship explain`. | +| `beschreibung` | `''` | 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. | diff --git a/docs/de-DE/guide/README.md b/docs/de-DE/guide/README.md index 213001e8..1655e69b 100644 --- a/docs/de-DE/guide/README.md +++ b/docs/de-DE/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + /> +   + Українська   -### Schritt 2. Richte deine Shell für die Nutzung von Starship ein +### Schritt 2. Set up your shell to use Starship Konfigurieren deine Shell um Starship zu initialisieren. Wähle dafür deine Shell aus der Liste aus: diff --git a/docs/es-ES/advanced-config/README.md b/docs/es-ES/advanced-config/README.md index 90a4ed0d..5fbe8ab3 100644 --- a/docs/es-ES/advanced-config/README.md +++ b/docs/es-ES/advanced-config/README.md @@ -193,7 +193,7 @@ También puede establecer una salida similar con PowerShell creando una función ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/es-ES/config/README.md b/docs/es-ES/config/README.md index 55e8b282..cc432264 100644 --- a/docs/es-ES/config/README.md +++ b/docs/es-ES/config/README.md @@ -78,7 +78,7 @@ In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared wit The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. -| Symbol | Type | Notes | +| Symbol | Tipo | Notas | | ------ | ------------------------- | ------------------------------------------------------ | | `'` | literal string | less escaping | | `"` | string | more escaping | @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' El módulo `aws` muestra la región y el perfil actual de AWS y un temporizador de vencimiento cuando se utilizan credenciales temporales. La salida del módulo utiliza las variables de entorno `AWS_REGION`, `AWS_DEFAULT_REGION` y `AWS_PROFILE`, y los archivos `~/. ws/config` y `~/.aws/credenciales` según sea necesario. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. Cuando se utiliza [aws-vault](https://github.com/99designs/aws-vault), el perfil se obtiene de la variable de entorno `AWS_VAULT` y la fecha de expiración de credenciales se obtiene de la variable de entorno `AWS_SESSION_EXPIRATION`. @@ -426,12 +427,13 @@ El módulo `azure` muestra la suscripción Azure actual. This is based on showin ### Opciones -| Variable | Predeterminado | Descripción | -| ---------- | ---------------------------------------- | ------------------------------------------- | -| `format` | `'on [$symbol($subscription)]($style) '` | El formato para renderizar el módulo Azure. | -| `symbol` | `'ﴃ '` | El símbolo utilizado en el formato. | -| `style` | `'blue bold'` | El estilo utilizado en el formato. | -| `disabled` | `true` | Deshabilita el módulo `azure`. | +| Variable | Predeterminado | Descripción | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | El formato para renderizar el módulo Azure. | +| `symbol` | `'󰠅 '` | El símbolo utilizado en el formato. | +| `style` | `'blue bold'` | El estilo utilizado en el formato. | +| `disabled` | `true` | Deshabilita el módulo `azure`. | +| `subscription_aliases` | `{}` | Table of subscription name aliases to display in addition to Azure subscription name. | ### Ejemplos @@ -443,7 +445,7 @@ El módulo `azure` muestra la suscripción Azure actual. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Battery El módulo `battery` muestra la cantidad de batería y si se está cargando o no. El módulo solamente es visible cuando la batería del dispositivo está por debajo del 10%. @@ -467,11 +478,11 @@ El módulo `battery` muestra la cantidad de batería y si se está cargando o no | Opción | Predeterminado | Descripción | | -------------------- | --------------------------------- | ------------------------------------------------------------------------ | -| `full_symbol` | `' '` | Se muestra cuando la batería está cargada. | -| `charging_symbol` | `' '` | Se muestra cuando la batería se está cargando. | -| `discharging_symbol` | `' '` | Se muestra cuando la batería se está descargando. | -| `unknown_symbol` | `' '` | El símbolo que se muestra cuando el estado de la batería es desconocido. | -| `empty_symbol` | `' '` | El símbolo que se muestra cuando el estado de la batería está vacío. | +| `full_symbol` | `'󰁹 '` | Se muestra cuando la batería está cargada. | +| `charging_symbol` | `'󰂄 '` | Se muestra cuando la batería se está cargando. | +| `discharging_symbol` | `'󰂃 '` | Se muestra cuando la batería se está descargando. | +| `unknown_symbol` | `'󰁽 '` | El símbolo que se muestra cuando el estado de la batería es desconocido. | +| `empty_symbol` | `'󰂎 '` | El símbolo que se muestra cuando el estado de la batería está vacío. | | `format` | `'[$symbol$percentage]($style) '` | El formato del módulo. | | `display` | [ver aquí](#battery-display) | Define cuándo mostrar el indicador y el estilo. | | `disabled` | `false` | Desactiva el módulo `battery`. | @@ -1336,7 +1347,7 @@ default = 'unknown user' | `variable` | | La variable de entorno a mostrar. | | `default` | | El valor por defecto que se mostrará cuando la variable seleccionada no está definida. | | `format` | `"con [$env_value]($style) "` | El formato del módulo. | -| `descripción` | `""` | La descripción del módulo que se muestra al ejecutar `starship explain`. | +| `description` | `""` | La descripción del módulo que se muestra al ejecutar `starship explain`. | | `disabled` | `false` | Deshabilita el módulo `env_var`. | ### Variables @@ -1517,6 +1528,8 @@ truncation_symbol = '' El módulo `gcloud` muestra la configuración actual para el CLI de [`gcloud`](https://cloud.google.com/sdk/gcloud). Esto se basa en el archivo `~/.config/gcloud/active_config`, el archivo `~/.config/gcloud/configurations/config_{CONFIG NAME}` y la variable de entorno `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. + ### Opciones | Opción | Predeterminado | Descripción | @@ -1525,6 +1538,7 @@ El módulo `gcloud` muestra la configuración actual para el CLI de [`gcloud`](h | `symbol` | `'☁️ '` | El símbolo usado antes de mostrar el perfil actual de GCP. | | `region_aliases` | `{}` | Tabla de alias de región a mostrar además del nombre GCP. | | `project_aliases` | `{}` | Tabla de alias del proyecto a mostrar además del nombre GCP. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | El estilo del módulo. | | `disabled` | `false` | Deshabilita el módulo `gcloud`. | @@ -1724,6 +1738,7 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable | `only_nonzero_diffs` | `true` | Mostrar sólo el estado de los elementos cambiados. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | El formato del módulo. | | `disabled` | `true` | Deshabilita el módulo `git_metrics`. | +| `ignore_submodules` | `false` | Ignorar cambios a los submódulos | ### Variables @@ -1772,6 +1787,7 @@ El módulo Git Status es muy lento en los directorios de Windows (por ejemplo ba | `staged` | `'+'` | El formato de `staged` | | `renamed` | `'»'` | El formato de `renamed` | | `borrado` | `'✘'` | El formato de `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | El estilo del módulo. | | `ignore_submodules` | `false` | Ignorar cambios a los submódulos. | | `disabled` | `false` | Deshabilita el módulo `git_status`. | @@ -1792,6 +1808,7 @@ Las siguientes variables se pueden utilizar en `format`: | `staged` | Muestra `staged` cuando se ha añadido un nuevo archivo al área de preparación. | | `renamed` | Muestra `renamed` cuando un archivo renombrado ha sido añadido al área de preparación. | | `borrado` | Muestra `deleted` cuando un archivo ha sido añadido al área de preparación. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Refleja el valor de la opción `style` | *: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo @@ -1864,24 +1881,26 @@ El módulo `golang` muestra la versión instalada de [Go](https://golang.org/). ### 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` | `'🐹 '` | Una cadena de formato que representa el símbolo de Go. | -| `detect_extensions` | `['go']` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `['Godeps']` | Qué carpetas deberían activar este módulo. | -| `style` | `'bold cyan'` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo de `golang`. | +| 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` | `'🐹 '` | Una cadena de formato que representa el símbolo de Go. | +| `detect_extensions` | `['go']` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `['Godeps']` | Qué carpetas deberían activar este módulo. | +| `style` | `'bold cyan'` | El estilo del módulo. | +| `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` | Deshabilita el módulo de `golang`. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | --------- | -------------------------------------- | -| version | `v1.12.1` | La versión de `go` | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | La versión de `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` 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 @@ -1894,6 +1913,15 @@ El módulo `golang` muestra la versión instalada de [Go](https://golang.org/). format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ El módulo `nodejs` muestra la versión instalada de [Node.js](https://nodejs.or ### Variables -| Variable | Ejemplo | Descripción | -| --------- | ---------- | -------------------------------------- | -| version | `v13.12.0` | La versión de `node` | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v13.12.0` | La versión de `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 | | 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 @@ -3565,7 +3594,7 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ El módulo `singularity` muestra la imagen de [singularity](https://sylabs.io/si format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Opciones + +| 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. | +| `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. | +| `disabled` | `false` | Disables this module. | + +### Variables + +| Variable | Ejemplo | Descripción | +| --------- | -------- | -------------------------------------- | +| version | `v0.8.1` | The version of `solidity` | +| 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 + +### Ejemplo + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack El módulo `spack` muestra el entorno actual [Spack](https://spack.readthedocs.io/en/latest/), si `$SPACK_ENV` está configurado. @@ -3707,7 +3774,7 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable | Variable | Ejemplo | Descripción | | -------------- | ------- | ------------------------------------------------------------------------------------------ | -| status | `127` | El código de salida del último comando | +| estado | `127` | El código de salida del último comando | | hex_status | `0x7F` | El código de salida del último comando en hexadecimal | | int | `127` | El código de salida del último comando | | common_meaning | `ERROR` | Comprobación del código si no es una señal | @@ -4156,23 +4223,23 @@ Las cadenas de formato también pueden contener secuencias específicas del int ### Opciones -| Opción | Predeterminado | Descripción | -| ------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `comando` | `''` | El comando cuya salida debe ser impresa. El comando se pasará en stdin al intérprete de comandos. | -| `cuando` | `false` | Valor booleano (`true` o `false`, sin comillas) o un comando de shell usado como una condición para mostrar el módulo. En caso de una cadena, el módulo se mostrará si el comando devuelve un código de estado `0`. | -| `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` | | [Ver a continuación](#custom-command-shell) | -| `descripción` | `''` | La descripción del módulo que se muestra al ejecutar `starship explain`. | -| `detect_files` | `[]` | Los archivos que se buscarán en el directorio de trabajo para obtener una coincidencia. | -| `detect_folders` | `[]` | Los directorios que se buscarán en el directorio de trabajo para una coincidencia. | -| `detect_extensions` | `[]` | Las extensiones que se buscarán en el directorio de trabajo para obtener una coincidencia. | -| `symbol` | `''` | El símbolo usado antes de mostrar la salida del comando. | -| `style` | `'bold green'` | El estilo del módulo. | -| `format` | `'[$symbol($output )]($style)'` | El formato del módulo. | -| `disabled` | `false` | Deshabilita este módulo `custom`. | -| `os` | | Nombre del sistema operativo en el que se mostrará el módulo (unix, linux, macos, windows, ... ) [Ver valores posibles](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | -| `use_stdin` | | Un valor booleano opcional que anula si los comandos deben ser reenviados al shell a través de la entrada estándar o como argumento. Si la entrada estándar unset es usada de manera predeterminada, a menos que el shell no lo soporte (cmd, nushell). Configurar esto desactiva el manejo de argumentos específicos del shell. | -| `ignore_timeout` | `false` | Ignorar la configuración global de `command_timeout` y seguir ejecutando comandos externos, sin importar el tiempo que tarden. | +| Opción | Predeterminado | Descripción | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `comando` | `''` | El comando cuya salida debe ser impresa. El comando se pasará en stdin al intérprete de comandos. | +| `cuando` | `false` | Valor booleano (`true` o `false`, sin comillas) o un comando de shell usado como una condición para mostrar el módulo. En caso de una cadena, el módulo se mostrará si el comando devuelve un código de estado `0`. | +| `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` | | [Ver a continuación](#custom-command-shell) | +| `description` | `''` | La descripción del módulo que se muestra al ejecutar `starship explain`. | +| `detect_files` | `[]` | Los archivos que se buscarán en el directorio de trabajo para obtener una coincidencia. | +| `detect_folders` | `[]` | Los directorios que se buscarán en el directorio de trabajo para una coincidencia. | +| `detect_extensions` | `[]` | Las extensiones que se buscarán en el directorio de trabajo para obtener una coincidencia. | +| `symbol` | `''` | El símbolo usado antes de mostrar la salida del comando. | +| `style` | `'bold green'` | El estilo del módulo. | +| `format` | `'[$symbol($output )]($style)'` | El formato del módulo. | +| `disabled` | `false` | Deshabilita este módulo `custom`. | +| `os` | | Nombre del sistema operativo en el que se mostrará el módulo (unix, linux, macos, windows, ... ) [Ver valores posibles](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | +| `use_stdin` | | Un valor booleano opcional que anula si los comandos deben ser reenviados al shell a través de la entrada estándar o como argumento. Si la entrada estándar unset es usada de manera predeterminada, a menos que el shell no lo soporte (cmd, nushell). Configurar esto desactiva el manejo de argumentos específicos del shell. | +| `ignore_timeout` | `false` | Ignorar la configuración global de `command_timeout` y seguir ejecutando comandos externos, sin importar el tiempo que tarden. | ### Variables diff --git a/docs/es-ES/guide/README.md b/docs/es-ES/guide/README.md index ec33d80b..1eaefb08 100644 --- a/docs/es-ES/guide/README.md +++ b/docs/es-ES/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + /> +   + Українська   Tiếng Việt   简体中文   繁體中文

@@ -263,7 +271,7 @@ Instalar Starship usando cualquiera de los siguientes gestores de paquetes: -### Paso 2. Configura tu shell para usar Starship +### Paso 2. Set up your shell to use Starship Configure su shell para inicializar starship. Selecciona el tuyo de la lista de abajo: diff --git a/docs/fr-FR/advanced-config/README.md b/docs/fr-FR/advanced-config/README.md index 526a78a3..bb090d08 100644 --- a/docs/fr-FR/advanced-config/README.md +++ b/docs/fr-FR/advanced-config/README.md @@ -193,7 +193,7 @@ Vous pouvez également faire la même chose avec PowerShell en créant une fonct ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/fr-FR/config/README.md b/docs/fr-FR/config/README.md index 595067f2..8e9a17b4 100644 --- a/docs/fr-FR/config/README.md +++ b/docs/fr-FR/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. Lorsque vous utilisez [aws-vault](https://github.com/99designs/aws-vault) le profil est lu à partir de la variable d'environnement `AWS_VAULT` et la date d'expiration des identifiants est lue à partir de la variable d'environnement `AWS_SESSION_EXPIRATION`. @@ -426,12 +427,13 @@ Le module `azure` affiche l'abonnement Azure actuel. This is based on showing th ### Options -| Variable | Défaut | Description | -| ---------- | ---------------------------------------- | ---------------------------------------- | -| `format` | `'on [$symbol($subscription)]($style) '` | Le format pour le rendu du module Azure. | -| `symbole` | `'ﴃ '` | Le symbole utilisé dans le format. | -| `style` | `'blue bold'` | Le style utilisé dans le format. | -| `disabled` | `true` | Désactive le module `azure`. | +| Variable | Défaut | Description | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | Le format pour le rendu du module Azure. | +| `symbole` | `'󰠅 '` | Le symbole utilisé dans le format. | +| `style` | `'blue bold'` | Le style utilisé dans le format. | +| `disabled` | `true` | Désactive le module `azure`. | +| `subscription_aliases` | `{}` | Table of subscription name aliases to display in addition to Azure subscription name. | ### Exemples @@ -443,7 +445,7 @@ Le module `azure` affiche l'abonnement Azure actuel. This is based on showing th [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Battery Le module `battery` montre à quel point la batterie de l'appareil est chargée et son état de charge actuel. Ce module n'est visible que lorsque la batterie de l'appareil est inférieure à 10%. @@ -467,11 +478,11 @@ Le module `battery` montre à quel point la batterie de l'appareil est chargée | Option | Défaut | Description | | -------------------- | --------------------------------- | ------------------------------------------------------------- | -| `full_symbol` | `' '` | Le symbole affiché lorsque la batterie est pleine. | -| `charging_symbol` | `' '` | Le symbole affiché lorsque la batterie se charge. | -| `discharging_symbol` | `' '` | Le symbole affiché lorsque la batterie se décharge. | -| `unknown_symbol` | `' '` | Le symbole affiché lorsque l'état de la batterie est inconnu. | -| `empty_symbol` | `' '` | Le symbole affiché lorsque la batterie est vide. | +| `full_symbol` | `'󰁹 '` | Le symbole affiché lorsque la batterie est pleine. | +| `charging_symbol` | `'󰂄 '` | Le symbole affiché lorsque la batterie se charge. | +| `discharging_symbol` | `'󰂃 '` | Le symbole affiché lorsque la batterie se décharge. | +| `unknown_symbol` | `'󰁽 '` | Le symbole affiché lorsque l'état de la batterie est inconnu. | +| `empty_symbol` | `'󰂎 '` | Le symbole affiché lorsque la batterie est vide. | | `format` | `'[$symbol$percentage]($style) '` | Format du module. | | `display` | [lien](#battery-display) | Affiche le seuil et le style du module. | | `disabled` | `false` | Désactive le module `battery`. | @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Options | Option | Défaut | Description | @@ -1525,6 +1538,7 @@ Le module `gcloud` affiche la version de la commande [`gcloud`](https://cloud.go | `symbole` | `'☁️ '` | Le symbole affiché avant le profil GCP actuel. | | `region_aliases` | `{}` | Table des alias de région à afficher en plus du nom du GCP. | | `project_aliases` | `{}` | Table des alias de projet à afficher en plus du nom du GCP. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | Le style pour le module. | | `disabled` | `false` | Désactive le module `gcloud`. | @@ -1724,6 +1738,7 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur | `only_nonzero_diffs` | `true` | Afficher le statut seulement pour les items modifiés. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Format du module. | | `disabled` | `true` | Désactive le module `git_metrics`. | +| `ignore_submodules` | `false` | Ignorer les changements des sous-modules | ### Variables @@ -1772,6 +1787,7 @@ Le module Statut Git est très lent dans les dossiers Windows (par exemple sous | `staged` | `'+'` | Le format de `staged` | | `renamed` | `'»'` | Le format de `renamed` | | `deleted` | `'✘'` | Le format de `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | Le style pour le module. | | `ignore_submodules` | `false` | Ignorer les changements des sous-modules. | | `disabled` | `false` | Désactive le module `git_status`. | @@ -1792,6 +1808,7 @@ Les variables suivantes peuvent être utilisées pour la valeur de `format`: | `staged` | Affiche `staged` lorsqu'un nouveau fichier a été ajouté à la zone de validation. | | `renamed` | Affiche `renamed` lorsqu'un fichier renommé a été ajouté à la zone de validation. | | `deleted` | Affiche `deleted` lorsque la suppression d'un fichier a été ajoutée à la zone de validation. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Reflète la valeur de l'option `style` | *: Cette variable peut uniquement être utilisée dans une chaine de style @@ -1864,24 +1881,26 @@ Le module `golang` affiche la version de [Go](https://golang.org/) installée. P ### 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` | `'🐹 '` | Une chaîne de caractères représentant le symbole de Go. | -| `detect_extensionsdetect_extensions` | `['go']` | Les extensions qui déclenchent ce module. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Les fichiers qui activent ce module. | -| `detect_folders` | `['Godeps']` | Les dossiers qui activent ce module. | -| `style` | `'bold cyan'` | Le style pour le module. | -| `disabled` | `false` | Désactive le module `golang`. | +| 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` | `'🐹 '` | Une chaîne de caractères représentant le symbole de Go. | +| `detect_extensionsdetect_extensions` | `['go']` | Les extensions qui déclenchent ce module. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Les fichiers qui activent ce module. | +| `detect_folders` | `['Godeps']` | Les dossiers qui activent ce module. | +| `style` | `'bold cyan'` | Le style pour le module. | +| `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` | Désactive le module `golang`. | ### Variables -| Variable | Exemple | Description | -| --------- | --------- | -------------------------------------- | -| version | `v1.12.1` | La version de `go` | -| symbole | | Reflète la valeur de l'option `symbol` | -| style\* | | Reflète la valeur de l'option `style` | +| Variable | Exemple | Description | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | La version de `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` 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 @@ -1894,6 +1913,15 @@ Le module `golang` affiche la version de [Go](https://golang.org/) installée. P format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ Le module `nodejs` affiche la version de [Node.js](https://nodejs.org/) install ### Variables -| Variable | Exemple | Description | -| --------- | ---------- | -------------------------------------- | -| version | `v13.12.0` | La version de `node` | -| symbole | | Reflète la valeur de l'option `symbol` | -| style\* | | Reflète la valeur de l'option `style` | +| Variable | Exemple | Description | +| --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v13.12.0` | La version de `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. | +| 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 @@ -3566,7 +3595,7 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3641,6 +3670,44 @@ Le module `singularity` affiche l’image [Singularity](https://sylabs.io/singul format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Options + +| 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. | +| `detect_files` | `[]` | Les fichiers qui activent ce module. | +| `detect_folders` | `[]` | Les dossiers qui activent ce module. | +| `style` | `"bold blue"` | Le style pour le module. | +| `disabled` | `false` | Disables this module. | + +### Variables + +| Variable | Exemple | Description | +| --------- | -------- | -------------------------------------- | +| version | `v0.8.1` | The version of `solidity` | +| 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 + +### Exemple + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack Le module `spack` affiche l’environnement [Spack](https://spack.readthedocs.io/en/latest/) courant, si `$SPACK_ENV` est définie. diff --git a/docs/fr-FR/guide/README.md b/docs/fr-FR/guide/README.md index 0fb49222..8469b3d2 100644 --- a/docs/fr-FR/guide/README.md +++ b/docs/fr-FR/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + /> +   + Українська   -### Étape 2. Configurer votre shell pour Starship +### Étape 2. Set up your shell to use Starship Configurez votre shell pour initialiser starship. Sélectionnez le vôtre dans la liste ci-dessous: diff --git a/docs/id-ID/README.md b/docs/id-ID/README.md index e6226e9c..5a5ab978 100644 --- a/docs/id-ID/README.md +++ b/docs/id-ID/README.md @@ -10,7 +10,7 @@ features: title: Kompatibilitas Yang Utama details: Dapat berfungsi di shells standar dengan sistem operasi yang paling biasa. Pakai di mana saja! - - title: Dibangun Dengan Rust + title: Dibuat dengan Rust details: Menggunakan kecepatan dan keamanan dari Rust, untuk membuat prompt kamu bekerja secepat dan seandal mungkin. - title: Dapat Dikustomisasi diff --git a/docs/id-ID/advanced-config/README.md b/docs/id-ID/advanced-config/README.md index a36ced53..0bafc8d5 100644 --- a/docs/id-ID/advanced-config/README.md +++ b/docs/id-ID/advanced-config/README.md @@ -193,7 +193,7 @@ Kamu juga dapat mengatur keluaran yang sama dengan PowerShell dengan membuat seb ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/id-ID/config/README.md b/docs/id-ID/config/README.md index 16351107..44ef32b0 100644 --- a/docs/id-ID/config/README.md +++ b/docs/id-ID/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. Ketika menggunakan [aws-vault](https://github.com/99designs/aws-vault), profil dibaca dari variabel environment `AWS_VAULT` dan tanggal kedaluwarsanya dibaca dari variabel environment `AWS_SESSION_EXPIRATION`. @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### Opsi -| Variabel | Bawaan | Deskripsi | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'ﴃ '` | The symbol used in the format. | -| `style` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| Variabel | Bawaan | Deskripsi | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | 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. | ### Contoh @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Baterai Modul `battery` menampilkan seberapa penuh baterai perangkat terisi dan status pengisiannya. Modulnya hanya dapat terlihat ketika baterai perangkat di bawah 10%. @@ -467,11 +478,11 @@ Modul `battery` menampilkan seberapa penuh baterai perangkat terisi dan status p | Opsi | Bawaan | Deskripsi | | -------------------- | --------------------------------- | --------------------------------------------------------- | -| `full_symbol` | `' '` | Simbol dimunculkan ketika baterai penuh. | -| `charging_symbol` | `' '` | Simbol dimunculkan ketika baterai mengisi. | -| `discharging_symbol` | `' '` | Simbol dimunculkan ketika baterai terpakai. | -| `unknown_symbol` | `' '` | Simbol dimunculkan ketika keadaan baterai tidak dikenali. | -| `empty_symbol` | `' '` | Simbol dimunculkan ketika keadaan baterai kosong. | +| `full_symbol` | `'󰁹 '` | Simbol dimunculkan ketika baterai penuh. | +| `charging_symbol` | `'󰂄 '` | Simbol dimunculkan ketika baterai mengisi. | +| `discharging_symbol` | `'󰂃 '` | Simbol dimunculkan ketika baterai terpakai. | +| `unknown_symbol` | `'󰁽 '` | Simbol dimunculkan ketika keadaan baterai tidak dikenali. | +| `empty_symbol` | `'󰂎 '` | Simbol dimunculkan ketika keadaan baterai kosong. | | `format` | `'[$symbol$percentage]($style) '` | Format dari modul. | | `display` | [link](#battery-display) | Menampilkan ambang dan gaya dari modul. | | `disabled` | `false` | Menonaktifkan modul `baterai`. | @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Opsi | Opsi | Bawaan | Deskripsi | @@ -1525,6 +1538,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `gcloud` module. | @@ -1724,6 +1738,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `fromat` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Format dari modul. | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### Variabel @@ -1772,6 +1787,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `staged` | `'+'` | The format of `staged` | | `renamed` | `'»'` | The format of `renamed` | | `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | Gaya penataan untuk modul. | | `ignore_submodules` | `false` | Ignore changes to submodules. | | `disabled` | `false` | Disables the `git_status` module. | @@ -1792,6 +1808,7 @@ The following variables can be used in `format`: | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Menyalin nilai dari opsi `style` | *: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string @@ -1864,24 +1881,26 @@ The `golang` module shows the currently installed version of [Go](https://golang ### Opsi -| 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 Go. | -| `detect_extensions` | `['go']` | Ekstensi mana yang sebaiknya memicu modul ini. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | filenames mana yang sebaiknya memicu modul ini. | -| `detect_folders` | `['Godeps']` | Folder mana yang sebaiknya memicul modul ini. | -| `style` | `'bold cyan'` | Gaya penataan untuk modul. | -| `disabled` | `false` | Disables the `golang` module. | +| 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 Go. | +| `detect_extensions` | `['go']` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | filenames mana yang sebaiknya memicu modul ini. | +| `detect_folders` | `['Godeps']` | Folder mana yang sebaiknya memicul modul ini. | +| `style` | `'bold cyan'` | Gaya penataan untuk modul. | +| `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` | Disables the `golang` module. | ### Variabel -| Variabel | Contoh | Deskripsi | -| --------- | --------- | --------------------------------- | -| version | `v1.12.1` | The version of `go` | -| symbol | | Menyalin nilai dari opsi `symbol` | -| style\* | | Menyalin nilai dari opsi `style` | +| Variabel | Contoh | Deskripsi | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` version. | +| symbol | | Menyalin nilai dari opsi `symbol` | +| style\* | | Menyalin nilai dari opsi `style` | *: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Variabel -| Variabel | Contoh | Deskripsi | -| --------- | ---------- | --------------------------------- | -| version | `v13.12.0` | The version of `node` | -| symbol | | Menyalin nilai dari opsi `symbol` | -| style\* | | Menyalin nilai dari opsi `style` | +| Variabel | Contoh | Deskripsi | +| --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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 | | Menyalin nilai dari opsi `symbol` | +| style\* | | Menyalin nilai dari opsi `style` | *: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string @@ -3565,7 +3594,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Opsi + +| 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. | +| `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. | +| `disabled` | `false` | Disables this module. | + +### Variabel + +| Variabel | Contoh | Deskripsi | +| --------- | -------- | --------------------------------- | +| version | `v0.8.1` | The version of `solidity` | +| symbol | | Menyalin nilai dari opsi `symbol` | +| style\* | | Menyalin nilai dari opsi `style` | + +*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string + +### Contoh + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. @@ -4162,7 +4229,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) | -| `description` | `''` | The description of the module that is shown when running `starship explain`. | +| `deskripsi` | `''` | 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. | diff --git a/docs/id-ID/guide/README.md b/docs/id-ID/guide/README.md index 0a997465..be5b2fcf 100644 --- a/docs/id-ID/guide/README.md +++ b/docs/id-ID/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + /> +   + Українська   -### Langkah 2. Setup your shell to use Starship +### Langkah 2. Set up your shell to use Starship Configure your shell to initialize starship. Select yours from the list below: diff --git a/docs/it-IT/advanced-config/README.md b/docs/it-IT/advanced-config/README.md index d902e7e6..223ec1d8 100644 --- a/docs/it-IT/advanced-config/README.md +++ b/docs/it-IT/advanced-config/README.md @@ -193,7 +193,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/it-IT/config/README.md b/docs/it-IT/config/README.md index 6816e28f..e8e8876b 100644 --- a/docs/it-IT/config/README.md +++ b/docs/it-IT/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### Opzioni -| Variable | Default | Descrizione | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'ﴃ '` | The symbol used in the format. | -| `style` | `'blu grassetto'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| Variable | Default | Descrizione | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | The symbol used in the format. | +| `style` | `'blu grassetto'` | 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 @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Battery The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. @@ -467,11 +478,11 @@ The `battery` module shows how charged the device's battery is and its current c | Opzione | Default | Descrizione | | -------------------- | --------------------------------- | --------------------------------------------------- | -| `full_symbol` | `' '` | The symbol shown when the battery is full. | -| `charging_symbol` | `' '` | The symbol shown when the battery is charging. | -| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. | -| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. | -| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. | +| `full_symbol` | `'󰁹 '` | The symbol shown when the battery is full. | +| `charging_symbol` | `'󰂄 '` | The symbol shown when the battery is charging. | +| `discharging_symbol` | `'󰂃 '` | The symbol shown when the battery is discharging. | +| `unknown_symbol` | `'󰁽 '` | The symbol shown when the battery state is unknown. | +| `empty_symbol` | `'󰂎 '` | The symbol shown when the battery state is empty. | | `format` | `'[$symbol$percentage]($style) '` | The format for the module. | | `display` | [link](#battery-display) | Display threshold and style for the module. | | `disabled` | `false` | Disables the `battery` module. | @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Opzioni | Opzione | Default | Descrizione | @@ -1525,6 +1538,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | Lo stile per il modulo. | | `disabled` | `false` | Disables the `gcloud` module. | @@ -1724,6 +1738,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### Variables @@ -1772,6 +1787,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `staged` | `'+'` | The format of `staged` | | `renamed` | `'»'` | The format of `renamed` | | `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | Lo stile per il modulo. | | `ignore_submodules` | `false` | Ignore changes to submodules. | | `disabled` | `false` | Disables the `git_status` module. | @@ -1792,6 +1808,7 @@ The following variables can be used in `format`: | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -1864,24 +1881,26 @@ The `golang` module shows the currently installed version of [Go](https://golang ### 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` | `'🐹 '` | A format string representing the symbol of Go. | -| `detect_extensions` | `['go']` | Quali estensioni dovrebbero attivare questo modulo. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Quali nomi di file dovrebbero attivare questo modulo. | -| `detect_folders` | `['Godeps']` | Quali cartelle dovrebbero attivare questo modulo. | -| `style` | `'bold cyan'` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `golang` module. | +| 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 Go. | +| `detect_extensions` | `['go']` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `['Godeps']` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `'bold cyan'` | Lo stile per il modulo. | +| `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` | Disables the `golang` module. | ### Variables -| Variable | Esempio | Descrizione | -| --------- | --------- | ------------------------------------ | -| version | `v1.12.1` | The version of `go` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Esempio | Descrizione | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` 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 @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Variables -| Variable | Esempio | Descrizione | -| --------- | ---------- | ------------------------------------ | -| version | `v13.12.0` | The version of `node` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Esempio | Descrizione | +| --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3565,7 +3594,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Opzioni + +| 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. | +| `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. | +| `disabled` | `false` | Disables this module. | + +### Variables + +| Variable | Esempio | Descrizione | +| --------- | -------- | ------------------------------------ | +| version | `v0.8.1` | The version of `solidity` | +| 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 + +### Esempio + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. @@ -4162,7 +4229,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) | -| `description` | `''` | The description of the module that is shown when running `starship explain`. | +| `descrizione` | `''` | 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. | diff --git a/docs/it-IT/guide/README.md b/docs/it-IT/guide/README.md index ba9f6b60..da9759ab 100644 --- a/docs/it-IT/guide/README.md +++ b/docs/it-IT/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Russo" + /> +   + Українська   -### Fase 2. Imposta la tua shell a utilizzare Starship +### Fase 2. Set up your shell to use Starship Configura la shell a inizializzare Starship. Seleziona la tua dalla lista qui sotto: diff --git a/docs/ja-JP/advanced-config/README.md b/docs/ja-JP/advanced-config/README.md index ee727496..77256793 100644 --- a/docs/ja-JP/advanced-config/README.md +++ b/docs/ja-JP/advanced-config/README.md @@ -193,7 +193,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/ja-JP/config/README.md b/docs/ja-JP/config/README.md index 0e441800..d2237e12 100644 --- a/docs/ja-JP/config/README.md +++ b/docs/ja-JP/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' `aws`モジュールは、一時的な資格情報を使用する場合、現在のAWSリージョンとプロファイル、および有効期限タイマーを表示します。 モジュールの出力は、必要に応じて`AWS_REGION`、`AWS_DEFAULT_REGION`と`AWS_PROFILE`の環境変数と、`~/.aws/config`と`~/.aws/credentials`のファイルが使用されます。 -モジュールは、資格情報が`~/.aws/credentials`にある場合、または`~/.aws/config`に`credential_process`または`sso_start_url`が定義されている場合にのみプロファイルを表示します。 あるいは、環境変数に`AWS_ACCESS_KEY_ID`、`AWS_SECRET_ACCESS_KEY`または`AWS_SESSION_TOKEN`のいずれかが定義されていれば条件を満たします。 もし`force_display`のオプションを`true`に設定した場合、上記の条件による資格情報が検出されない場合でも、利用可能なすべての情報が表示されます。 +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. あるいは、環境変数に`AWS_ACCESS_KEY_ID`、`AWS_SECRET_ACCESS_KEY`または`AWS_SESSION_TOKEN`のいずれかが定義されていれば条件を満たします。 もし`force_display`のオプションを`true`に設定した場合、上記の条件による資格情報が検出されない場合でも、利用可能なすべての情報が表示されます。 [aws-vault](https://github.com/99designs/aws-vault)を使う場合、環境変数`AWS_VAULT`からプロファイルが、環境変数`AWS_SESSION_EXPIRATION`から資格情報の有効期限が読み込まれます。 @@ -426,12 +427,13 @@ Enterprise_Naming_Scheme-voidstars = 'void**' ### オプション -| 変数 | デフォルト | 説明 | -| ---------- | ---------------------------------------- | ----------------------- | -| `format` | `'on [$symbol($subscription)]($style) '` | Azure module のフォーマットです。 | -| `symbol` | `'ﴃ '` | フォーマットで使用される記号です。 | -| `style` | `'blue bold'` | フォーマットで使用されるスタイルです。 | -| `disabled` | `true` | `azure`モジュールを無効にします。 | +| 変数 | デフォルト | 説明 | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | Azure module のフォーマットです。 | +| `symbol` | `'󰠅 '` | フォーマットで使用される記号です。 | +| `style` | `'blue bold'` | フォーマットで使用されるスタイルです。 | +| `disabled` | `true` | `azure`モジュールを無効にします。 | +| `subscription_aliases` | `{}` | Table of subscription name aliases to display in addition to Azure subscription name. | ### 設定例 @@ -443,7 +445,7 @@ Enterprise_Naming_Scheme-voidstars = 'void**' [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## バッテリー `battery`モジュールは、デバイスのバッテリー残量と現在の充電状態を示します。 モジュールは、デバイスのバッテリー残量が10%未満の場合にのみ表示されます。 @@ -467,11 +478,11 @@ style = "blue bold" | オプション | デフォルト | 説明 | | -------------------- | --------------------------------- | ------------------------- | -| `full_symbol` | `' '` | バッテリーが満タンのときに表示される記号です。 | -| `charging_symbol` | `' '` | バッテリーの充電中に表示される記号です。 | -| `discharging_symbol` | `' '` | バッテリーが放電しているときに表示される記号です。 | -| `unknown_symbol` | `' '` | バッテリー状態が不明なときに表示される記号です。 | -| `empty_symbol` | `' '` | バッテリーが空のときに表示される記号です。 | +| `full_symbol` | `'󰁹 '` | バッテリーが満タンのときに表示される記号です。 | +| `charging_symbol` | `'󰂄 '` | バッテリーの充電中に表示される記号です。 | +| `discharging_symbol` | `'󰂃 '` | バッテリーが放電しているときに表示される記号です。 | +| `unknown_symbol` | `'󰁽 '` | バッテリー状態が不明なときに表示される記号です。 | +| `empty_symbol` | `'󰂎 '` | バッテリーが空のときに表示される記号です。 | | `format` | `'[$symbol$percentage]($style) '` | module のフォーマットです。 | | `display` | [link](#battery-display) | モジュールの閾値とスタイルを表示します。 | | `disabled` | `false` | `battery`モジュールを無効にします。 | @@ -1517,16 +1528,19 @@ truncation_symbol = '' `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. + ### オプション -| オプション | デフォルト | 説明 | -| ----------------- | ---------------------------------------------------------- | ----------------------------- | -| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | module のフォーマットです。 | -| `symbol` | `'☁️ '` | 現在のGCPプロファイルを表示する前に表示される記号です。 | -| `region_aliases` | `{}` | GCP名に加えて表示するリージョンのエイリアスです。 | -| `project_aliases` | `{}` | GCP名に加えて表示するプロジェクトのエイリアスです。 | -| `style` | `'bold blue'` | モジュールのスタイルです。 | -| `disabled` | `false` | `gcloud`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ----------------- | ---------------------------------------------------------- | -------------------------------------------------------- | +| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | module のフォーマットです。 | +| `symbol` | `'☁️ '` | 現在のGCPプロファイルを表示する前に表示される記号です。 | +| `region_aliases` | `{}` | GCP名に加えて表示するリージョンのエイリアスです。 | +| `project_aliases` | `{}` | GCP名に加えて表示するプロジェクトのエイリアスです。 | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | +| `style` | `'bold blue'` | モジュールのスタイルです。 | +| `disabled` | `false` | `gcloud`モジュールを無効にします。 | ### 変数 @@ -1724,6 +1738,7 @@ The `git_metrics` module will show the number of added and deleted lines in the | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | module のフォーマットです。 | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### 変数 @@ -1772,6 +1787,7 @@ WSL環境のWindowsディレクトリ(例: `/mnt/c/`以下) では、Git Status | `staged` | `'+'` | `staged`のフォーマット | | `renamed` | `'»'` | `renamed`のフォーマット | | `deleted` | `'✘'` | `deleted`のフォーマット | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | モジュールのスタイルです。 | | `ignore_submodules` | `false` | サブモジュールの変更を無視します。 | | `disabled` | `false` | `git_status`モジュールを無効にします。 | @@ -1792,6 +1808,7 @@ WSL環境のWindowsディレクトリ(例: `/mnt/c/`以下) では、Git Status | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1864,24 +1881,26 @@ windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.e ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------ | -| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | -| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `'🐹 '` | A format string representing the symbol of Go. | -| `detect_extensions` | `['go']` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `['Godeps']` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `'bold cyan'` | モジュールのスタイルです。 | -| `disabled` | `false` | `golang`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 | +| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `'🐹 '` | A format string representing the symbol of Go. | +| `detect_extensions` | `['go']` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `['Godeps']` | どのフォルダーがこのモジュールをアクティブにするか | +| `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`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------- | ----------------------- | -| version | `v1.12.1` | The version of `go` | -| symbol | | オプション `symbol` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` version. | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -1894,6 +1913,15 @@ windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.e format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | ---------- | ----------------------- | -| version | `v13.12.0` | The version of `node` | -| symbol | | オプション `symbol` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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 | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | *: この変数は、スタイル文字列の一部としてのみ使用することができます。 @@ -3565,7 +3594,7 @@ The `shell` module shows an indicator for currently used shell. # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### オプション + +| オプション | デフォルト | 説明 | +| ------------------- | ------------------------------------ | ------------------------------------------------------ | +| `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"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables this module. | + +### 変数 + +| 変数 | 設定例 | 説明 | +| --------- | -------- | ------------------------- | +| version | `v0.8.1` | The version of `solidity` | +| symbol | | オプション `symbol` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | + +*: この変数は、スタイル文字列の一部としてのみ使用することができます。 + +### 設定例 + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. @@ -4161,8 +4228,8 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `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) | -| `description` | `''` | The description of the module that is shown when running `starship explain`. | +| `shell` | | [この表の下を参照してください](#custom-command-shell) | +| `説明` | `''` | 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. | diff --git a/docs/ja-JP/guide/README.md b/docs/ja-JP/guide/README.md index a216940a..c5c50c1d 100644 --- a/docs/ja-JP/guide/README.md +++ b/docs/ja-JP/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + /> +   + Українська   -### Step 2. Starshipをシェルにセットアップ +### Step 2. Set up your shell to use Starship Starshipを初期化するためのシェルの設定。 以下のリストからお使いのシェルを選択してください。 diff --git a/docs/ko-KR/advanced-config/README.md b/docs/ko-KR/advanced-config/README.md index d5183288..01374cef 100644 --- a/docs/ko-KR/advanced-config/README.md +++ b/docs/ko-KR/advanced-config/README.md @@ -193,7 +193,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/ko-KR/config/README.md b/docs/ko-KR/config/README.md index a3cd5ee1..d5aa335e 100644 --- a/docs/ko-KR/config/README.md +++ b/docs/ko-KR/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### Options -| Variable | Default | Description | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'ﴃ '` | The symbol used in the format. | -| `style` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| Variable | Default | Description | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | 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 @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Battery The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. @@ -467,11 +478,11 @@ The `battery` module shows how charged the device's battery is and its current c | Option | Default | Description | | -------------------- | --------------------------------- | --------------------------------------------------- | -| `full_symbol` | `' '` | The symbol shown when the battery is full. | -| `charging_symbol` | `' '` | The symbol shown when the battery is charging. | -| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. | -| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. | -| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. | +| `full_symbol` | `'󰁹 '` | The symbol shown when the battery is full. | +| `charging_symbol` | `'󰂄 '` | The symbol shown when the battery is charging. | +| `discharging_symbol` | `'󰂃 '` | The symbol shown when the battery is discharging. | +| `unknown_symbol` | `'󰁽 '` | The symbol shown when the battery state is unknown. | +| `empty_symbol` | `'󰂎 '` | The symbol shown when the battery state is empty. | | `format` | `'[$symbol$percentage]($style) '` | The format for the module. | | `display` | [link](#battery-display) | Display threshold and style for the module. | | `disabled` | `false` | Disables the `battery` module. | @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Options | Option | Default | Description | @@ -1525,6 +1538,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `gcloud` module. | @@ -1724,6 +1738,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### Variables @@ -1772,6 +1787,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `staged` | `'+'` | The format of `staged` | | `renamed` | `'»'` | The format of `renamed` | | `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | The style for the module. | | `ignore_submodules` | `false` | Ignore changes to submodules. | | `disabled` | `false` | Disables the `git_status` module. | @@ -1792,6 +1808,7 @@ The following variables can be used in `format`: | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -1864,24 +1881,26 @@ The `golang` module shows the currently installed version of [Go](https://golang ### 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` | `'🐹 '` | A format string representing the symbol of Go. | -| `detect_extensions` | `['go']` | Which extensions should trigger this module. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | -| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | -| `style` | `'bold cyan'` | The style for the module. | -| `disabled` | `false` | Disables the `golang` module. | +| 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 Go. | +| `detect_extensions` | `['go']` | Which extensions should trigger this module. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | +| `style` | `'bold cyan'` | The style for the module. | +| `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` | Disables the `golang` module. | ### Variables -| Variable | Example | Description | -| --------- | --------- | ------------------------------------ | -| version | `v1.12.1` | The version of `go` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` 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 @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Variables -| Variable | Example | Description | -| --------- | ---------- | ------------------------------------ | -| version | `v13.12.0` | The version of `node` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | 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` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3565,7 +3594,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Options + +| 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. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables this module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.8.1` | The version of `solidity` | +| 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 +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. diff --git a/docs/ko-KR/guide/README.md b/docs/ko-KR/guide/README.md index 1914f385..d3d6ba30 100644 --- a/docs/ko-KR/guide/README.md +++ b/docs/ko-KR/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + /> +   + Українська   Linux -Install the latest version for your system: +사용중인 시스템에서 최신버전을 설치해주세요. ```sh curl -sS https://starship.rs/install.sh | sh ``` -Alternatively, install Starship using any of the following package managers: +다음의 패키지 관리자를 사용해서 Starship을 설치할 수도 있습니다. | Distribution | Repository | Instructions | | ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | @@ -229,13 +237,13 @@ Alternatively, install Starship using any of the following package managers:
macOS -Install the latest version for your system: +사용중인 시스템에서 최신버전을 설치해주세요. ```sh curl -sS https://starship.rs/install.sh | sh ``` -Alternatively, install Starship using any of the following package managers: +다음의 패키지 관리자를 사용해서 Starship을 설치할 수도 있습니다. | Repository | Instructions | | -------------------------------------------------------- | --------------------------------------- | @@ -263,7 +271,7 @@ Install the latest version for your system with the MSI-installers from the [rel
-### 2단계. 쉘에 Starship 적용하기 +### 2단계. Set up your shell to use Starship 쉘에 Starship 초기 설정을 합니다. 아래의 리스트 중에 해당하는 것을 고르세요: diff --git a/docs/nl-NL/advanced-config/README.md b/docs/nl-NL/advanced-config/README.md index 2ea7915d..9dc0b4c6 100644 --- a/docs/nl-NL/advanced-config/README.md +++ b/docs/nl-NL/advanced-config/README.md @@ -193,7 +193,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/nl-NL/config/README.md b/docs/nl-NL/config/README.md index a3cd5ee1..d5aa335e 100644 --- a/docs/nl-NL/config/README.md +++ b/docs/nl-NL/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### Options -| Variable | Default | Description | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'ﴃ '` | The symbol used in the format. | -| `style` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| Variable | Default | Description | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | 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 @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Battery The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. @@ -467,11 +478,11 @@ The `battery` module shows how charged the device's battery is and its current c | Option | Default | Description | | -------------------- | --------------------------------- | --------------------------------------------------- | -| `full_symbol` | `' '` | The symbol shown when the battery is full. | -| `charging_symbol` | `' '` | The symbol shown when the battery is charging. | -| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. | -| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. | -| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. | +| `full_symbol` | `'󰁹 '` | The symbol shown when the battery is full. | +| `charging_symbol` | `'󰂄 '` | The symbol shown when the battery is charging. | +| `discharging_symbol` | `'󰂃 '` | The symbol shown when the battery is discharging. | +| `unknown_symbol` | `'󰁽 '` | The symbol shown when the battery state is unknown. | +| `empty_symbol` | `'󰂎 '` | The symbol shown when the battery state is empty. | | `format` | `'[$symbol$percentage]($style) '` | The format for the module. | | `display` | [link](#battery-display) | Display threshold and style for the module. | | `disabled` | `false` | Disables the `battery` module. | @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Options | Option | Default | Description | @@ -1525,6 +1538,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `gcloud` module. | @@ -1724,6 +1738,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### Variables @@ -1772,6 +1787,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `staged` | `'+'` | The format of `staged` | | `renamed` | `'»'` | The format of `renamed` | | `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | The style for the module. | | `ignore_submodules` | `false` | Ignore changes to submodules. | | `disabled` | `false` | Disables the `git_status` module. | @@ -1792,6 +1808,7 @@ The following variables can be used in `format`: | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -1864,24 +1881,26 @@ The `golang` module shows the currently installed version of [Go](https://golang ### 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` | `'🐹 '` | A format string representing the symbol of Go. | -| `detect_extensions` | `['go']` | Which extensions should trigger this module. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | -| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | -| `style` | `'bold cyan'` | The style for the module. | -| `disabled` | `false` | Disables the `golang` module. | +| 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 Go. | +| `detect_extensions` | `['go']` | Which extensions should trigger this module. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | +| `style` | `'bold cyan'` | The style for the module. | +| `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` | Disables the `golang` module. | ### Variables -| Variable | Example | Description | -| --------- | --------- | ------------------------------------ | -| version | `v1.12.1` | The version of `go` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` 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 @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Variables -| Variable | Example | Description | -| --------- | ---------- | ------------------------------------ | -| version | `v13.12.0` | The version of `node` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | 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` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3565,7 +3594,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Options + +| 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. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables this module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.8.1` | The version of `solidity` | +| 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 +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. diff --git a/docs/nl-NL/guide/README.md b/docs/nl-NL/guide/README.md index ace2e012..0ff2647a 100644 --- a/docs/nl-NL/guide/README.md +++ b/docs/nl-NL/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + />
+   + Українська   -### Stap 2. Setup your shell to use Starship +### Stap 2. Set up your shell to use Starship Configure your shell to initialize starship. Select yours from the list below: diff --git a/docs/no-NO/advanced-config/README.md b/docs/no-NO/advanced-config/README.md index 2ea7915d..9dc0b4c6 100644 --- a/docs/no-NO/advanced-config/README.md +++ b/docs/no-NO/advanced-config/README.md @@ -193,7 +193,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/no-NO/config/README.md b/docs/no-NO/config/README.md index a3cd5ee1..d5aa335e 100644 --- a/docs/no-NO/config/README.md +++ b/docs/no-NO/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### Options -| Variable | Default | Description | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'ﴃ '` | The symbol used in the format. | -| `style` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| Variable | Default | Description | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | 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 @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Battery The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. @@ -467,11 +478,11 @@ The `battery` module shows how charged the device's battery is and its current c | Option | Default | Description | | -------------------- | --------------------------------- | --------------------------------------------------- | -| `full_symbol` | `' '` | The symbol shown when the battery is full. | -| `charging_symbol` | `' '` | The symbol shown when the battery is charging. | -| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. | -| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. | -| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. | +| `full_symbol` | `'󰁹 '` | The symbol shown when the battery is full. | +| `charging_symbol` | `'󰂄 '` | The symbol shown when the battery is charging. | +| `discharging_symbol` | `'󰂃 '` | The symbol shown when the battery is discharging. | +| `unknown_symbol` | `'󰁽 '` | The symbol shown when the battery state is unknown. | +| `empty_symbol` | `'󰂎 '` | The symbol shown when the battery state is empty. | | `format` | `'[$symbol$percentage]($style) '` | The format for the module. | | `display` | [link](#battery-display) | Display threshold and style for the module. | | `disabled` | `false` | Disables the `battery` module. | @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Options | Option | Default | Description | @@ -1525,6 +1538,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `gcloud` module. | @@ -1724,6 +1738,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### Variables @@ -1772,6 +1787,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `staged` | `'+'` | The format of `staged` | | `renamed` | `'»'` | The format of `renamed` | | `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | The style for the module. | | `ignore_submodules` | `false` | Ignore changes to submodules. | | `disabled` | `false` | Disables the `git_status` module. | @@ -1792,6 +1808,7 @@ The following variables can be used in `format`: | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -1864,24 +1881,26 @@ The `golang` module shows the currently installed version of [Go](https://golang ### 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` | `'🐹 '` | A format string representing the symbol of Go. | -| `detect_extensions` | `['go']` | Which extensions should trigger this module. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | -| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | -| `style` | `'bold cyan'` | The style for the module. | -| `disabled` | `false` | Disables the `golang` module. | +| 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 Go. | +| `detect_extensions` | `['go']` | Which extensions should trigger this module. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | +| `style` | `'bold cyan'` | The style for the module. | +| `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` | Disables the `golang` module. | ### Variables -| Variable | Example | Description | -| --------- | --------- | ------------------------------------ | -| version | `v1.12.1` | The version of `go` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` 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 @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Variables -| Variable | Example | Description | -| --------- | ---------- | ------------------------------------ | -| version | `v13.12.0` | The version of `node` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | 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` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3565,7 +3594,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Options + +| 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. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables this module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.8.1` | The version of `solidity` | +| 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 +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. diff --git a/docs/no-NO/guide/README.md b/docs/no-NO/guide/README.md index b52bb488..ef770790 100644 --- a/docs/no-NO/guide/README.md +++ b/docs/no-NO/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Russisk" + /> +   + Українська   -### Steg 2. Sett opp skallet ditt for å bruke Starship +### Steg 2. Set up your shell to use Starship Konfigurer skallet ditt til å initialisere starship. Velg din fra listen nedenfor: diff --git a/docs/pl-PL/README.md b/docs/pl-PL/README.md index 9cd8bd06..e8f3523f 100644 --- a/docs/pl-PL/README.md +++ b/docs/pl-PL/README.md @@ -55,7 +55,7 @@ description: Starship to minimalny, szybki i ekstremalnie konfigurowalny wiersz ```sh brew install starship ``` - With [Winget](https://github.com/microsoft/winget-cli): + Za pomocą [Winget](https://github.com/microsoft/winget-cli): ```powershell winget install starship diff --git a/docs/pl-PL/advanced-config/README.md b/docs/pl-PL/advanced-config/README.md index 0f6428b3..dd5351f4 100644 --- a/docs/pl-PL/advanced-config/README.md +++ b/docs/pl-PL/advanced-config/README.md @@ -193,7 +193,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/pl-PL/config/README.md b/docs/pl-PL/config/README.md index 642d8ec6..d8f6e363 100644 --- a/docs/pl-PL/config/README.md +++ b/docs/pl-PL/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### Options -| Zmienne | Default | Description | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'ﴃ '` | The symbol used in the format. | -| `style` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| Zmienne | Default | Description | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | 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 @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Battery The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. @@ -467,11 +478,11 @@ The `battery` module shows how charged the device's battery is and its current c | Option | Default | Description | | -------------------- | --------------------------------- | --------------------------------------------------- | -| `full_symbol` | `' '` | The symbol shown when the battery is full. | -| `charging_symbol` | `' '` | The symbol shown when the battery is charging. | -| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. | -| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. | -| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. | +| `full_symbol` | `'󰁹 '` | The symbol shown when the battery is full. | +| `charging_symbol` | `'󰂄 '` | The symbol shown when the battery is charging. | +| `discharging_symbol` | `'󰂃 '` | The symbol shown when the battery is discharging. | +| `unknown_symbol` | `'󰁽 '` | The symbol shown when the battery state is unknown. | +| `empty_symbol` | `'󰂎 '` | The symbol shown when the battery state is empty. | | `format` | `'[$symbol$percentage]($style) '` | The format for the module. | | `display` | [link](#battery-display) | Display threshold and style for the module. | | `disabled` | `false` | Disables the `battery` module. | @@ -824,7 +835,7 @@ format = 'underwent [$duration](bold yellow)' The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. -::: tip +::: porada This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. @@ -1307,13 +1318,13 @@ The `env_var` module displays the current value of a selected environment variab - The `variable` configuration option matches an existing environment variable - The `variable` configuration option is not defined, but the `default` configuration option is -::: tip +::: porada The order in which env_var modules are shown can be individually set by including `${env_var.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `env_var` module will simply show all env_var modules in the order they were defined. ::: -::: tip +::: porada Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character. @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Options | Option | Default | Description | @@ -1525,6 +1538,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `gcloud` module. | @@ -1709,7 +1723,7 @@ cherry_pick = '[🍒 PICKING](bold red)' The `git_metrics` module will show the number of added and deleted lines in the current git repository. -::: tip +::: porada This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -1724,6 +1738,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### Variables @@ -1750,7 +1765,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' The `git_status` module shows symbols representing the state of the repo in your current directory. -::: tip +::: porada The Git Status module is very slow in Windows directories (for example under `/mnt/c/`) when in a WSL environment. You can disable the module or use the `windows_starship` option to use a Windows-native Starship executable to compute `git_status` for those paths. @@ -1772,6 +1787,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `staged` | `'+'` | The format of `staged` | | `renamed` | `'»'` | The format of `renamed` | | `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | The style for the module. | | `ignore_submodules` | `false` | Ignore changes to submodules. | | `disabled` | `false` | Disables the `git_status` module. | @@ -1792,6 +1808,7 @@ The following variables can be used in `format`: | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -1864,24 +1881,26 @@ The `golang` module shows the currently installed version of [Go](https://golang ### 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` | `'🐹 '` | A format string representing the symbol of Go. | -| `detect_extensions` | `['go']` | Which extensions should trigger this module. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | -| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | -| `style` | `'bold cyan'` | The style for the module. | -| `disabled` | `false` | Disables the `golang` module. | +| 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 Go. | +| `detect_extensions` | `['go']` | Which extensions should trigger this module. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | +| `style` | `'bold cyan'` | The style for the module. | +| `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` | Disables the `golang` module. | ### Variables -| Zmienne | Example | Description | -| --------- | --------- | ------------------------------------ | -| version | `v1.12.1` | The version of `go` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Zmienne | Example | Description | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` 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 @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2297,7 +2325,7 @@ kotlin_binary = 'kotlinc' 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 +::: porada This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -2479,7 +2507,7 @@ 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 +::: porada This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -2706,11 +2734,12 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Variables -| Zmienne | Example | Description | -| --------- | ---------- | ------------------------------------ | -| version | `v13.12.0` | The version of `node` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Zmienne | Example | 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` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -2851,7 +2880,7 @@ The [os_info](https://lib.rs/crates/os_info) crate used by this module is known ::: -::: tip +::: porada This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -3096,7 +3125,7 @@ The `pijul_channel` module shows the active channel of the repo in your current The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version. -::: tip +::: porada 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). @@ -3223,7 +3252,7 @@ By default the module will be shown if any of the following conditions are met: | `detect_folders` | `[]` | Which folders should trigger this module | | `disabled` | `false` | Disables the `python` module. | -::: tip +::: porada The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. @@ -3525,7 +3554,7 @@ symbol = '🌟 ' The `shell` module shows an indicator for currently used shell. -::: tip +::: porada This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -3565,7 +3594,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Options + +| 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. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables this module. | + +### Variables + +| Zmienne | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.8.1` | The version of `solidity` | +| 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 +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. @@ -3677,7 +3744,7 @@ format = '[$symbol$environment](dimmed blue) ' The `status` module displays the exit code of the previous command. If $success_symbol is empty (default), the module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer. -::: tip +::: porada This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -3738,7 +3805,7 @@ disabled = false The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. -::: tip +::: porada This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -3826,7 +3893,7 @@ format = 'via [🏎 $version](red bold)' The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. -::: tip +::: porada 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). @@ -3885,7 +3952,7 @@ format = '[🏎💨 $workspace]($style) ' 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 +::: porada This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -3936,7 +4003,7 @@ The `username` module shows active user's username. The module will be shown if - The user is currently connected as an SSH session - The variable `show_always` is set to true -::: tip +::: porada SSH connection is detected by checking environment variables `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up these variables, one workaround is to set one of them with a dummy value. @@ -4128,19 +4195,19 @@ These modules will be shown if any of the following conditions are met: - The `when` command returns 0 - The current Operating System (std::env::consts::OS) matches with `os` field if defined. -::: tip +::: porada Multiple custom modules can be defined by using a `.`. ::: -::: tip +::: porada The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. ::: -::: tip +::: porada [Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there! diff --git a/docs/pl-PL/guide/README.md b/docs/pl-PL/guide/README.md index d76e5bc9..9de0632f 100644 --- a/docs/pl-PL/guide/README.md +++ b/docs/pl-PL/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + /> +   + Українська   `. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do +Por padrão, o lado esquerdo da entrada é substituida por `>`. Para personalizar isso defina uma nova função chamada `Invoke-Starship-TransientFunction`. Por exemplo, para mostrar o módulo de caractere do ` Starship's`aqui, você faria ```powershell function Invoke-Starship-TransientFunction { @@ -24,17 +24,17 @@ Invoke-Expression (&starship init powershell) Enable-TransientPrompt ``` -## TransientPrompt and TransientRightPrompt in Cmd +## TransientPrompt e TransientRightPrompt em Cmd -Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient ` where \ can be one of: +Clink permite você substituir o prompt anteriormente impresso com strings personalizadas. Isto é útil quando todas as informações do prompt não são nescessárias sempre. Para habilitar isso, execute `clink set prompt.transient ` onde \ pode ser um dos: -- `always`: always replace the previous prompt -- `same_dir`: replace the previous prompt only if the working directory is same -- `off`: do not replace the prompt (i.e. turn off transience) +- `always`: sempre substitui o prompt anterior +- `same_dir`: substitui o prompt anterior apenas se o diretório de trabalho for o mesmo +- `off`: não substitui o prompt (ou seja, desliga a transição) -You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right: +Você precisa fazer isso apenas uma vez. Faça as seguintes alterações ao seu `starship.lua` para personalizar o que é exibido à esquerda e à direita: -- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do +- Por padrão, o lado esquerdo da entrada é substituida por `>`. Para personalizar isso, defina uma nova função chamada `starship_transient_prompt_func`. Esta função recebe o prompt atual como uma string que você pode utilizar. Por exemplo, para mostrar o módulo de caractere do ` Starship's`aqui, você faria ```lua function starship_transient_prompt_func(prompt) @@ -45,7 +45,7 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do +- Por padrão, o lado direito da entrada é vazio. Para personalizar isso, defina uma nova função chamada `starship_transient_rprompt_func`. Esta função recebe a prompt atual de como uma string que você pode utilizar. Por exemplo, para exibir o momento em que o último comando foi iniciado, você faria ```lua function starship_transient_rprompt_func(prompt) @@ -54,23 +54,23 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -## TransientPrompt and TransientRightPrompt in Fish +## TransientPrompt e TransientRightPrompt no Fish -It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`. +É possível substituir o prompt anteriormente impresso por uma string personalisada. Isto é útil quando todas as informações do prompt não são nescessárias sempre. Para habilitar isso, execute `enable_transience` na sessão do shell. Para torná-lo permanente, coloque esta declaração no seu `~/.config/fish/config.fish`. Transição pode ser desativada com `disable_transience`. -Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct. +Observe que, no caso do Fish, o prompt transitório só será impresso se a linha de comando não estiver vazia, e sintaticamente correta. -- By default, the left side of input gets replaced with a bold-green `❯`. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do +- Por padrão, o lado esquerdo da entrada é substituído por um símbolo `❯` verde. Para personalizar isso, defina uma nova função chamada `starship_transient_prompt_func`. Por exemplo, para mostrar o módulo de caractere do ` Starship's`aqui, você faria ```fish -function starship_transient_prompt_func - starship module character +function starship_transient_rprompt_func + starship module time end starship init fish | source enable_transience ``` -- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do +- Por padrão, o lado direito da entrada é vazio. Para personalizar isso, defina uma nova função chamada `starship_transient_rprompt_func`. Por exemplo, para exibir o momento em que o último comando foi iniciado, você faria ```fish function starship_transient_rprompt_func @@ -193,10 +193,10 @@ Você também pode definir uma saída semelhante com o PowerShell criando uma fu ```powershell # editar $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } -Invoke-Expression (& starship init powershell) +Invoke-Expression (&starship init powershell) ``` ## Ativando o Prompt Direito @@ -205,7 +205,7 @@ Alguns shells suportam um prompt direito que é renderizado na mesma linha que a Nota: O prompt direito é uma única linha após o local de entrada. Para alinhar módulos à direita acima da linha de entrada em um prompt de várias linhas, consulte o [módulo `fill`](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` é atualmente suportado pelos seguintes shells: elvish, fish, zsh, xonsh, cmd, nushell. ### Exemplo @@ -229,7 +229,7 @@ Produz um prompt como o seguinte: Alguns shells suportam um prompt de continuação junto com o prompt normal. Esse prompt é renderizado em vez do prompt normal quando o usuário insere uma instrução incompleta (como um único parêntese esquerdo ou aspas). -Starship pode definir o prompt de continuação usando a opção `continuation_prompt`. The default prompt is `'[∙](bright-black) '`. +Starship pode definir o prompt de continuação usando a opção `continuation_prompt`. O prompt padrão é `'[∙](bright-black) '`. Nota: `continuation_prompt` deve ser definido como uma string literal sem nenhuma variável. @@ -277,8 +277,8 @@ Um especificador de cor pode ser um dos seguintes: Se várias cores forem especificadas para primeiro plano/plano de fundo, a última na string terá prioridade. -Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist: +Nem todas os estilos de string serão exibidos corretamente em todos terminais. Em particular, existem os seguintes erros conhecidos: -- 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 +- Muitos terminais desabilitam por padrão o suporte ao `blink` +- `hidden` não é [ suportado no iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564). +- `strikethrough` não é suportado por padrão no aplicativo de terminal do macOS diff --git a/docs/pt-BR/config/README.md b/docs/pt-BR/config/README.md index f2cabb4c..987b09d4 100644 --- a/docs/pt-BR/config/README.md +++ b/docs/pt-BR/config/README.md @@ -9,22 +9,22 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Todas as configurações do starship são feitas neste arquivo [TOML](https://github.com/toml-lang/toml): ```toml -# Get editor completions based on the config schema +# Obtém o preenchimento do editor baseado no esquema de configuração "$schema" = 'https://starship.rs/config-schema.json' -# Inserts a blank line between shell prompts +# Insere uma linha branca entre os prompts do shell 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' +# Substitui o símbolo '❯' no prompt por '➜' +[character] # O nome do módulo que estamos configurando é 'character' +success_symbol = '[➜](bold green)' # O 'success_symbol' é definido para '➜' com a cor 'bold green' -# Disable the package module, hiding it from the prompt completely +# Desabilita o módulo package, escondendo completamente ele do prompt [package] disabled = true ``` -### Config File Location +### Configuração do Local do Arquivo Você pode alterar o caminho padrão do arquivo de configuração com a variável de ambiente `STARSHIP_CONFIG`: @@ -46,7 +46,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### 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. Isto, no entanto pode ser alterado usando a variável de ambiente `STARSHIP_CACHE`: +Por padrão os logs de avisos e erros do starship estão em um arquivo chamado `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, onde a session key é correspondente a uma instancia do terminal. Isto, no entanto pode ser alterado usando a variável de ambiente `STARSHIP_CACHE`: ```sh export STARSHIP_CACHE=~/.starship/cache @@ -74,16 +74,16 @@ Por convenção, a maioria dos módulos tem um prefixo de cor (e.x. `via` no "no ### Strings -In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. +Na sintaxe TOML, [valores de texto](https://toml.io/en/v1.0.0#string) são declarados com `'`, `"`, `'''`, ou `"""`. -The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. +Os seguintes símbolos de sintaxe do Starship têm uso especial em uma string de formatação e devem ser escapados para exibir como este caractere: `$ [ ] ( )`. -| 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 | +| Símbolo | Tipo | Notas | +| ------- | -------------------------- | ---------------------------------------------------------------- | +| `'` | string literal | menos escapando | +| `"` | string | mais escapando | +| `'''` | string literal multi-linha | menos escapando | +| `"""` | string multi-linha | mais escapantes, novas linhas em declarações podem ser ignoradas | Por exemplo: @@ -98,24 +98,24 @@ format = "☺\\☻ " format = '\[\$\] ' ``` -When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: +Ao usar quebras de linha, declarações de várias linhas podem ser usadas. Por exemplo, se você quiser imprimir um símbolo `$` em uma nova linha, os seguintes valores para o `format` são equivalentes: ```toml -# with literal string +# com string literal format = ''' \$''' -# with multiline basic string +# com string básica multilinha format = """ \\$""" -# with basic string +# com string básica format = "\n\\$" ``` -In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. +Em strings básicas de várias linhas, newlines podem ser usadas para formatação sem estarem presentes no valor escapado delas. ```toml format = """ @@ -138,9 +138,9 @@ Uma variável contém um símbolo `$` seguido pelo nome da variável. O nome de Por exemplo: -- `'$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`. -- `'$git_branch $git_commit'` has the two variables separated with a space. +- `'$version'` é uma string de formato com uma variável chamada `version`. +- `'$git_branch$git_commit'` é uma string de formato com duas variáveis chamadas `git_branch` e `git_commit`. +- `'$git_branch $git_commit'` tem as duas variáveis separadas por um espaço. #### Grupo de Texto @@ -152,20 +152,20 @@ Na segunda parte, que está dentro de um `()`, está uma [string de estilo](#sty Por exemplo: -- `'[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. +- `'[on](red bold)'` irá imprimir uma string `em` com texto em negrito vermelho. +- `'[⌘ $version](bold green)'` imprimirá um símbolo `⌘` seguido pelo conteúdo da `version`, com texto negrito verde. +- `'[a [b](red) c](green)'` imprimirá `a b c` com `b` vermelhor, `a` e `c` verdes. #### Estilo dos textos A maioria dos módulos no starship permite que você configure seus estilos de exibição. Isso é feito com uma entrada (normalmente chamada de `estilo`) que é uma string especificando a configuração. Aqui estão alguns exemplos de strings de estilo junto com o que elas fazem. Para obter detalhes sobre a sintaxe completa, consulte o [guia de configuração avançada](/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 -- `'bold fg:27'` sets bold text with [ANSI color](https://i.stack.imgur.com/KTSQa.png) 27 -- `'underline bg:#bf5700'` sets underlined text on a burnt orange background -- `'bold italic fg:purple'` sets bold italic purple text -- `''` explicitly disables all styling +- `"fg:green bg:blue"` define o texto para verde e o fundo azul +- `"bg:blue fg:bright-green"` define o texto para verde brilhante e o fundo azul +- `"bold fg:27"` define o texto para negrito com a cor 27 [da tabela ANSI](https://i.stack.imgur.com/KTSQa.png) +- `"underline bg:#bf5700"` define o texto para sublinhado com o fundo laranja escuro +- `"bold italic fg:purple"` define o texto para negrito e itálico com a cor roxa +- `"` explicitamente desabilita todos os estilos Observe que a aparência do estilo será controlada pelo emulador de terminal. Por exemplo, alguns emuladores de terminal irão clarear as cores em vez de colocar o texto em negrito, e alguns temas de cores usam os mesmos valores para as cores normais e brilhantes. Além disso, para obter texto em itálico, seu terminal deve suportar itálico. @@ -179,9 +179,9 @@ Por exemplo: - `'(some text)'` will always show nothing since there are no variables wrapped in the braces. - When `$combined` is a shortcut for `\[$a$b\]`, `'($combined)'` will show nothing only if `$a` and `$b` are both `None`. This works the same as `'(\[$a$b\] )'`. -### Negative matching +### Correspondência negativa -Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading '!' character. The presence of _any_ negative indicator in the directory will result in the module not being matched. +Muitos módulos têm variáveis `detect_extensions`, `detect_files`, e `detect_folders`. Estas receberão listas de strings para coresponder ou não. Opções "negativas", aquelas que não tem correspondencia, são indicadas com um caractere '!'. A presença de _varios_ indicadores negativos no diretório resultara que o módulo não sera correspondido. Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all. @@ -204,7 +204,7 @@ Esta é a lista de opções de configuração em todo o prompt. | `scan_timeout` | `30` | Tempo limite para escanear arquivos (em milissegundos). | | `command_timeout` | `500` | Tempo limite de execução de comandos pelo starship (em milissegundos). | | `add_newline` | `true` | Insere linha vazia entre os prompts do shell. | -| `palette` | `''` | Sets which color palette from `palettes` to use. | +| `palette` | `''` | Define qual a paleta de cores de `palettes` será usada. | | `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. | ### Exemplo @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -332,7 +333,7 @@ $character""" Se você quiser apenas estender o formato padrão, você pode usar `$all`; os módulos que você adicionar explicitamente ao formato não serão duplicados. Ex. ```toml -# Move the directory to the second line +# Mova o diretório para a segunda linha format = '$all$directory$character' ``` @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. Quando usar [aws-vault](https://github.com/99designs/aws-vault), o perfil é lido da variável de ambiente `AWS_VAULT` e o tempo de expiração de credenciais é lido da variável de ambiente `AWS_SESSION_EXPIRATION`. @@ -426,16 +427,17 @@ O módulo `azure` exibe a assinatura Azure atual. This is based on showing the n ### Opções -| Variável | Padrão | Descrição | -| ---------- | ---------------------------------------- | ---------------------------------------------- | -| `format` | `'on [$symbol($subscription)]($style) '` | O formato que o módulo Azure será renderizado. | -| `symbol` | `'ﴃ '` | O símbolo usado no formato. | -| `style` | `'blue bold'` | O estilo usado no formato. | -| `disabled` | `true` | Desabilita o módulo `azure`. | +| Variável | Padrão | Descrição | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | O formato que o módulo Azure será renderizado. | +| `symbol` | `'󰠅 '` | O símbolo usado no formato. | +| `style` | `'blue bold'` | O estilo usado no formato. | +| `disabled` | `true` | Desabilita o módulo `azure`. | +| `subscription_aliases` | `{}` | Table of subscription name aliases to display in addition to Azure subscription name. | ### Exemplos -#### Display Subscription Name +#### Exibir Nome da Assinatura ```toml # ~/.config/starship.toml @@ -443,22 +445,31 @@ O módulo `azure` exibe a assinatura Azure atual. This is based on showing the n [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` -#### Display Username +#### Exibir Usuário ```toml # ~/.config/starship.toml [azure] disabled = false -format = "em [$symbol($username)]($style) " -symbol = "ﴃ " +format = "on [$symbol($username)]($style) " +symbol = "󰠅 " style = "blue bold" ``` +#### Exibir Alias do Nome da Assinatura + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Bateria O módulo `battery` exibe o quanto a bateria do dispositivo está carregada e o estado atual de carregamento. O módulo é visível somente quando a bateria está abaixo de 10%. @@ -467,11 +478,11 @@ O módulo `battery` exibe o quanto a bateria do dispositivo está carregada e o | Opções | Padrão | Descrição | | -------------------- | --------------------------------- | ------------------------------------------------------------ | -| `full_symbol` | `' '` | O simbolo exibido quando a bateria estiver cheia. | -| `charging_symbol` | `' '` | O simbolo exibido quando a bateria está carregando. | -| `discharging_symbol` | `' '` | O simbolo exibido quando a bateria está descarregando. | -| `unknown_symbol` | `' '` | O simbolo exibido quando o estado da bateria é desconhecido. | -| `empty_symbol` | `' '` | O simbolo exibido quando o estado da bateria é vazio. | +| `full_symbol` | `'󰁹 '` | O simbolo exibido quando a bateria estiver cheia. | +| `charging_symbol` | `'󰂄 '` | O simbolo exibido quando a bateria está carregando. | +| `discharging_symbol` | `'󰂃 '` | O simbolo exibido quando a bateria está descarregando. | +| `unknown_symbol` | `'󰁽 '` | O simbolo exibido quando o estado da bateria é desconhecido. | +| `empty_symbol` | `'󰂎 '` | O simbolo exibido quando o estado da bateria é vazio. | | `format` | `'[$symbol$percentage]($style) '` | O formato do módulo. | | `display` | [link](#battery-display) | Limite de exibição e estilo para o módulo. | | `disabled` | `false` | Desabilita o módulo `battery`. | @@ -513,16 +524,16 @@ A opção `display` é um array da seguinte tabela. #### Exemplo ```toml -[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # ''bold red' e discharging_symbol é exibido quando a capacidade está entre 0% e 10% threshold = 10 style = 'bold red' -[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # 'yellow' style e o símbolo 💦 é exibido quando a capacidade está entre 10% e 30% threshold = 30 style = 'bold yellow' discharging_symbol = '💦' -# when capacity is over 30%, the battery indicator will not be displayed +# quando a capacidade estiver acima de 30%, o indicador de bateria não será exibido ``` ## Buf @@ -534,16 +545,16 @@ O módulo `buf` mostra a versão instalada do [Buf](https://buf.build). Por padr ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ----------------------------------------------- | ------------------------------------------------- | -| `format` | `'with [$symbol($version )]($style)'` | O formato do módulo `buf`. | -| `version_format` | `'v${raw}'` | A versão formatada. | -| `symbol` | `'🐃 '` | O símbolo usado antes de exibir a versão do Buf. | -| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | 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. | -| `disabled` | `false` | Desabilita o módulo `elixir`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------- | ------------------------------------------------- | +| `format` | `'with [$symbol($version )]($style)'` | O formato do módulo `buf`. | +| `version_format` | `'v${raw}'` | A versão formatada. | +| `symbol` | `'🐃 '` | O símbolo usado antes de exibir a versão do Buf. | +| `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. | +| `style` | `'bold blue'` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `elixir`. | ### Variáveis @@ -566,7 +577,7 @@ symbol = '🦬 ' ## Bun -The `bun` module shows the currently installed version of the [bun](https://bun.sh) JavaScript runtime. Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `bun` mostra a versão atualmente instalada do [bun](https://bun.sh) runtime do JavaScript. Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual conter um arquivo `bun.lockb` - O diretório atual conter um arquivo `bunfig.toml` @@ -577,18 +588,18 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | | `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 Bun. | +| `symbol` | `'🍞 '` | Uma string de formato que representa o símbolo do Bun. | | `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | | `detect_files` | `['bun.lockb', 'bunfig.toml']` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | | `style` | `'bold red'` | O estilo do módulo. | -| `disabled` | `false` | Disables the `bun` module. | +| `disabled` | `false` | Desativa o módulo `bun`. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------- | --------------------------------- | -| version | `v0.1.4` | The version of `bun` | +| version | `v0.1.4` | A versão do `bun` | | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | @@ -681,9 +692,9 @@ Por padrão ele apenas muda de cor. Se você deseja alterar o formato de uma olh ### Variáveis -| Variável | Exemplo | Descrição | -| -------- | ------- | -------------------------------------------------------------------------------------------------------- | -| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. | +| Variável | Exemplo | Descrição | +| -------- | ------- | --------------------------------------------------------------------------------------------------- | +| symbol | | Um espelho de `success_symbol`, `error_symbol`, `vimcmd_symbol` ou `vimcmd_replace_one_symbol` etc. | ### Exemplos @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Opções | Opções | Padrão | Descrição | @@ -1525,6 +1538,7 @@ O módulo `gcloud` exibe a configuração atual para a CLI do [`gcloud`](https:/ | `symbol` | `'☁️ '` | O simbolo usado antes de exibir o perfil atual do GCP. | | `region_aliases` | `{}` | Tabela de aliases de região para exibir além do nome do GCP. | | `project_aliases` | `{}` | Tabela de apelidos do projeto a serem exibidos além do nome do GCP. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | O estilo do módulo. | | `disabled` | `false` | Desabilita o módulo `gcloud`. | @@ -1724,6 +1738,7 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para | `only_nonzero_diffs` | `true` | Exibe apenas o status para itens alterados. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | O formato do módulo. | | `disabled` | `true` | Desabilita o módulo `git_metrics`. | +| `ignore_submodules` | `false` | Ignora as alterações de submódulos | ### Variáveis @@ -1772,6 +1787,7 @@ O módulo Git Status é muito lento nos diretórios do Windows (por exemplo, em | `staged` | `'+'` | O formato do `staged` | | `renamed` | `'»'` | O formato do `renamed` | | `deleted` | `'✘'` | O formato do `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | O estilo do módulo. | | `ignore_submodules` | `false` | Ignora as alterações de submódulos. | | `disabled` | `false` | Desabilita o módulo `git_status`. | @@ -1792,6 +1808,7 @@ As variáveis a seguir podem ser usadas no `format`: | `staged` | Exibe `staged` quando um arquivo novo for adicionado na área de staging. | | `renamed` | Exibe `renamed` quando um arquivo renomeado for adicionado na área de staging. | | `deleted` | Exibe `deleted` quando um arquivo deletado for adicionado na área de staging. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Espelha o valor da opção `style` | *: Esta variável só pode ser usada como parte de uma string de estilo @@ -1864,24 +1881,26 @@ O módulo `golang` exibe a versão instalada atual do [Go](https://golang.org/). ### 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` | `'🐹 '` | O formato da string que representa o simbolo do Go. | -| `detect_extensions` | `['go']` | Quais extensões devem ativar este módulo. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `['Godeps']` | Quais pastas devem ativar este módulo. | -| `style` | `'bold cyan'` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `golang`. | +| 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` | `'🐹 '` | O formato da string que representa o simbolo do Go. | +| `detect_extensions` | `['go']` | Quais extensões devem ativar este módulo. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `['Godeps']` | Quais pastas devem ativar este módulo. | +| `style` | `'bold cyan'` | O estilo do módulo. | +| `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` | Desabilita o módulo `golang`. | ### Variáveis -| Variável | Exemplo | Descrição | -| --------- | --------- | --------------------------------- | -| version | `v1.12.1` | A versão do `go` | -| symbol | | Espelha o valor da opção `symbol` | -| style\* | | Espelha o valor da opção `style` | +| Variável | Exemplo | Descrição | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | A versão do `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` 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 @@ -1894,6 +1913,15 @@ O módulo `golang` exibe a versão instalada atual do [Go](https://golang.org/). format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ O módulo `nodejs` exibe a versão atual instalada do [Node.js](https://nodejs.o ### Variáveis -| Variável | Exemplo | Descrição | -| --------- | ---------- | --------------------------------- | -| version | `v13.12.0` | A versão do `node` | -| symbol | | Espelha o valor da opção `symbol` | -| style\* | | Espelha o valor da opção `style` | +| Variável | Exemplo | Descrição | +| --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v13.12.0` | A versão do `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 | | 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 @@ -2920,7 +2949,7 @@ Windows = "🪟 " | --------- | ------------ | ------------------------------------------------------------------ | | symbol | `🎗️` | The current operating system symbol from advanced option `symbols` | | name | `Arch Linux` | The current operating system name | -| type | `Arch` | The current operating system type | +| tipo | `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 | @@ -3565,7 +3594,7 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ O módulo `singularity` exibe a imagem atual do [Singularity](https://sylabs.io/ format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Opções + +| 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. | +| `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. | +| `disabled` | `false` | Disables this module. | + +### Variáveis + +| Variável | Exemplo | Descrição | +| --------- | -------- | --------------------------------- | +| version | `v0.8.1` | The version of `solidity` | +| 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 + +### Exemplo + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack O módulo `spack` mostra o ambiente [Spack](https://spack.readthedocs.io/en/latest/) atual, se o `$SPACK_ENV` estiver definido. diff --git a/docs/pt-BR/faq/README.md b/docs/pt-BR/faq/README.md index 6260d971..27259e57 100644 --- a/docs/pt-BR/faq/README.md +++ b/docs/pt-BR/faq/README.md @@ -80,7 +80,7 @@ env STARSHIP_LOG=trace starship timings Isto vai retornar o rastreamento do log e um detalhamento de todos os módulos que levam mais que 1ms para executar ou produzir alguma saída. -Finally if you find a bug you can use the `bug-report` command to create a GitHub issue. +Por fim se você encontrar um bug use o comando `bug-report` para criar um GitHub issue. ```sh starship bug-report diff --git a/docs/pt-BR/guide/README.md b/docs/pt-BR/guide/README.md index 1bafb946..29b854ce 100644 --- a/docs/pt-BR/guide/README.md +++ b/docs/pt-BR/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + /> +   + Українська   Windows -Install the latest version for your system with the MSI-installers from the [releases section](https://github.com/starship/starship/releases/latest). +Instale a ultima versão para o seu sistema usando MSI-installer a partir da [seção de lançamentos](https://github.com/starship/starship/releases/latest). Instale o Starship usando qualquer um dos seguintes gerenciadores de pacotes: @@ -263,7 +271,7 @@ Instale o Starship usando qualquer um dos seguintes gerenciadores de pacotes: -### 2º passo. Configure seu shell para usar o Starship +### 2º passo. Configure seu shell para usar Starship Configure seu shell para inicializar o starship. Selecione o seu na lista abaixo: @@ -327,7 +335,7 @@ 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): +Adicione o seguinte ao final do seu arquivo env do Nushell (enconte-o rodando `$nu.env-path` no Nushell): ```sh mkdir ~/.cache/starship @@ -420,7 +428,7 @@ Por favor, confira esses trabalhos anteriores que ajudaram a inspirar a criaçã Apoie este projeto [tornando-se um patrocinador](https://github.com/sponsors/starship). O seu nome ou logotipo aparecerá aqui com um link para o seu site. -**Supporter Tier** +**Rank de Apoiadores** - [Appwrite](https://appwrite.io/) diff --git a/docs/pt-BR/presets/README.md b/docs/pt-BR/presets/README.md index 8a7d9d82..9e41bc24 100644 --- a/docs/pt-BR/presets/README.md +++ b/docs/pt-BR/presets/README.md @@ -10,17 +10,17 @@ Essa predefinição altera os símbolos para cada módulo usar símbolos com Ner [![Captura de tela da personalização com símbolos usando Nerd Font](/presets/img/nerd-font-symbols.png "Clique para ver as personalizações para Nerd Font")](./nerd-font) -## [No Nerd Fonts](./no-nerd-font.md) +## [Sem 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. +Essa predefinição altera os símbolos para vários módulos para que nenhum utilize símbolos das Nerd Fonts em nenhum lugar no prompt. ::: tip -This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544). +Esta predefinição se tornará padrão em [uma futura release do starship](https://github.com/starship/starship/pull/3544). ::: -[Click to view No Nerd Font preset](./no-nerd-font) +[Clique para visualizar a predefinição de sem Nerd Font](./no-nerd-font) ## [Seguimentos entre colchetes](./bracketed-segments.md) @@ -40,11 +40,11 @@ Esta predefinição oculta a versão do runtime da linguagem. Se você trabalha [![Captura de tela de uma personalização ocultando a versão do runtime](/presets/img/no-runtime-versions.png "Clique para ver as personalizações para remover a versão do runtime")](./no-runtimes) -## [No Empty Icons](./no-empty-icons.md) +## [Sem Ícones Vazios](./no-empty-icons.md) -This preset does not show icons if the toolset is not found. +Este preset não mostra ícones se as ferramentas não forem encontradas. -[![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png "Clique para ver as personalizações para remover a versão do runtime")](./no-empty-icons.md) +[![Captura de tela de preset de nenhum ícone vazio](/presets/img/no-empty-icons.png "Clique para ver as personalizações para remover a versão do runtime")](./no-empty-icons.md) ## [Prompt do Terminal com Pure](./pure-preset.md) @@ -60,6 +60,6 @@ Esta personalização é inspirada em [M365Princess](https://github.com/JanDeDob ## [Tokyo Night](./tokyo-night.md) -This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). +Este preset é inspirado por [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 de tela de Tokyo Night preset](/presets/img/tokyo-night.png "Clique para visualizar Tokyo Night preset")](./tokyo-night) diff --git a/docs/pt-BR/presets/no-empty-icons.md b/docs/pt-BR/presets/no-empty-icons.md index 8a01e077..8ad1409f 100644 --- a/docs/pt-BR/presets/no-empty-icons.md +++ b/docs/pt-BR/presets/no-empty-icons.md @@ -1,10 +1,10 @@ [Retornar para Personalizações](./README.md#no-empty-icons) -# No Empty Icons Preset +# Predefinição Nenhum Ícones Vazios -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. +Se os arquivos de toolset forem encontrados o ícone do toolset será exibido. Se um toolset não for encontrado para determinar o número da versão, ele não será exibido. Esta predefinição altera o comportamento para que o ícone seja exibido somente se a informação do toolset puder ser determinada. -![Screenshot of No Empty Icons preset](/presets/img/no-empty-icons.png) +![Captura de tela da predefinição de nenhum ícone vazio](/presets/img/no-empty-icons.png) ### Configuração diff --git a/docs/pt-BR/presets/no-nerd-font.md b/docs/pt-BR/presets/no-nerd-font.md index 116b0098..de56e1b0 100644 --- a/docs/pt-BR/presets/no-nerd-font.md +++ b/docs/pt-BR/presets/no-nerd-font.md @@ -1,12 +1,12 @@ [Retornar para Personalizações](./README.md#no-nerd-fonts) -# No Nerd Fonts Preset +# Predefinição sem Nerd Fonts -This preset restricts the use of symbols to those from emoji and powerline sets. +Esta predefinição restringe o uso de conjunto de símbolos de emoji e powerline. -This means that even without a Nerd Font installed, you should be able to view all module symbols. +Isto significa que sem uma Nerd Font instalada, você consiguirá visualizar todos os símbolos dos módulos. -This preset will become the default preset in a future release of starship. +Esta predefinição será padrão em uma futrura release do starship. ### Configuração diff --git a/docs/pt-BR/presets/tokyo-night.md b/docs/pt-BR/presets/tokyo-night.md index ce520189..3d213e8c 100644 --- a/docs/pt-BR/presets/tokyo-night.md +++ b/docs/pt-BR/presets/tokyo-night.md @@ -1,10 +1,10 @@ [Retornar para Personalizações](./README.md#pastel-powerline) -# Tokyo Night Preset +# Predifinição Tokyo Night -This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). +Esta predefinição é inspirado por [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme). -![Screenshot of Tokyo Night preset](/presets/img/tokyo-night.png) +![Captura de tala da predefinissão Tokyo Night preset](/presets/img/tokyo-night.png) ### Pré-requisitos diff --git a/docs/pt-PT/advanced-config/README.md b/docs/pt-PT/advanced-config/README.md index 2ea7915d..9dc0b4c6 100644 --- a/docs/pt-PT/advanced-config/README.md +++ b/docs/pt-PT/advanced-config/README.md @@ -193,7 +193,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/pt-PT/config/README.md b/docs/pt-PT/config/README.md index a3cd5ee1..d5aa335e 100644 --- a/docs/pt-PT/config/README.md +++ b/docs/pt-PT/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### Options -| Variable | Default | Description | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'ﴃ '` | The symbol used in the format. | -| `style` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| Variable | Default | Description | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | 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 @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Battery The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. @@ -467,11 +478,11 @@ The `battery` module shows how charged the device's battery is and its current c | Option | Default | Description | | -------------------- | --------------------------------- | --------------------------------------------------- | -| `full_symbol` | `' '` | The symbol shown when the battery is full. | -| `charging_symbol` | `' '` | The symbol shown when the battery is charging. | -| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. | -| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. | -| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. | +| `full_symbol` | `'󰁹 '` | The symbol shown when the battery is full. | +| `charging_symbol` | `'󰂄 '` | The symbol shown when the battery is charging. | +| `discharging_symbol` | `'󰂃 '` | The symbol shown when the battery is discharging. | +| `unknown_symbol` | `'󰁽 '` | The symbol shown when the battery state is unknown. | +| `empty_symbol` | `'󰂎 '` | The symbol shown when the battery state is empty. | | `format` | `'[$symbol$percentage]($style) '` | The format for the module. | | `display` | [link](#battery-display) | Display threshold and style for the module. | | `disabled` | `false` | Disables the `battery` module. | @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Options | Option | Default | Description | @@ -1525,6 +1538,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `gcloud` module. | @@ -1724,6 +1738,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### Variables @@ -1772,6 +1787,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `staged` | `'+'` | The format of `staged` | | `renamed` | `'»'` | The format of `renamed` | | `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | The style for the module. | | `ignore_submodules` | `false` | Ignore changes to submodules. | | `disabled` | `false` | Disables the `git_status` module. | @@ -1792,6 +1808,7 @@ The following variables can be used in `format`: | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -1864,24 +1881,26 @@ The `golang` module shows the currently installed version of [Go](https://golang ### 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` | `'🐹 '` | A format string representing the symbol of Go. | -| `detect_extensions` | `['go']` | Which extensions should trigger this module. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | -| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | -| `style` | `'bold cyan'` | The style for the module. | -| `disabled` | `false` | Disables the `golang` module. | +| 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 Go. | +| `detect_extensions` | `['go']` | Which extensions should trigger this module. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | +| `style` | `'bold cyan'` | The style for the module. | +| `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` | Disables the `golang` module. | ### Variables -| Variable | Example | Description | -| --------- | --------- | ------------------------------------ | -| version | `v1.12.1` | The version of `go` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` 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 @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Variables -| Variable | Example | Description | -| --------- | ---------- | ------------------------------------ | -| version | `v13.12.0` | The version of `node` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | 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` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3565,7 +3594,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Options + +| 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. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables this module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.8.1` | The version of `solidity` | +| 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 +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. diff --git a/docs/pt-PT/guide/README.md b/docs/pt-PT/guide/README.md index dbad587e..2a6b76d5 100644 --- a/docs/pt-PT/guide/README.md +++ b/docs/pt-PT/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + /> +   + Українська   -### Step 2. Setup your shell to use Starship +### Step 2. Set up your shell to use Starship Configure your shell to initialize starship. Select yours from the list below: diff --git a/docs/ru-RU/advanced-config/README.md b/docs/ru-RU/advanced-config/README.md index c61dbea3..8586667c 100644 --- a/docs/ru-RU/advanced-config/README.md +++ b/docs/ru-RU/advanced-config/README.md @@ -193,7 +193,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/ru-RU/config/README.md b/docs/ru-RU/config/README.md index dcab6f26..07d36e36 100644 --- a/docs/ru-RU/config/README.md +++ b/docs/ru-RU/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### Опции -| Переменная | По умолчанию | Описание | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'ﴃ '` | The symbol used in the format. | -| `style` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| Переменная | По умолчанию | Описание | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | 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. | ### Примеры @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Батарея Модуль `battery` показывает насколько заряжена батарея девайса и статус зарядки на данный момент. Модуль виден только, если заряд батареи устройства меньше 10%. @@ -467,11 +478,11 @@ style = "blue bold" | Параметр | По умолчанию | Описание | | -------------------- | --------------------------------- | ------------------------------------------------------- | -| `full_symbol` | `' '` | Символ, отображаемый при полной батарее. | -| `charging_symbol` | `' '` | Символ, показываемый при зарядке аккумулятора. | -| `discharging_symbol` | `' '` | Символ, показываемый при разрядке аккумулятора. | -| `unknown_symbol` | `' '` | Символ, отображаемый при неизвестном состоянии батареи. | -| `empty_symbol` | `' '` | Символ, отображаемый при пустом состоянии батареи. | +| `full_symbol` | `'󰁹 '` | Символ, отображаемый при полной батарее. | +| `charging_symbol` | `'󰂄 '` | Символ, показываемый при зарядке аккумулятора. | +| `discharging_symbol` | `'󰂃 '` | Символ, показываемый при разрядке аккумулятора. | +| `unknown_symbol` | `'󰁽 '` | Символ, отображаемый при неизвестном состоянии батареи. | +| `empty_symbol` | `'󰂎 '` | Символ, отображаемый при пустом состоянии батареи. | | `format` | `'[$symbol$percentage]($style) '` | Формат модуля. | | `display` | [ссылка](#battery-display) | Порог отображения и стиль для модуля. | | `disabled` | `false` | Отключает модуль `battery`. | @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Опции | Параметр | По умолчанию | Описание | @@ -1525,6 +1538,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | Стиль модуля. | | `disabled` | `false` | Disables the `gcloud` module. | @@ -1724,6 +1738,7 @@ The `git_metrics` module will show the number of added and deleted lines in the | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Формат модуля. | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### Переменные @@ -1772,6 +1787,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `staged` | `'+'` | The format of `staged` | | `renamed` | `'»'` | The format of `renamed` | | `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | Стиль модуля. | | `ignore_submodules` | `false` | Ignore changes to submodules. | | `disabled` | `false` | Отключает модуль `git_status`. | @@ -1792,6 +1808,7 @@ The following variables can be used in `format`: | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Отражает значение параметра `style` | *: Эта переменная может использоваться только в качестве части строки style @@ -1864,24 +1881,26 @@ The `golang` module shows the currently installed version of [Go](https://golang ### Опции -| Параметр | По умолчанию | Описание | -| ------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `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 Go. | -| `detect_extensions` | `['go']` | Which extensions should trigger this module. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | -| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | -| `style` | `'bold cyan'` | Стиль модуля. | -| `disabled` | `false` | Отключает модуль `golang`. | +| Параметр | По умолчанию | Описание | +| ------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `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 Go. | +| `detect_extensions` | `['go']` | Which extensions should trigger this module. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | +| `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`. | ### Переменные -| Переменная | Пример | Описание | -| ---------- | --------- | ------------------------------------ | -| version | `v1.12.1` | The version of `go` | -| symbol | | Отражает значение параметра `symbol` | -| style\* | | Отражает значение параметра `style` | +| Переменная | Пример | Описание | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` version. | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | *: Эта переменная может использоваться только в качестве части строки style @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Переменные -| Переменная | Пример | Описание | -| ---------- | ---------- | ------------------------------------ | -| version | `v13.12.0` | The version of `node` | -| symbol | | Отражает значение параметра `symbol` | -| style\* | | Отражает значение параметра `style` | +| Переменная | Пример | Описание | +| --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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 | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | *: Эта переменная может использоваться только в качестве части строки style @@ -3565,7 +3594,7 @@ The `shell` module shows an indicator for currently used shell. # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Опции + +| Параметр | По умолчанию | Описание | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `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"` | Стиль модуля. | +| `disabled` | `false` | Disables this module. | + +### Переменные + +| Переменная | Пример | Описание | +| ---------- | -------- | ------------------------------------ | +| version | `v0.8.1` | The version of `solidity` | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | + +*: Эта переменная может использоваться только в качестве части строки style + +### Пример + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. @@ -4162,7 +4229,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) | -| `description` | `''` | The description of the module that is shown when running `starship explain`. | +| `описание` | `''` | 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. | diff --git a/docs/ru-RU/guide/README.md b/docs/ru-RU/guide/README.md index c7cc5a6c..4fe61d3d 100644 --- a/docs/ru-RU/guide/README.md +++ b/docs/ru-RU/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + /> +   + Українська   -### Шаг 2. Setup your shell to use Starship +### Шаг 2. Set up your shell to use Starship Configure your shell to initialize starship. Select yours from the list below: diff --git a/docs/tr-TR/advanced-config/README.md b/docs/tr-TR/advanced-config/README.md index c7ba00fc..c874aab1 100644 --- a/docs/tr-TR/advanced-config/README.md +++ b/docs/tr-TR/advanced-config/README.md @@ -193,7 +193,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/tr-TR/config/README.md b/docs/tr-TR/config/README.md index a71b0e8e..029ceec8 100644 --- a/docs/tr-TR/config/README.md +++ b/docs/tr-TR/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### Options -| Variable | Default | Description | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'ﴃ '` | The symbol used in the format. | -| `stil` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| Variable | Default | Description | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | The symbol used in the format. | +| `stil` | `'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 @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Battery The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. @@ -467,11 +478,11 @@ The `battery` module shows how charged the device's battery is and its current c | Option | Default | Description | | -------------------- | --------------------------------- | --------------------------------------------------- | -| `full_symbol` | `' '` | The symbol shown when the battery is full. | -| `charging_symbol` | `' '` | The symbol shown when the battery is charging. | -| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. | -| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. | -| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. | +| `full_symbol` | `'󰁹 '` | The symbol shown when the battery is full. | +| `charging_symbol` | `'󰂄 '` | The symbol shown when the battery is charging. | +| `discharging_symbol` | `'󰂃 '` | The symbol shown when the battery is discharging. | +| `unknown_symbol` | `'󰁽 '` | The symbol shown when the battery state is unknown. | +| `empty_symbol` | `'󰂎 '` | The symbol shown when the battery state is empty. | | `format` | `'[$symbol$percentage]($style) '` | The format for the module. | | `display` | [link](#battery-display) | Display threshold and style for the module. | | `disabled` | `false` | Disables the `battery` module. | @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Options | Option | Default | Description | @@ -1525,6 +1538,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `stil` | `'bold blue'` | The style for the module. | | `disabled` | `false` | Disables the `gcloud` module. | @@ -1724,6 +1738,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### Variables @@ -1772,6 +1787,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `staged` | `'+'` | The format of `staged` | | `renamed` | `'»'` | The format of `renamed` | | `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `stil` | `'bold red'` | The style for the module. | | `ignore_submodules` | `false` | Ignore changes to submodules. | | `disabled` | `false` | Disables the `git_status` module. | @@ -1792,6 +1808,7 @@ The following variables can be used in `format`: | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -1864,24 +1881,26 @@ The `golang` module shows the currently installed version of [Go](https://golang ### 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` | `'🐹 '` | A format string representing the symbol of Go. | -| `detect_extensions` | `['go']` | Which extensions should trigger this module. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | -| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | -| `stil` | `'bold cyan'` | The style for the module. | -| `disabled` | `false` | Disables the `golang` module. | +| 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 Go. | +| `detect_extensions` | `['go']` | Which extensions should trigger this module. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | +| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | +| `stil` | `'bold cyan'` | The style for the module. | +| `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` | Disables the `golang` module. | ### Variables -| Variable | Example | Description | -| --------- | --------- | ------------------------------------ | -| version | `v1.12.1` | The version of `go` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | Description | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` 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 @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Variables -| Variable | Example | Description | -| --------- | ---------- | ------------------------------------ | -| version | `v13.12.0` | The version of `node` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Example | 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` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3565,7 +3594,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### Options + +| 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. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `stil` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables this module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.8.1` | The version of `solidity` | +| 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 +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. diff --git a/docs/tr-TR/guide/README.md b/docs/tr-TR/guide/README.md index 21dae191..4e561aba 100644 --- a/docs/tr-TR/guide/README.md +++ b/docs/tr-TR/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Rusça" + /> +   + Українська   -### 2. Adım Shell'inizi Starship kullanmaya hazır hale getirin +### 2. Adım Set up your shell to use Starship Shell'ı starshiple çalışması için ayarla. Aşağıdaki listeden shell'inizi seçin: diff --git a/docs/uk-UA/advanced-config/README.md b/docs/uk-UA/advanced-config/README.md index 3b249cc4..00762752 100644 --- a/docs/uk-UA/advanced-config/README.md +++ b/docs/uk-UA/advanced-config/README.md @@ -193,7 +193,7 @@ load(io.popen('starship init cmd'):read("*a"))() ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/uk-UA/config/README.md b/docs/uk-UA/config/README.md index b6371490..415b2715 100644 --- a/docs/uk-UA/config/README.md +++ b/docs/uk-UA/config/README.md @@ -242,7 +242,7 @@ mustard = '#af8700' ```toml format = '$all' -# Є еквівалентом +# Є тотожним format = """ $username\ $hostname\ @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' Модуль `aws` показує поточний регіон AWS і профіль, а також час, що залишився до кінця сесії при використанні тимчасових облікових даних. Для виводу модуль використовує змінні `AWS_REGION`, `AWS_DEFAULT_REGION` і `AWS_PROFILE` та файли `~/.aws/config` і `~/.aws/credentials`, коли треба. -Модуль буде показуватиме профіль лише в тому випадку, якщо облікові дані знаходяться в `~/.aws/credentials` або якщо `credential_process` чи `sso_start_url` визначені в `~/.aws/config`. Крім того, достатньо буде визначити будь-яку змінну `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` або `AWS_SESSION_TOKEN`. Якщо для параметра `force_display` встановлено значення `true`, уся доступна інформація буде показуватись, навіть якщо не буде виявлено жодних облікових даних відповідно до наведених вище умов. +Модуль показуватиме профіль якщо облікові дані знаходяться в `~/.aws/credentials` або коли `credential_process`, `sso_start_url`, чи `sso_session` визначені в `~/.aws/config`. Крім того, достатньо буде визначити будь-яку змінну `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` або `AWS_SESSION_TOKEN`. Якщо для параметра `force_display` встановлено значення `true`, уся доступна інформація буде показуватись, навіть якщо не буде виявлено жодних облікових даних відповідно до наведених вище умов. Під час використання [aws-vault](https://github.com/99designs/aws-vault) профіль зчитується зі змінної `AWS_VAULT`, а дата закінчення терміну дії облікових даних зчитується зі змінної `AWS_SESSION_EXPIRATION`. @@ -426,12 +427,13 @@ Enterprise_Naming_Scheme-voidstars = 'void**' ### Параметри -| Змінна | Стандартно | Опис | -| ---------- | ---------------------------------------- | ------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | Формат для модуля Azure. | -| `symbol` | `'ﴃ '` | Символ, який використовується. | -| `style` | `'blue bold'` | Стиль, який використовується. | -| `disabled` | `true` | Вимикає модуль `azure`. | +| Змінна | Стандартно | Опис | +| ---------------------- | ---------------------------------------- | -------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | Формат для модуля Azure. | +| `symbol` | `'󰠅 '` | Символ, який використовується. | +| `style` | `'blue bold'` | Стиль, який використовується. | +| `disabled` | `true` | Вимикає модуль `azure`. | +| `subscription_aliases` | `{}` | Таблиця псевдонімів підписки для показу на додачу до назви підписки Azure. | ### Приклади @@ -443,7 +445,7 @@ Enterprise_Naming_Scheme-voidstars = 'void**' [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Показ псевдонімів підписки + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Battery Модуль `battery` показує наскільки заряджена батарея пристрою і стан заряджання. Модуль показується лише тоді, коли заряд акумулятора пристрою нижче 10%. @@ -467,11 +478,11 @@ style = "blue bold" | Параметр | Стандартно | Опис | | -------------------- | --------------------------------- | ------------------------------------ | -| `full_symbol` | `' '` | Символ, повного заряду батареї. | -| `charging_symbol` | `' '` | Символ процесу заряджання. | -| `discharging_symbol` | `' '` | Символ, коли батарея розряджається. | -| `unknown_symbol` | `' '` | Символ, коли стан батареї невідомий. | -| `empty_symbol` | `' '` | Символ повністю розрядженої батареї. | +| `full_symbol` | `'󰁹 '` | Символ, повного заряду батареї. | +| `charging_symbol` | `'󰂄 '` | Символ процесу заряджання. | +| `discharging_symbol` | `'󰂃 '` | Символ, коли батарея розряджається. | +| `unknown_symbol` | `'󰁽 '` | Символ, коли стан батареї невідомий. | +| `empty_symbol` | `'󰂎 '` | Символ повністю розрядженої батареї. | | `format` | `'[$symbol$percentage]($style) '` | Формат модуля. | | `display` | [link](#battery-display) | Граничні значення і стиль модуля. | | `disabled` | `false` | Вимикає модуль `battery`. | @@ -1517,6 +1528,8 @@ truncation_symbol = '' Модуль `gcloud` показує поточну конфігурацію [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. Він базується на файлі `~/.config/gcloud/active_config` та на `~/.config/gcloud/configurations/config_{CONFIG NAME}` і на змінній оточення `CLOUDSDK_CONFIG`. +Коли модуль увімкнено, він завжди буде активним, якщо не встановлено параметр `detect_env_vars`, в такому випадку модуль буде активним лише коли буде встановлено одну зі змінних середовища. + ### Параметри | Параметр | Стандартно | Опис | @@ -1525,6 +1538,7 @@ truncation_symbol = '' | `symbol` | `'☁️ '` | Символ, який використовується під час показу перед поточним профілем GCP. | | `region_aliases` | `{}` | Таблиця псевдонімів регіону для показу на додачу до назви GCP. | | `project_aliases` | `{}` | Таблиця псевдонімів проєкту для показу на додачу до назви GCP. | +| `detect_env_vars` | `[]` | Які змінні середовища повинні запускати цей модуль | | `style` | `'bold blue'` | Стиль модуля. | | `disabled` | `false` | Вимикає модуль `gcloud`. | @@ -1630,7 +1644,7 @@ ignore_branches = ['master', 'main'] ## Git Commit -Модуль `git_commit` показує поточний хеш коміту, а також теґ (якщо такі є) репозиторію у вашій поточній теці. +Модуль `git_commit` показує поточний хеш коміту, а також теґ (якщо він є) репозиторію у вашій поточній теці. ### Параметри @@ -1667,7 +1681,7 @@ tag_symbol = '🔖 ' ## Git State -Модуль `git_state` показуватиметься в теках, які є частиною репозиторію git і де виконуються операції, такі як: _REBASING_, _BISECTING тощо. Якщо є інформація про прогрес (наприклад, REBASING 3/10), ця інформація також буде показана.

+Модуль `git_state` показується в теках, які є частиною репозиторію git, під час виконання операцій на зразок _REBASING_, _BISECTING тощо. Інформація про прогрес операції (наприклад, REBASING 3/10), також буде показана якщо вона доступна.

### Параметри @@ -1711,7 +1725,7 @@ cherry_pick = '[🍒 PICKING](bold red)' ::: tip -Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. ::: @@ -1724,6 +1738,7 @@ cherry_pick = '[🍒 PICKING](bold red)' | `only_nonzero_diffs` | `true` | Показувати стан лише для змінених елементів. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Формат модуля. | | `disabled` | `true` | Вимикає модуль `git_metrics`. | +| `ignore_submodules` | `false` | Ігнорувати зміни в субмодулях | ### Змінні @@ -1748,11 +1763,11 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' ## Git Status -Модуль `git_status` показує символ, що представляє стан репозиторію в поточній теці. +Модуль `git_status` показує символ, що описує стан репозиторію в поточній теці. ::: tip -Модуль Git Status дуже повільно працює в теках Windows (наприклад, під `/mnt/c/`) у WSL середовищі. Ви можете вимкнути модуль або використати `windows_starship` для використання Windows-native Starship `git_status` для цих шляхів. +Модуль Git Status дуже повільно працює в теках Windows у середовищі WSL (наприклад, під `/mnt/c/`). Ви можете вимкнути модуль або використати `windows_starship` для використання Windows-native Starship `git_status` для цих шляхів. ::: @@ -1772,6 +1787,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' | `staged` | `'+'` | Формат `staged` | | `renamed` | `'»'` | Формат `renamed` | | `deleted` | `'✘'` | Формат `deleted` | +| `typechanged` | `""` | Формат `typechange` | | `style` | `'bold red'` | Стиль модуля. | | `ignore_submodules` | `false` | Ігнорувати зміни в субмодулях. | | `disabled` | `false` | Вимикає модуль `git_status`. | @@ -1792,6 +1808,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' | `staged` | Показує `staged`, коли нові фали були додані до простору staging. | | `renamed` | Показує `renamed` коли перейменовані файли було додано до простору staging. | | `deleted` | Показує `deleted` коли інформація про видалення файлів була додана до простору staging. | +| `typechanged` | Показує `typechange` коли інформація про файл була змінена у просторі staging. | | style\* | Віддзеркалює значення параметра `style` | *: Ця змінна може бути використана лише як частина стилю рядка @@ -1864,24 +1881,26 @@ windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.e ### Параметри -| Параметр | Стандартно | Опис | -| ------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | -| `version_format` | `'v${raw}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` | -| `symbol` | `'🐹 '` | Формат рядка, що представляє символ Go. | -| `detect_extensions` | `['go']` | Які розширення повинні запускати цей модуль. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Які імена файлів мають запускати цей модуль. | -| `detect_folders` | `['Godeps']` | В яких теках цей модуль має запускатись. | -| `style` | `'bold cyan'` | Стиль модуля. | -| `disabled` | `false` | Вимикає модуль `golang`. | +| Параметр | Стандартно | Опис | +| ------------------- | ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. | +| `version_format` | `'v${raw}'` | Формат версії. Доступні змінні `raw`, `major`, `minor` та `patch` | +| `symbol` | `'🐹 '` | Формат рядка, що представляє символ Go. | +| `detect_extensions` | `['go']` | Які розширення повинні запускати цей модуль. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Які імена файлів мають запускати цей модуль. | +| `detect_folders` | `['Godeps']` | В яких теках цей модуль має запускатись. | +| `style` | `'bold cyan'` | Стиль модуля. | +| `not_capable_style` | `'bold red'` | Стиль модуля, коли директиви go з файлу go.mod не збігаються з встановленою версією Go. | +| `disabled` | `false` | Вимикає модуль `golang`. | ### Змінні -| Змінна | Приклад | Опис | -| --------- | --------- | ---------------------------------------- | -| version | `v1.12.1` | Версія `go` | -| symbol | | Віддзеркалює значення параметра `symbol` | -| style\* | | Віддзеркалює значення параметра `style` | +| Змінна | Приклад | Опис | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | Версія `go` | +| mod_version | `1.16` | вимоги до версії `go`, як зазначено у директиві `go.mod`. Буде показано лише коли потрібна версія не збігається з версією `go`. | +| symbol | | Віддзеркалює значення параметра `symbol` | +| style\* | | Віддзеркалює значення параметра `style` | *: Ця змінна може бути використана лише як частина стилю рядка @@ -1894,6 +1913,15 @@ windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.e format = 'via [🏎💨 $version](bold cyan) ' ``` +### Використання `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell Модуль `guix_shell` показує середовище [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html). Модуль буде показано, коли ви перебуваєте в середовищі guix-shell. @@ -2299,7 +2327,7 @@ kotlin_binary = 'kotlinc' ::: tip -Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. Коли модуль увімкнено, він завжди буде активним, якщо будь-який з параметрів `detect_extensions`, `detect_files` або `detect_folders` встановлені, модуль буде активним тільки в теках, що відповідають умовам. @@ -2481,7 +2509,7 @@ format = 'via [🌕 $version](bold blue) ' ::: tip -Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. ::: @@ -2706,11 +2734,12 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' ### Змінні -| Змінна | Приклад | Опис | -| --------- | ---------- | ---------------------------------------- | -| version | `v13.12.0` | Версія `node` | -| symbol | | Віддзеркалює значення параметра `symbol` | -| style\* | | Віддзеркалює значення параметра `style` | +| Змінна | Приклад | Опис | +| --------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v13.12.0` | Версія `node` | +| engines_version | `>=12.0.0` | вимоги до версії `node`, як зазначено в описі `package.json`. Буде показано лише коли потрібна версія не збігається з версією `node`. | +| symbol | | Віддзеркалює значення параметра `symbol` | +| style\* | | Віддзеркалює значення параметра `style` | *: Ця змінна може бути використана лише як частина стилю рядка @@ -2853,7 +2882,7 @@ symbol = '☁️ ' ::: tip -Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. ::: @@ -2945,7 +2974,7 @@ Arch = "Arch is the best! " ## Package Version -Модуль `package` показується, коли поточна тека є сховищем для пакунка, і показує його поточну версію. Наразі модуль підтримує наступні пакунки `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` та `dart`. +Модуль `package` показується, коли поточна тека є сховищем для пакунка, і показує його поточну версію. Наразі модуль підтримує такі пакунки: `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart`. - [**npm**](https://docs.npmjs.com/cli/commands/npm) — версія пакунка `npm` отримується з `package.json` з поточної теки - [**Cargo**](https://doc.rust-lang.org/cargo/) — версія пакунка `cargo` отримується з `Cargo.toml` з поточної теки @@ -3098,7 +3127,7 @@ format = 'via [🔹 $version](147 bold) ' ::: tip -Стандартно версія Pulumi не показується, через те що для цього потрібно набагато більше часу ніж на завантаження більшості втулків (~70ms). Якщо ви все ще хочете увімкнути показ версії, [дивіться приклад нижче](#with-pulumi-version). +За замовчуванням, версія Pulumi не показана, тому що отримання версії потребує на порядок більше часу, ніж потрібно іншим плагінам (близько 70мc). Якщо ви все ще хочете увімкнути показ версії, [дивіться приклад нижче](#with-pulumi-version). ::: @@ -3527,7 +3556,7 @@ symbol = '🌟 ' ::: tip -Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. ::: @@ -3565,7 +3594,7 @@ symbol = '🌟 ' # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ threshold = 3 format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +Модуль `solidity` показує поточну версію [Solidity](https://soliditylang.org/) Модуль буде показано, якщо буде вказано якісь з наступних умов: + +- Поточна тека містить файл `.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"` | Стиль модуля. | +| `disabled` | `false` | Вмикає цей модуль. | + +### Змінні + +| Змінна | Приклад | Опис | +| --------- | -------- | ---------------------------------------- | +| version | `v0.8.1` | Версія `solidity` | +| symbol | | Віддзеркалює значення параметра `symbol` | +| style\* | | Віддзеркалює значення параметра `style` | + +*: Ця змінна може бути використана лише як частина стилю рядка + +### Приклад + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack Модуль `spack` показує інформацію про поточне оточення [Spack](https://spack.readthedocs.io/en/latest/), якщо змінна `$SPACK_ENV` встановлена. @@ -3675,11 +3742,11 @@ format = '[$symbol$environment](dimmed blue) ' ## Status -Модуль `status` показує код завершення роботи попередньої команди. Якщо $success_symbol пустий (типово), модуль буде показаний тільки якщо код виходу не `0`. Код status може бути перетворений у 32-бітне ціле число. +Модуль `status` показує код завершення роботи попередньої команди. Якщо $success_symbol пустий (типово), модуль буде показаний тільки якщо код виходу не `0`. Код status буде перетворений у 32-бітне ціле число. ::: tip -Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. ::: @@ -3740,7 +3807,7 @@ disabled = false ::: tip -Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. ::: @@ -3883,11 +3950,11 @@ format = '[🏎💨 $workspace]($style) ' ## Time -Модуль `time` показує поточний **місцевий** час. Значення `format` використовується в [`chrono`](https://crates.io/crates/chrono) для керування показу часу. Перегляньте [документацію chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), щоб побачити, які параметри доступні. +Модуль `time` показує поточний **місцевий** час. Значення `format` використовується крейтом [`chrono`](https://crates.io/crates/chrono) для визначення формату показу часу. Перегляньте [документацію chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), щоб побачити, які параметри доступні. ::: tip -Цей модуль типово є вимкненим. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. +За замовчуванням цей модуль вимкнутий. Щоб його увімкнути, встановіть значення параметра `disabled` в `false` у вашому файлі налаштувань. ::: @@ -3938,7 +4005,7 @@ time_range = '10:00:00-14:00:00' ::: tip -Підключення SSH виявляється шляхом перевірки змінних середовища `SSH_CONNECTION`, `SSH_CLIENT` і `SSH_TTY`. Якщо ваш хост SSH не налаштував ці змінні, одним зі способів розвʼязання проблеми є встановлення для однієї з них фіктивного значення. +Модуль виявляє підключення SSH перевіряючи змінні середовища `SSH_CONNECTION`, `SSH_CLIENT` і `SSH_TTY`. Якщо ваш хост SSH не налаштував ці змінні, одним зі способів розвʼязання проблеми є встановлення для однієї з них фіктивного значення. ::: @@ -4162,7 +4229,7 @@ symbol = '⚡️ ' | `when` | `false` | Або булеве значення (`true` чи `false`, без лапок) або команди shell, що використовуються як умова для показу модуля. У випадку рядка команди, модуль буде показаний, якщо команда повертає код завершення `0`. | | `require_repo` | `false` | Якщо `true`, модуль буде показано лише в шляхах, що містять репозиторій (git). Цей параметр сам по собі не є достатньою умовою для показу модуля за відсутності інших варіантів. | | `shell` | | [Дивіться нижче](#custom-command-shell) | -| `description` | `''` | Опис модуля, який показується під час запуску `starship explain`. | +| `опис` | `''` | Опис модуля, який показується під час запуску `starship explain`. | | `detect_files` | `[]` | Файли, які треба шукати у робочій теці для отримання збігу. | | `detect_folders` | `[]` | Теки, які треба шукати у робочій теці для отримання збігу. | | `detect_extensions` | `[]` | Розширення файлів, які треба шукати у робочій теці для отримання збігу. | diff --git a/docs/uk-UA/guide/README.md b/docs/uk-UA/guide/README.md index 85f8f855..273be3ee 100644 --- a/docs/uk-UA/guide/README.md +++ b/docs/uk-UA/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + />
+   + Українська   -### Крок 2. Налаштуйте Вашу оболонку для використання starship +### Крок 2. Налаштуйте оболонку для використання Starship Налаштуйте свою оболонку, щоб ініціалізувати starship. Виберіть ваш варіант зі списку: diff --git a/docs/vi-VN/advanced-config/README.md b/docs/vi-VN/advanced-config/README.md index 9148982b..e4d0e527 100644 --- a/docs/vi-VN/advanced-config/README.md +++ b/docs/vi-VN/advanced-config/README.md @@ -193,7 +193,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/vi-VN/config/README.md b/docs/vi-VN/config/README.md index 69dedbea..e69fbc4c 100644 --- a/docs/vi-VN/config/README.md +++ b/docs/vi-VN/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### Các tuỳ chọn -| Biến | Mặc định | Mô tả | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'ﴃ '` | The symbol used in the format. | -| `style` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| Biến | Mặc định | Mô tả | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | 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. | ### Các ví dụ @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Battery `battery` module cho biết cách sạc pin của thiết bị là gì và tình trạng sạc hiện tại của nó. Module chỉ được nhìn thấy khi pin của thiết bị dưới 10%. @@ -467,11 +478,11 @@ style = "blue bold" | Tuỳ chọn | Mặc định | Mô tả | | -------------------- | --------------------------------- | -------------------------------------------------------- | -| `full_symbol` | `' '` | Kí hiệu cho biết khi pin đầy. | -| `charging_symbol` | `' '` | Kí hiệu cho biết khi ping đang sạc. | -| `discharging_symbol` | `' '` | Kí hiệu cho biết khi pin đang không sạc. | -| `unknown_symbol` | `' '` | Kí hiệu cho biết khi trạng thái pin không được xác định. | -| `empty_symbol` | `' '` | Kí hiệu cho biết khi hết pin. | +| `full_symbol` | `'󰁹 '` | Kí hiệu cho biết khi pin đầy. | +| `charging_symbol` | `'󰂄 '` | Kí hiệu cho biết khi ping đang sạc. | +| `discharging_symbol` | `'󰂃 '` | Kí hiệu cho biết khi pin đang không sạc. | +| `unknown_symbol` | `'󰁽 '` | Kí hiệu cho biết khi trạng thái pin không được xác định. | +| `empty_symbol` | `'󰂎 '` | Kí hiệu cho biết khi hết pin. | | `format` | `'[$symbol$percentage]($style) '` | Định dạng cho module. | | `display` | [link](#battery-display) | Ngưỡng hiển thị và kiểu cho module. | | `disabled` | `false` | Vô hiệu `battery` module. | @@ -499,7 +510,7 @@ style = 'bold red' The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. -#### Options +#### Các tuỳ chọn Tuỳ chọn `display` là một mảng của của bảng sau. @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### Options | Tuỳ chọn | Mặc định | Mô tả | @@ -1525,6 +1538,7 @@ Mô đun `gcloud` hiển thị cấu hình hiện tại của [`gcloud`](https:/ | `symbol` | `'☁️ '` | Kí hiệu sử dụng hiển thị trước profile GCP hiện tại. | | `region_aliases` | `{}` | Bảng ánh xạ của các bí danh của region để hiển thị ngoài tên GCP. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | Kiểu cho module. | | `disabled` | `false` | Vô hiệu mô đun `gcloud`. | @@ -1724,6 +1738,7 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Định dạng cho module. | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### Các biến @@ -1772,6 +1787,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `staged` | `'+'` | Định dạng của `modified` | | `renamed` | `'»'` | Định dạng của `renamed` | | `deleted` | `'✘'` | Định dạng của `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | Kiểu cho module. | | `ignore_submodules` | `false` | Ignore changes to submodules. | | `disabled` | `false` | Vô hiệu `git_status` module. | @@ -1792,6 +1808,7 @@ Các biến dưới đây có thể được sử dụng trong `format`: | `staged` | Hiển thị `staged` khi một tệp tin mới được thêm vào staging area. | | `renamed` | Hiển thị `renamed` khi một tệp tin đổi tên đã được thêm vào staging area. | | `deleted` | Hiển thị `deleted` khi một tệp tin bị xóa đã được thêm vào staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | 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 @@ -1864,24 +1881,26 @@ The `golang` module shows the currently installed version of [Go](https://golang ### Options -| 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` | `'🐹 '` | Một format string đại diện cho biểu tượng của Go. | -| `detect_extensions` | `['go']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | -| `detect_folders` | `['Godeps']` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `style` | `'bold cyan'` | Kiểu cho module. | -| `disabled` | `false` | Vô hiệu `golang` module. | +| 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` | `'🐹 '` | Một format string đại diện cho biểu tượng của Go. | +| `detect_extensions` | `['go']` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Những tên tệp nào sẽ kích hoạt mô-đun này. | +| `detect_folders` | `['Godeps']` | Những thư mục nào sẽ kích hoạt mô-đun này. | +| `style` | `'bold cyan'` | Kiểu cho module. | +| `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` | Vô hiệu `golang` module. | ### Các biến -| Biến | Ví dụ | Mô tả | -| --------- | --------- | -------------------------------- | -| version | `v1.12.1` | Phiên bản của `go` | -| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | -| style\* | | Giá trị ghi đè của `style` | +| Biến | Ví dụ | Mô tả | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | Phiên bản của `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` 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 @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2252,7 +2280,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko - Thư mục hiện tại chứa một tệp tin `.kt` hoặc một tệp tin `.kts` -### Options +### Các tuỳ chọn | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | @@ -2706,11 +2734,12 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Các biến -| Biến | Ví dụ | Mô tả | -| --------- | ---------- | -------------------------------- | -| version | `v13.12.0` | The version of `node` | -| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | -| style\* | | Giá trị ghi đè của `style` | +| Biến | Ví dụ | Mô tả | +| --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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 | | 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 @@ -3565,7 +3594,7 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### 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${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. | +| `disabled` | `false` | Disables this module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------- | -------------------------------- | +| version | `v0.8.1` | The version of `solidity` | +| 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 + +### Ví dụ + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. @@ -4162,7 +4229,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) | -| `description` | `''` | The description of the module that is shown when running `starship explain`. | +| `mô tả` | `''` | 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. | diff --git a/docs/vi-VN/guide/README.md b/docs/vi-VN/guide/README.md index d5e8c4d1..1a280a15 100644 --- a/docs/vi-VN/guide/README.md +++ b/docs/vi-VN/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Tiếng Nga" + /> +   + Українська   -### Step 2. Setup your shell to use Starship +### Step 2. Set up your shell to use Starship Configure your shell to initialize starship. Select yours from the list below: diff --git a/docs/zh-CN/advanced-config/README.md b/docs/zh-CN/advanced-config/README.md index f86c14ff..0ef535d6 100644 --- a/docs/zh-CN/advanced-config/README.md +++ b/docs/zh-CN/advanced-config/README.md @@ -193,7 +193,7 @@ load(io.popen('starship init cmd'):read("*a"))() ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md index 89121dea..0927b221 100644 --- a/docs/zh-CN/config/README.md +++ b/docs/zh-CN/config/README.md @@ -152,9 +152,9 @@ line2 例如: -- `'[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. +- `'[on](red bold)'` 会以红色粗体输出字符串 `on`。 +- `'[⌘ $version](bold green)'` 会以绿色粗体输出符号 `⌘` 以及字段 `version` 的内容。 +- `'[a [b](red) c](green)'` 会输出 `a b c`,其中 `b` 为红色,`a` 与 `c` 为绿色。 #### 样式字符串 @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -363,7 +364,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | `disabled` | `false` | 禁用 `AWS` 组件。 | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ---------------- | ------------------------------------------- | @@ -373,7 +374,7 @@ When using [saml2aws](https://github.com/Versent/saml2aws) the expiration inform | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### Examples @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### 配置项 -| 字段 | 默认值 | 描述 | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `符号` | `'ﴃ '` | The symbol used in the format. | -| `style` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| 字段 | 默认值 | 描述 | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `符号` | `'󰠅 '` | 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 @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## Battery `battery` 组件显示电池充电情况和当前充电状态。 这个组件只会在当前电量低于 10% 时显示。 @@ -467,11 +478,11 @@ style = "blue bold" | 选项 | 默认值 | 描述 | | -------------------- | --------------------------------- | ---------------- | -| `full_symbol` | `' '` | 显示于电池充满时。 | -| `charging_symbol` | `' '` | 显示于正在充电时。 | -| `discharging_symbol` | `' '` | 显示于电池放电时。 | -| `unknown_symbol` | `' '` | 显示于电池状态未知时 | -| `empty_symbol` | `' '` | 显示于电池状态为空时 | +| `full_symbol` | `'󰁹 '` | 显示于电池充满时。 | +| `charging_symbol` | `'󰂄 '` | 显示于正在充电时。 | +| `discharging_symbol` | `'󰂃 '` | 显示于电池放电时。 | +| `unknown_symbol` | `'󰁽 '` | 显示于电池状态未知时 | +| `empty_symbol` | `'󰂎 '` | 显示于电池状态为空时 | | `format` | `'[$symbol$percentage]($style) '` | 组件格式化模板。 | | `display` | [见下文](#battery-display) | 电量显示阈值和样式。 | | `disabled` | `false` | 禁用 `battery` 组件。 | @@ -545,7 +556,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | `style` | `'bold blue'` | 此组件的样式。 | | `disabled` | `false` | Disables the `elixir` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | -------------------- | @@ -553,7 +564,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | `符号` | | `symbol`对应值 | | `style`* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -584,7 +595,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | `style` | `'bold red'` | 此组件的样式。 | | `disabled` | `false` | Disables the `bun` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | -------------------- | @@ -592,7 +603,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -621,7 +632,7 @@ The `c` module shows some information about your C compiler. By default the modu | `style` | `'bold 149'` | 此组件的样式。 | | `disabled` | `false` | Disables the `c` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | ------- | ------ | --------------------------- | @@ -679,7 +690,7 @@ By default it only changes color. If you also want to change its shape take a lo | `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | 禁用 `character` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | -- | -- | -------------------------------------------------------------------------------------------------------- | @@ -736,7 +747,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | `style` | `'bold blue'` | 此组件的样式。 | | `disabled` | `false` | Disables the `cmake` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | --------- | -------------------- | @@ -744,7 +755,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ## COBOL / GNUCOBOL @@ -766,7 +777,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `cobol` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ---------- | ---------------------- | @@ -774,7 +785,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ## Command Duration @@ -801,14 +812,14 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | | `notification_timeout` | | Duration to show notification for (in milliseconds). If unset, notification timeout will be determined by daemon. Not all notification daemons honor this option. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | --------------------------------------- | | duration | `16m40s` | The time it took to execute the command | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -838,18 +849,18 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e | `符号` | `'🅒 '` | 在环境名之前显示的符号。 | | `style` | `'bold green'` | 此组件的样式。 | | `format` | `'via [$symbol$environment]($style) '` | 组件格式化模板。 | -| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `ignore_base` | `true` | 激活时忽略 `base` 环境。 | | `disabled` | `false` | 禁用 `conda` 组件。 | -### Variables +### 变量 -| 字段 | 示例 | 描述 | -| ----------- | ------------ | ----------------------------- | -| environment | `astronauts` | The current conda environment | -| 符号 | | `symbol`对应值 | -| style\* | | `style`对应值 | +| 字段 | 示例 | 描述 | +| ----------- | ------------ | ----------- | +| environment | `astronauts` | 当前 conda 环境 | +| 符号 | | `symbol`对应值 | +| style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -873,7 +884,7 @@ The `container` module displays a symbol and container name, if inside a contain | `format` | `'[$symbol \[$name\]]($style) '` | 组件格式化模板。 | | `disabled` | `false` | Disables the `container` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ------------------- | ------------------------- | @@ -881,7 +892,7 @@ The `container` module displays a symbol and container name, if inside a contain | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -912,7 +923,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `crystal` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | --------- | ------------------------ | @@ -920,7 +931,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -950,7 +961,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `daml` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | --------------------- | @@ -958,7 +969,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -990,7 +1001,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | `style` | `'bold blue'` | 此组件的样式。 | | `disabled` | `false` | Disables the `dart` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | --------------------- | @@ -998,7 +1009,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -1028,7 +1039,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d | `style` | `'green bold'` | 此组件的样式。 | | `disabled` | `false` | Disables the `deno` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | --------------------- | @@ -1062,8 +1073,8 @@ format = 'via [🦕 $version](green bold) ' | `format` | `'[$path]($style)[$read_only]($read_only_style) '` | 组件格式化模板。 | | `style` | `'bold cyan'` | 此组件的样式。 | | `disabled` | `false` | 禁用 `directory` 组件。 | -| `read_only` | `'🔒'` | The symbol indicating current directory is read only. | -| `read_only_style` | `'red'` | The style for the read only symbol. | +| `read_only` | `'🔒'` | 表明当前目录只读的符号。 | +| `read_only_style` | `'red'` | 只读符号的样式。 | | `truncation_symbol` | `''` | The symbol to prefix to truncated paths. eg: '…/' | | `before_repo_root_style` | | The style for the path segment above the root of the git repo. The default value is equivalent to `style`. | | `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. | @@ -1092,14 +1103,14 @@ format = 'via [🦕 $version](green bold) '
-### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | --------------------- | -------------------------- | | path | `'D:/Projects'` | The current directory path | | style\* | `'black bold dimmed'` | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用
The git repos have additional variables. @@ -1143,7 +1154,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | `style` | `'blue bold'` | 此组件的样式。 | | `disabled` | `false` | Disables the `docker_context` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------------- | -------------------------- | @@ -1151,7 +1162,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -1197,7 +1208,7 @@ The module will also show the Target Framework Moniker ("` | The description of the module that is shown when running `starship explain`. | | `disabled` | `false` | 禁用 `env_var` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ------------------------------------------- | ------------------------------------------ | @@ -1347,7 +1358,7 @@ default = 'unknown user' | 符号 | | `symbol`对应值 | | style\* | `black bold dimmed` | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -1391,7 +1402,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https: | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `erlang` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | --------- | ----------------------- | @@ -1399,7 +1410,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https: | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -1429,7 +1440,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | ----------------------- | @@ -1437,7 +1448,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -1492,7 +1503,7 @@ The `fossil_branch` module shows the name of the active branch of the check-out | `truncation_symbol` | `'…'` | 此字段的内容用来表示分支名称被截断。 You can use `''` for no symbol. | | `disabled` | `true` | Disables the `fossil_branch` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ------- | ------------------------ | @@ -1500,7 +1511,7 @@ The `fossil_branch` module shows the name of the active branch of the check-out | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### 配置项 | 选项 | 默认值 | 描述 | @@ -1525,10 +1538,11 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | `符号` | `'☁️ '` | The symbol used before displaying the current GCP profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | 此组件的样式。 | | `disabled` | `false` | Disables the `gcloud` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ------------- | ------------------------------------------------------------------ | @@ -1540,7 +1554,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### Examples @@ -1604,7 +1618,7 @@ very-long-project-name = 'vlpn' | `ignore_branches` | `[]` | A list of names to avoid displaying. Useful for 'master' or 'main'. | | `disabled` | `false` | 禁用 `git_branch` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | ------------- | -------- | ------------------------------------------------------------------------------------------------------ | @@ -1614,7 +1628,7 @@ very-long-project-name = 'vlpn' | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -1645,7 +1659,7 @@ The `git_commit` module shows the current commit hash and also the tag (if any) | `tag_symbol` | `' 🏷 '` | Tag symbol prefixing the info shown | | `disabled` | `false` | 禁用 `git_commit` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | --------- | -------------------------------------------- | @@ -1653,7 +1667,7 @@ The `git_commit` module shows the current commit hash and also the tag (if any) | tag | `v1.0.0` | The tag name if showing tag info is enabled. | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -1684,7 +1698,7 @@ tag_symbol = '🔖 ' | `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | 组件格式化模板。 | | `disabled` | `false` | 禁用 `git_state` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | ---------------- | ---------- | ------------------------------ | @@ -1693,7 +1707,7 @@ tag_symbol = '🔖 ' | progress_total | `2` | The total operation progress | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -1724,8 +1738,9 @@ The `git_metrics` module will show the number of added and deleted lines in the | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | 组件格式化模板。 | | `disabled` | `true` | Disables the `git_metrics` module. | +| `忽略子模块` | `false` | 忽略子模块的更改 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | ----------------- | --- | ------------------------------------------- | @@ -1734,7 +1749,7 @@ The `git_metrics` module will show the number of added and deleted lines in the | 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 +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -1758,26 +1773,27 @@ 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` | `'='` | 这个分支有合并冲突。 | -| `ahead` | `'⇡'` | The format of `ahead` | -| `behind` | `'⇣'` | The format of `behind` | -| `diverged` | `'⇕'` | The format of `diverged` | -| `up_to_date` | `''` | The format of `up_to_date` | -| `untracked` | `'?'` | The format of `untracked` | -| `stashed` | `'$'` | The format of `stashed` | -| `modified` | `'!'` | The format of `modified` | -| `staged` | `'+'` | The format of `staged` | -| `renamed` | `'»'` | The format of `renamed` | -| `deleted` | `'✘'` | The format of `deleted` | -| `style` | `'bold red'` | 此组件的样式。 | -| `ignore_submodules` | `false` | Ignore changes to submodules. | -| `disabled` | `false` | 禁用 `git_status` 组件。 | -| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. | +| 选项 | 默认值 | 描述 | +| ------------------ | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | +| `conflicted` | `'='` | 这个分支有合并冲突。 | +| `ahead` | `'⇡'` | The format of `ahead` | +| `behind` | `'⇣'` | The format of `behind` | +| `diverged` | `'⇕'` | The format of `diverged` | +| `up_to_date` | `''` | The format of `up_to_date` | +| `untracked` | `'?'` | The format of `untracked` | +| `stashed` | `'$'` | The format of `stashed` | +| `modified` | `'!'` | The format of `modified` | +| `staged` | `'+'` | The format of `staged` | +| `renamed` | `'»'` | The format of `renamed` | +| `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | +| `style` | `'bold red'` | 此组件的样式。 | +| `忽略子模块` | `false` | 忽略子模块的更改. | +| `disabled` | `false` | 禁用 `git_status` 组件。 | +| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. | -### Variables +### 变量 The following variables can be used in `format`: @@ -1792,9 +1808,10 @@ The following variables can be used in `format`: | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 The following variables can be used in `diverged`: @@ -1864,26 +1881,28 @@ The `golang` module shows the currently installed version of [Go](https://golang ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `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 Go. | -| `detect_extensions` | `['go']` | Which extensions should trigger this module. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | -| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | -| `style` | `'bold cyan'` | 此组件的样式。 | -| `disabled` | `false` | 禁用 `golang` 组件。 | +| 选项 | 默认值 | 描述 | +| ------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `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 Go. | +| `detect_extensions` | `['go']` | Which extensions should trigger this module. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | +| `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` 组件。 | -### Variables +### 变量 -| 字段 | 示例 | 描述 | -| --------- | --------- | ------------------- | -| version | `v1.12.1` | The version of `go` | -| 符号 | | `symbol`对应值 | -| style\* | | `style`对应值 | +| 字段 | 示例 | 描述 | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` version. | +| 符号 | | `symbol`对应值 | +| style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -1907,14 +1935,14 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel | `style` | `"yellow bold"` | 此组件的样式。 | | `disabled` | `false` | Disables the `guix_shell` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -- | ----------- | | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -1951,7 +1979,7 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | ------- | -------- | ----------------------- | @@ -1959,7 +1987,7 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | 符号 | | `symbol`对应值 | | style* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ## Haskell @@ -1982,7 +2010,7 @@ By default the module will be shown if any of the following conditions are met: | `style` | `'bold purple'` | 此组件的样式。 | | `disabled` | `false` | 禁用 `haskell` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | -------------- | ----------- | --------------------------------------------------------------------------------------- | @@ -1992,7 +2020,7 @@ By default the module will be shown if any of the following conditions are met: | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ## Haxe @@ -2015,7 +2043,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | `style` | `"bold fg:202"` | 此组件的样式。 | | `disabled` | `false` | Disables the `haxe` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | --------------------- | @@ -2023,7 +2051,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2054,7 +2082,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s | `style` | `'bold white'` | 此组件的样式。 | | `disabled` | `false` | Disables the `helm` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | --------------------- | @@ -2062,7 +2090,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2088,7 +2116,7 @@ format = 'via [⎈ $version](bold white) ' | `style` | `'bold dimmed green'` | 此组件的样式。 | | `disabled` | `false` | 禁用 `hostname` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | ---------- | ---------- | ----------------------------------------------------- | @@ -2096,7 +2124,7 @@ format = 'via [⎈ $version](bold white) ' | style\* | | `style`对应值 | | ssh_symbol | `'🌏 '` | The symbol to represent when connected to SSH session | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2130,7 +2158,7 @@ The `java` module shows the currently installed version of [Java](https://www.or | `style` | `'red dimmed'` | 此组件的样式。 | | `disabled` | `false` | 禁用 `java` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ----- | --------------------- | @@ -2138,7 +2166,7 @@ The `java` module shows the currently installed version of [Java](https://www.or | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2185,7 +2213,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will *: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead. -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | --- | ------------------ | @@ -2193,7 +2221,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2227,7 +2255,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli | `style` | `'bold purple'` | 此组件的样式。 | | `disabled` | `false` | Disables the `julia` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | ---------------------- | @@ -2235,7 +2263,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2266,7 +2294,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko | `kotlin_binary` | `'kotlin'` | Configures the kotlin binary that Starship executes when getting the version. | | `disabled` | `false` | Disables the `kotlin` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | --------- | ----------------------- | @@ -2274,7 +2302,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2319,7 +2347,7 @@ When the module is enabled it will always be active, unless any of `detect_exten | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `true` | Disables the `kubernetes` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------------------- | ---------------------------------------- | @@ -2330,7 +2358,7 @@ When the module is enabled it will always be active, unless any of `detect_exten | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2412,14 +2440,14 @@ The `localip` module shows the IPv4 address of the primary network interface. | `style` | `'bold yellow'` | 此组件的样式。 | | `disabled` | `true` | Disables the `localip` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ------------ | --------------------------------- | | localipv4 | 192.168.1.13 | Contains the primary IPv4 address | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2454,7 +2482,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | `lua_binary` | `'lua'` | Configures the lua binary that Starship executes when getting the version. | | `disabled` | `false` | Disables the `lua` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | -------------------- | @@ -2462,7 +2490,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2495,7 +2523,7 @@ format = 'via [🌕 $version](bold blue) ' | `style` | `'bold dimmed white'` | 此组件的样式。 | | `disabled` | `true` | 禁用 `memory_usage` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | ---------------- | ------------- | ------------------------------------------------------------------ | @@ -2537,7 +2565,7 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | `style` | `'blue bold'` | 此组件的样式。 | | `disabled` | `false` | Disables the `meson` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ---------- | ------------------------------ | @@ -2545,7 +2573,7 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | 符号 | `🐏` | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2574,7 +2602,7 @@ The `hg_branch` module shows the active branch and topic of the repo in your cur | `truncation_symbol` | `'…'` | 此字段的内容用来表示分支名称被截断。 | | `disabled` | `true` | 禁用 `hg_branch` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | --------- | --------------------------- | @@ -2583,7 +2611,7 @@ The `hg_branch` module shows the active branch and topic of the repo in your cur | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2618,7 +2646,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | `style` | `'bold yellow'` | 此组件的样式。 | | `disabled` | `false` | Disables the `nim` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | --------------------- | @@ -2626,7 +2654,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2655,7 +2683,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | `disabled` | `false` | 禁用 `nix_shell` 组件。 | | `heuristic` | `false` | Attempts to detect new `nix shell`-style shells with a heuristic. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ------- | -------------------------- | @@ -2664,7 +2692,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2704,15 +2732,16 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `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. | -### Variables +### 变量 -| 字段 | 示例 | 描述 | -| --------- | ---------- | --------------------- | -| version | `v13.12.0` | The version of `node` | -| 符号 | | `symbol`对应值 | -| style\* | | `style`对应值 | +| 字段 | 示例 | 描述 | +| --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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`对应值 | +| style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2749,7 +2778,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | `style` | `'bold yellow'` | 此组件的样式。 | | `disabled` | `false` | Disables the `ocaml` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | ---------------- | ------------ | ----------------------------------------------------------------- | @@ -2759,7 +2788,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2787,7 +2816,7 @@ The `opa` module shows the currently installed version of the OPA tool. By defau | `style` | `'bold blue'` | 此组件的样式。 | | `disabled` | `false` | Disables the `opa` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | --------- | -------------------- | @@ -2795,7 +2824,7 @@ The `opa` module shows the currently installed version of the OPA tool. By defau | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2819,7 +2848,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | `style` | `'bold yellow'` | 此组件的样式。 | | `disabled` | `false` | Disables the `openstack` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ------ | ----------------------------- | @@ -2828,7 +2857,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2914,7 +2943,7 @@ Unknown = "❓ " Windows = "🪟 " ``` -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ------------ | ------------------------------------------------------------------ | @@ -2926,7 +2955,7 @@ Windows = "🪟 " | version | | The current operating system version, if applicable | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -2978,7 +3007,7 @@ Arch = "Arch is the best! " | `display_private` | `false` | Enable displaying version for packages marked as private. | | `disabled` | `false` | 禁用 `package` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | --------------------------- | @@ -2986,7 +3015,7 @@ Arch = "Arch is the best! " | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3020,7 +3049,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | `style` | `'bold 149'` | 此组件的样式。 | | `disabled` | `false` | Disables the `perl` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | --------- | --------------------- | @@ -3058,7 +3087,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | `style` | `'147 bold'` | 此组件的样式。 | | `disabled` | `false` | 禁用 `php` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | -------------------- | @@ -3066,7 +3095,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3118,7 +3147,7 @@ By default the module will be shown if any of the following conditions are met: | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ---------- | --------------------------- | @@ -3128,7 +3157,7 @@ By default the module will be shown if any of the following conditions are met: | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3170,7 +3199,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | `style` | `'bold white'` | 此组件的样式。 | | `disabled` | `false` | Disables the `purescript` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | --------------------------- | @@ -3178,7 +3207,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3231,7 +3260,7 @@ The default values and order for `python_binary` was chosen to first identify th ::: -### Variables +### 变量 | 字段 | 示例 | 描述 | | ------------ | --------------- | ------------------------------------------ | @@ -3303,7 +3332,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | | `disabled` | `false` | Disables the `r` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | ------- | ------------- | ------------------ | @@ -3340,7 +3369,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | `style` | `'bold 149'` | 此组件的样式。 | | `disabled` | `false` | Disables the `raku` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | ---------- | ------ | ------------------------------------ | @@ -3377,7 +3406,7 @@ By default the `red` module shows the currently installed version of [Red](https | `style` | `'red bold'` | 此组件的样式。 | | `disabled` | `false` | Disables the `red` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | -------------------- | @@ -3385,7 +3414,7 @@ By default the `red` module shows the currently installed version of [Red](https | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3421,7 +3450,7 @@ Starship gets the current Ruby version by running `ruby -v`. | `style` | `'bold red'` | 此组件的样式。 | | `disabled` | `false` | 禁用 `ruby` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | --------------------- | @@ -3429,7 +3458,7 @@ Starship gets the current Ruby version by running `ruby -v`. | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3460,7 +3489,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | `style` | `'bold red'` | 此组件的样式。 | | `disabled` | `false` | 禁用 `rust` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ----------------- | -------------------------------------------- | @@ -3470,7 +3499,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3502,7 +3531,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | `style` | `'red dimmed'` | 此组件的样式。 | | `disabled` | `false` | Disables the `scala` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | ---------------------- | @@ -3510,7 +3539,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3550,14 +3579,14 @@ The `shell` module shows an indicator for currently used shell. | `style` | `'white bold'` | 此组件的样式。 | | `disabled` | `true` | Disables the `shell` module. | -### Variables +### 变量 | 字段 | 默认值 | 描述 | | --------- | --- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | | style\* | | `style`对应值. | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### Examples @@ -3565,7 +3594,7 @@ The `shell` module shows an indicator for currently used shell. # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3587,7 +3616,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | `style` | `'bold yellow'` | 此组件的样式。 | | `disabled` | `true` | Disables the `shlvl` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | --- | ---------------------------- | @@ -3595,7 +3624,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3621,7 +3650,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | `style` | `'bold dimmed blue'` | 此组件的样式。 | | `disabled` | `false` | Disables the `singularity` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ------------ | ----------------------------- | @@ -3629,7 +3658,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### 配置项 + +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | +| `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"` | 此组件的样式。 | +| `disabled` | `false` | Disables this module. | + +### 变量 + +| 字段 | 示例 | 描述 | +| --------- | -------- | ------------------------- | +| version | `v0.8.1` | The version of `solidity` | +| 符号 | | `symbol`对应值 | +| style\* | | `style`对应值 | + +*: 此变量只能作为样式字符串的一部分使用 + +### 示例 + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. @@ -3654,7 +3721,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | `format` | `'via [$symbol$environment]($style) '` | 组件格式化模板。 | | `disabled` | `false` | Disables the `spack` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | ----------- | ------------ | ----------------------------- | @@ -3662,7 +3729,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3703,7 +3770,7 @@ The `status` module displays the exit code of the previous command. If $success_ | `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments | | `disabled` | `true` | Disables the `status` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | -------------- | ------- | ------------------------------------------------------------------------------------------ | @@ -3718,7 +3785,7 @@ The `status` module displays the exit code of the previous command. If $success_ | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3754,14 +3821,14 @@ The `sudo` module displays if sudo credentials are currently cached. The module | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -- | ----------- | | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3803,7 +3870,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | `style` | `'bold 202'` | 此组件的样式。 | | `disabled` | `false` | Disables the `swift` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | ---------------------- | @@ -3811,7 +3878,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3850,7 +3917,7 @@ By default the module will be shown if any of the following conditions are met: | `style` | `'bold 105'` | 此组件的样式。 | | `disabled` | `false` | 禁用 `terraform` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ---------- | ------------------------------- | @@ -3859,7 +3926,7 @@ By default the module will be shown if any of the following conditions are met: | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3905,14 +3972,14 @@ format = '[🏎💨 $workspace]($style) ' 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. -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ---------- | ----------------- | | time | `13:08:10` | The current time. | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -3952,7 +4019,7 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | `show_always` | `false` | 总是显示 `username` 组件。 | | `disabled` | `false` | 禁用 `username` 组件。 | -### Variables +### 变量 | 字段 | 示例 | 描述 | | ------- | ------------ | ------------------------------------------------------------------------------------------- | @@ -3991,7 +4058,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | `style` | `'cyan bold'` | 此组件的样式。 | | `disabled` | `false` | Disables the `vagrant` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ---------------- | ------------------------ | @@ -3999,7 +4066,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -4030,7 +4097,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla | `style` | `'blue bold'` | 此组件的样式。 | | `disabled` | `false` | Disables the `vlang` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ------ | ------------------ | @@ -4059,7 +4126,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | `format` | `'vcsh [$symbol$repo]($style) '` | 组件格式化模板。 | | `disabled` | `false` | Disables the `vcsh` module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | ------------------------------------------- | -------------------------- | @@ -4067,7 +4134,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | 符号 | | `symbol`对应值 | | style\* | `black bold dimmed` | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -4097,7 +4164,7 @@ By default the `zig` module shows the currently installed version of [Zig](https | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -### Variables +### 变量 | 字段 | 示例 | 描述 | | --------- | -------- | -------------------- | @@ -4105,7 +4172,7 @@ By default the `zig` module shows the currently installed version of [Zig](https | 符号 | | `symbol`对应值 | | style\* | | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 ### 示例 @@ -4162,7 +4229,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) | -| `description` | `''` | The description of the module that is shown when running `starship explain`. | +| `描述` | `''` | 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. | @@ -4174,42 +4241,42 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | | `ignore_timeout` | `false` | Ignore global `command_timeout` setting and keep running external commands, no matter how long they take. | -### Variables +### 变量 -| 字段 | 描述 | -| --------- | -------------------------------------- | -| output | The output of shell command in `shell` | -| 符号 | `symbol`对应值 | -| style\* | `style`对应值 | +| 字段 | 描述 | +| --------- | -------------- | +| output | `shell` 中命令的输出 | +| 符号 | `symbol`对应值 | +| style\* | `style`对应值 | -*: This variable can only be used as a part of a style string +*: 此变量只能作为样式字符串的一部分使用 -#### Custom command shell +#### 自定义命令 shell -`shell` accepts a non-empty list of strings, where: +`shell` 接受一个非空字符串列表: -- The first string is the path to the shell to use to execute the command. -- Other following arguments are passed to the shell. +- 第一个字符串是用于执行命令的 shell 路径。 +- 剩下的将作为参数传递给 shell。 -If unset, it will fallback to STARSHIP_SHELL and then to 'sh' on Linux, and 'cmd /C' on Windows. +如果未设置,它将回退到 STARSHIP_SHELL,然后回退到 Linux 上的 "sh" 命令,在 Windows 上则是 "cmd /C"。 -The `command` will be passed in on stdin. +`command` 将会被传递给标准输入。 -If `shell` is not given or only contains one element and Starship detects PowerShell will be used, the following arguments will automatically be added: `-NoProfile -Command -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. +如果 `shell` 未设置或仅包含一个元素,并且 Starship 检测到正在使用 PowerShell,则会自动添加 `-NoProfile -Command -` 参数。 如果 `shell` 未设置或仅包含一个元素,并且 Starship 检测到正在使用 Cmd,则会自动添加 `/C` 参数,并且将 `stdin` 设置为 `false`。 如果 `shell` 未设置或仅包含一个元素,并且 Starship 检测到正在使用 Cmd,则会自动添加 `-C` 参数,并且将 `stdin` 设置为 `false`。 可以通过将参数显式传递给 shell 来避免这种行为,例如: ```toml shell = ['pwsh', '-Command', '-'] ``` -::: warning Make sure your custom shell configuration exits gracefully +::: warning 请确保您的自定义 shell 配置正常退出 -If you set a custom command, make sure that the default Shell used by starship will properly execute the command with a graceful exit (via the `shell` option). +如果您设置了一个自定义命令, 请确保 starship 使用的默认 shell (在 `shell` 选项设置) 执行命令后会正常退出。 -For example, PowerShell requires the `-Command` parameter to execute a one liner. Omitting this parameter might throw starship into a recursive loop where the shell might try to load a full profile environment with starship itself again and hence re-execute the custom command, getting into a never ending loop. +例如,PowerShell 需要 `-Command` 参数来执行单行命令。 忽略此参数可能导致 starship 无尽递归:shell 可能会尝试加载带有 starship 的完整配置并重新执行自定义命令,导致无尽循环。 -Parameters similar to `-NoProfile` in PowerShell are recommended for other shells as well to avoid extra loading time of a custom profile on every starship invocation. +建议使用类似于 PowerShell 中 `-NoProfile` 的启动参数,这样还能避免额外的配置加载时间。 -Automatic detection of shells and proper parameters addition are currently implemented, but it's possible that not all shells are covered. [Please open an issue](https://github.com/starship/starship/issues/new/choose) with shell details and starship configuration if you hit such scenario. +自动检测 shell 和添加适当的参数的功能已被实现,但包含的 shell 支持可能有缺漏。 遇到这种情况,请[提交一个带有 shell 信息和 starship 配置的 issue](https://github.com/starship/starship/issues/new/choose)。 ::: diff --git a/docs/zh-CN/guide/README.md b/docs/zh-CN/guide/README.md index 5948f9aa..f24cd92e 100644 --- a/docs/zh-CN/guide/README.md +++ b/docs/zh-CN/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Pусский" + /> +   + Українська   -### 步骤 2. 设置你的终端以使用 Starship +### 步骤 2. Set up your shell to use Starship 配置你的终端来初始化 starship。 请从下面列表选择你的终端: diff --git a/docs/zh-TW/advanced-config/README.md b/docs/zh-TW/advanced-config/README.md index 8ede7a25..3b5c300c 100644 --- a/docs/zh-TW/advanced-config/README.md +++ b/docs/zh-TW/advanced-config/README.md @@ -193,7 +193,7 @@ You can also set a similar output with PowerShell by creating a function named ` ```powershell # edit $PROFILE function Invoke-Starship-PreCommand { - $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") + $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a" } Invoke-Expression (&starship init powershell) diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md index 5ac5a37e..58754b98 100644 --- a/docs/zh-TW/config/README.md +++ b/docs/zh-TW/config/README.md @@ -298,6 +298,7 @@ $red\ $ruby\ $rust\ $scala\ +$solidity\ $swift\ $terraform\ $vlang\ @@ -340,7 +341,7 @@ format = '$all$directory$character' The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config` and `~/.aws/credentials` files as required. -The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process` or `sso_start_url` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or if a `credential_process`, `sso_start_url`, or `sso_session` are defined in `~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will also suffice. If the option `force_display` is set to `true`, all available information will be displayed even if no credentials per the conditions above are detected. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -426,12 +427,13 @@ The `azure` module shows the current Azure Subscription. This is based on showin ### 選項 -| 變數 | 預設 | 說明 | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `symbol` | `'ﴃ '` | The symbol used in the format. | -| `style` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| 變數 | 預設 | 說明 | +| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | +| `symbol` | `'󰠅 '` | 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 @@ -443,7 +445,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin [azure] disabled = false format = 'on [$symbol($subscription)]($style) ' -symbol = 'ﴃ ' +symbol = '󰠅 ' style = 'blue bold' ``` @@ -455,10 +457,19 @@ style = 'blue bold' [azure] disabled = false format = "on [$symbol($username)]($style) " -symbol = "ﴃ " +symbol = "󰠅 " style = "blue bold" ``` +#### Display Subscription Name Alias + +```toml +# ~/.config/starship.toml + +[azure.subscription_aliases] +very-long-subscription-name = 'vlsn' +``` + ## 電池 `battery` 模組顯示電池的電量以及現在的充電狀態。 這個模組只會在裝置的電量低於 10% 的時候看見。 @@ -467,11 +478,11 @@ style = "blue bold" | Option | 預設 | 說明 | | -------------------- | --------------------------------- | -------------------------- | -| `full_symbol` | `' '` | 當電池充飽時顯示的符號。 | -| `charging_symbol` | `' '` | 當電池正在充電時顯示的符號。 | -| `discharging_symbol` | `' '` | 當電池正在放電時顯示的符號。 | -| `unknown_symbol` | `' '` | 當電池狀態不明時顯示的符號。 | -| `empty_symbol` | `' '` | 當電池沒電時顯示的符號。 | +| `full_symbol` | `'󰁹 '` | 當電池充飽時顯示的符號。 | +| `charging_symbol` | `'󰂄 '` | 當電池正在充電時顯示的符號。 | +| `discharging_symbol` | `'󰂃 '` | 當電池正在放電時顯示的符號。 | +| `unknown_symbol` | `'󰁽 '` | 當電池狀態不明時顯示的符號。 | +| `empty_symbol` | `'󰂎 '` | 當電池沒電時顯示的符號。 | | `format` | `'[$symbol$percentage]($style) '` | The format for the module. | | `display` | [連結](#battery-display) | 顯示的門檻與模組的風格。 | | `disabled` | `false` | 停用 `battery` 模組。 | @@ -1517,6 +1528,8 @@ truncation_symbol = '' 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. + ### 選項 | Option | 預設 | 說明 | @@ -1525,6 +1538,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | | `region_aliases` | `{}` | Table of region aliases to display in addition to the GCP name. | | `project_aliases` | `{}` | Table of project aliases to display in addition to the GCP name. | +| `detect_env_vars` | `[]` | Which environmental variables should trigger this module | | `style` | `'bold blue'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `gcloud` module. | @@ -1724,6 +1738,7 @@ The `git_metrics` module will show the number of added and deleted lines in the | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | | `disabled` | `true` | Disables the `git_metrics` module. | +| `ignore_submodules` | `false` | Ignore changes to submodules | ### Variables @@ -1772,6 +1787,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `staged` | `'+'` | The format of `staged` | | `renamed` | `'»'` | The format of `renamed` | | `deleted` | `'✘'` | The format of `deleted` | +| `typechanged` | `""` | The format of `typechange` | | `style` | `'bold red'` | 這個模組的風格。 | | `ignore_submodules` | `false` | Ignore changes to submodules. | | `disabled` | `false` | 停用 `git_status` 模組。 | @@ -1792,6 +1808,7 @@ The following variables can be used in `format`: | `staged` | Displays `staged` when a new file has been added to the staging area. | | `renamed` | Displays `renamed` when a renamed file has been added to the staging area. | | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | +| `typechanged` | Displays `typechange` when a file's type has been changed in the staging area. | | style\* | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -1864,24 +1881,26 @@ The `golang` module shows the currently installed version of [Go](https://golang ### 選項 -| 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 Go. | -| `detect_extensions` | `['go']` | Which extensions should trigger this module. | -| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | -| `detect_folders` | `['Godeps']` | Which folders should trigger this module. | -| `style` | `'bold cyan'` | 這個模組的風格。 | -| `disabled` | `false` | 停用 `golang` 模組。 | +| 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 Go. | +| `detect_extensions` | `['go']` | Which extensions should trigger this module. | +| `detect_files` | `['go.mod', 'go.sum', 'go.work', 'glide.yaml', 'Gopkg.yml', 'Gopkg.lock', '.go-version']` | Which filenames should trigger this module. | +| `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` 模組。 | ### Variables -| 變數 | 範例 | 說明 | -| --------- | --------- | ------------------------------------ | -| version | `v1.12.1` | The version of `go` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| 變數 | 範例 | 說明 | +| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| version | `v1.12.1` | The version of `go` | +| mod_version | `1.16` | `go` version requirement as set in the go directive of `go.mod`. Will only show if the version requirement does not match the `go` 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 @@ -1894,6 +1913,15 @@ The `golang` module shows the currently installed version of [Go](https://golang format = 'via [🏎💨 $version](bold cyan) ' ``` +### Using `mod_version` + +```toml +# ~/.config/starship.toml + +[golang] +format = 'via [$symbol($version )($mod_version )]($style)' +``` + ## Guix-shell The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) environment. The module will be shown when inside a guix-shell environment. @@ -2706,11 +2734,12 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Variables -| 變數 | 範例 | 說明 | -| --------- | ---------- | ------------------------------------ | -| version | `v13.12.0` | The version of `node` | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| 變數 | 範例 | 說明 | +| --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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` | +| style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3565,7 +3594,7 @@ The `shell` module shows an indicator for currently used shell. # ~/.config/starship.toml [shell] -fish_indicator = '' +fish_indicator = '󰈺 ' powershell_indicator = '_' unknown_indicator = 'mystery shell' style = 'cyan bold' @@ -3640,6 +3669,44 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` +## Solidity + +The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/) The module will be shown if any of the following conditions are met: + +- The current directory contains a file with the `.sol` extension + +### 選項 + +| 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. | +| `detect_files` | `[]` | Which filenames should trigger this module. | +| `detect_folders` | `[]` | Which folders should trigger this module. | +| `style` | `"bold blue"` | 這個模組的風格。 | +| `disabled` | `false` | Disables this module. | + +### Variables + +| 變數 | 範例 | 說明 | +| --------- | -------- | ------------------------------------ | +| version | `v0.8.1` | The version of `solidity` | +| 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 + +### 範例 + +```toml +# ~/.config/starship.toml +[solidity] +format = "via [S $version](blue bold)" +``` + ## Spack The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set. @@ -4162,7 +4229,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) | -| `description` | `''` | The description of the module that is shown when running `starship explain`. | +| `說明` | `''` | 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. | diff --git a/docs/zh-TW/guide/README.md b/docs/zh-TW/guide/README.md index 2e60a08c..78bd6785 100644 --- a/docs/zh-TW/guide/README.md +++ b/docs/zh-TW/guide/README.md @@ -112,6 +112,14 @@ height="20" src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png" alt="Русский" + /> +   + Українська   -### 第二步 為您的 shell 安裝 Starship +### 第二步 Set up your shell to use Starship 設定您的 shell 以啟用 Starship。 請從下列選單選取您的 shell: