1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-25 03:16:01 +00:00

New translations README.md (Italian)

This commit is contained in:
Matan Kushner 2023-09-02 08:29:59 +01:00
parent 5021de5c2b
commit 73efa7d220

View File

@ -253,6 +253,7 @@ $kubernetes\
$directory\ $directory\
$vcsh\ $vcsh\
$fossil_branch\ $fossil_branch\
$fossil_metrics\
$git_branch\ $git_branch\
$git_commit\ $git_commit\
$git_state\ $git_state\
@ -1524,6 +1525,41 @@ truncation_length = 4
truncation_symbol = '' truncation_symbol = ''
``` ```
## Fossil Metrics
The `fossil_metrics` module will show the number of added and deleted lines in the check-out in your current directory. At least v2.14 (2021-01-20) of Fossil is required.
### Opzioni
| Opzione | Default | Descrizione |
| -------------------- | ------------------------------------------------------------ | ------------------------------------- |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
| `added_style` | `'bold green'` | The style for the added count. |
| `deleted_style` | `'bold red'` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `disabled` | `true` | Disables the `fossil_metrics` module. |
### Variables
| Variable | Esempio | Descrizione |
| ----------------- | ------- | ------------------------------------------- |
| added | `1` | The current number of added lines |
| deleted | `2` | The current number of deleted lines |
| added_style\* | | Mirrors the value of option `added_style` |
| deleted_style\* | | Mirrors the value of option `deleted_style` |
*: This variable can only be used as a part of a style string
### Esempio
```toml
# ~/.config/starship.toml
[fossil_metrics]
added_style = 'bold blue'
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
```
## Google Cloud (`gcloud`) ## Google Cloud (`gcloud`)
The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. 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.
@ -2323,7 +2359,7 @@ kotlin_binary = 'kotlinc'
## Kubernetes ## Kubernetes
Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly, the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`.
::: tip ::: tip
@ -2335,18 +2371,40 @@ When the module is enabled it will always be active, unless any of `detect_exten
### Opzioni ### Opzioni
::: warning
The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` and the corresponding `context_alias` and `user_alias` options instead.
:::
| Opzione | Default | Descrizione | | Opzione | Default | Descrizione |
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. |
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
| `style` | `'cyan bold'` | Lo stile per il modulo. | | `style` | `'cyan bold'` | Lo stile per il modulo. |
| `context_aliases` | `{}` | Table of context aliases to display. | | `context_aliases`* | `{}` | Table of context aliases to display. |
| `user_aliases` | `{}` | Table of user aliases to display. | | `user_aliases`* | `{}` | Table of user aliases to display. |
| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. | | `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | | `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `[]` | Which folders should trigger this modules. | | `detect_folders` | `[]` | Which folders should trigger this modules. |
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
| `disabled` | `true` | Disables the `kubernetes` module. | | `disabled` | `true` | Disables the `kubernetes` module. |
*: This option is deprecated, please add `contexts` with the corresponding `context_alias` and `user_alias` options instead.
To customize the style of the module for specific environments, use the following configuration as part of the `contexts` list:
| Variable | Descrizione |
| ----------------- | ---------------------------------------------------------------------------------------- |
| `context_pattern` | **Required** Regular expression to match current Kubernetes context name. |
| `user_pattern` | Regular expression to match current Kubernetes user name. |
| `context_alias` | Context alias to display instead of the full context name. |
| `user_alias` | User alias to display instead of the full user name. |
| `style` | The style for the module when using this context. If not set, will use module's style. |
| `symbol` | The symbol for the module when using this context. If not set, will use module's symbol. |
Note that all regular expression are anchored with `^<pattern>$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)).
### Variables ### Variables
| Variable | Esempio | Descrizione | | Variable | Esempio | Descrizione |
@ -2368,13 +2426,9 @@ When the module is enabled it will always be active, unless any of `detect_exten
[kubernetes] [kubernetes]
format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
disabled = false disabled = false
[kubernetes.context_aliases] contexts = [
'dev.local.cluster.k8s' = 'dev' { context_pattern = "dev.local.cluster.k8s", style = "green", symbol = "💔 " },
'.*/openshift-cluster/.*' = 'openshift' ]
'gke_.*_(?P<var_cluster>[\w-]+)' = 'gke-$var_cluster'
[kubernetes.user_aliases]
'dev.local.cluster.k8s' = 'dev'
'root/.*' = 'root'
``` ```
Only show the module in directories that contain a `k8s` file. Only show the module in directories that contain a `k8s` file.
@ -2387,25 +2441,36 @@ disabled = false
detect_files = ['k8s'] detect_files = ['k8s']
``` ```
#### Regex Matching #### Kubernetes Context specific config
Additional to simple aliasing, `context_aliases` and `user_aliases` also supports extended matching and renaming using regular expressions. The `contexts` configuration option is used to customise what the current Kubernetes context name looks like (style and symbol) if the name matches the defined regular expression.
The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation.
Long and automatically generated cluster names can be identified and shortened using regular expressions:
```toml ```toml
[kubernetes.context_aliases] # ~/.config/starship.toml
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
'.*/openshift-cluster/.*' = 'openshift'
# Or better, to rename every OpenShift cluster at once:
'.*/(?P<var_cluster>[\w-]+)/.*' = '$var_cluster'
[[kubernetes.contexts]]
# "bold red" style + default symbol when Kubernetes current context name equals "production" *and* the current user
# equals "admin_user"
context_pattern = "production"
user_pattern = "admin_user"
style = "bold red"
context_alias = "prod"
user_alias = "admin"
[[kubernetes.contexts]]
# "green" style + a different symbol when Kubernetes current context name contains openshift
context_pattern = ".*openshift.*"
style = "green"
symbol = "💔 "
context_alias = "openshift"
[[kubernetes.contexts]]
# Using capture groups
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
# and renames every matching kube context into a more readable format (`gke-cluster-name`): # and renames every matching kube context into a more readable format (`gke-cluster-name`):
'gke_.*_(?P<var_cluster>[\w-]+)' = 'gke-$var_cluster' context_pattern = "gke_.*_(?P<cluster>[\\w-]+)"
context_alias = "gke-$cluster"
``` ```
## Line Break ## Line Break
@ -3004,8 +3069,8 @@ The `package` module is shown when the current directory is the repository for a
| `symbol` | `'📦 '` | The symbol used before displaying the version the package. | | `symbol` | `'📦 '` | The symbol used before displaying the version the package. |
| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` | | `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
| `style` | `'bold 208'` | Lo stile per il modulo. | | `style` | `'bold 208'` | Lo stile per il modulo. |
| `display_private` | `false` | Abilita la visualizzazione della versione per i pacchetti contrassegnati come privati. | | `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | Disabilita il modulo `package`. | | `disabled` | `false` | Disables the `package` module. |
### Variables ### Variables
@ -3038,16 +3103,16 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe
### Opzioni ### Opzioni
| Opzione | Default | Descrizione | | Opzione | Default | Descrizione |
| ------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format string for the module. | | `format` | `'via [$symbol($version )]($style)'` | The format string for the module. |
| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | | `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl | | `symbol` | `'🐪 '` | The symbol used before displaying the version of Perl |
| `detect_extensions` | `['pl', 'pm', 'pod']` | Quali estensioni dovrebbero attivare questo modulo. | | `detect_extensions` | `['pl', 'pm', 'pod']` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Quali nomi di file dovrebbero attivare questo modulo. | | `detect_files` | `['Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version']` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | | `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
| `style` | `'bold 149'` | Lo stile per il modulo. | | `style` | `'bold 149'` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `perl` module. | | `disabled` | `false` | Disables the `perl` module. |
### Variables ### Variables
@ -3991,7 +4056,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it de
| Variable | Esempio | Descrizione | | Variable | Esempio | Descrizione |
| --------- | ---------- | ----------------------------------- | | --------- | ---------- | ----------------------------------- |
| ora | `13:08:10` | The current time. | | time | `13:08:10` | The current time. |
| style\* | | Mirrors the value of option `style` | | style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string *: This variable can only be used as a part of a style string
@ -4105,12 +4170,12 @@ The `vlang` module shows you your currently installed version of [V](https://vla
| ------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------- | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `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` | | `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
| `symbol` | `'V '` | Una stringa di formato che rappresenta il simbolo di V | | `symbol` | `'V '` | A format string representing the symbol of V |
| `detect_extensions` | `['v']` | Quali estensioni dovrebbero attivare questo modulo. | | `detect_extensions` | `['v']` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Quali nomi di file dovrebbero attivare questo modulo. | | `detect_files` | `['v.mod', 'vpkg.json', '.vpkg-lock.json' ]` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | | `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
| `style` | `'blu grassetto'` | Lo stile per il modulo. | | `style` | `'blu grassetto'` | Lo stile per il modulo. |
| `disabled` | `false` | Disabilita il modulo `vlang`. | | `disabled` | `false` | Disables the `vlang` module. |
### Variables ### Variables
@ -4244,7 +4309,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt
| `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | | `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. | | `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) | | `shell` | | [See below](#custom-command-shell) |
| `descrizione` | `'<custom module>'` | The description of the module that is shown when running `starship explain`. | | `description` | `'<custom module>'` | The description of the module that is shown when running `starship explain`. |
| `detect_files` | `[]` | The files that will be searched in the working directory for a match. | | `detect_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_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. | | `detect_extensions` | `[]` | The extensions that will be searched in the working directory for a match. |