diff --git a/docs/ar-SA/config/README.md b/docs/ar-SA/config/README.md index 70b98c1a0..bb858d85f 100644 --- a/docs/ar-SA/config/README.md +++ b/docs/ar-SA/config/README.md @@ -261,7 +261,9 @@ format = "$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. 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. @@ -795,19 +797,20 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Options -| Option | الافتراضي | الوصف | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | -| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | -| `style` | `"bold cyan"` | The style for the module. | -| `disabled` | `false` | Disables the `directory` module. | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Option | الافتراضي | الوصف | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
This module has a few advanced configuration options that control how the directory is displayed. @@ -839,6 +842,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an *: This variable can only be used as a part of a style string +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Variable | مثال | الوصف | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Mirrors the value of option `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
+ ### مثال ```toml @@ -1045,13 +1063,13 @@ default = "unknown user" ### Options -| Option | الافتراضي | الوصف | -| ----------- | ------------------------------ | ---------------------------------------------------------------------------- | -| `symbol` | `""` | The symbol used before displaying the variable value. | -| `variable` | | The environment variable to be displayed. | -| `الافتراضي` | | The default value to be displayed when the selected variable is not defined. | -| `format` | `"with [$env_value]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `env_var` module. | +| Option | الافتراضي | الوصف | +| ---------- | ------------------------------ | ---------------------------------------------------------------------------- | +| `symbol` | `""` | The symbol used before displaying the variable value. | +| `variable` | | The environment variable to be displayed. | +| `default` | | The default value to be displayed when the selected variable is not defined. | +| `format` | `"with [$env_value]($style) "` | The format for the module. | +| `disabled` | `false` | Disables the `env_var` module. | ### Variables @@ -1159,13 +1177,14 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud ### Options -| Option | الافتراضي | الوصف | -| ---------------- | ---------------------------------------------------------- | --------------------------------------------------------------- | -| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | -| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `gcloud` module. | +| Option | الافتراضي | الوصف | +| ----------------- | ---------------------------------------------------------- | ---------------------------------------------------------------- | +| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | +| `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. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `gcloud` module. | ### Variables @@ -1175,7 +1194,7 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud | account | `foo` | The current GCP profile | | domain | `example.com` | The current GCP profile domain | | project | | The current GCP project | -| active | `الافتراضي` | The active config name written in `~/.config/gcloud/active_config` | +| active | `default` | The active config name written in `~/.config/gcloud/active_config` | | symbol | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | @@ -1214,6 +1233,17 @@ us-central1 = "uc1" asia-northeast1 = "an1" ``` +#### Display account and aliased project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' +[gcloud.project_aliases] +very-long-project-name = "vlpn" +``` + ## Git Branch The `git_branch` module shows the active branch of the repo in your current directory. @@ -1711,39 +1741,6 @@ The `julia` module shows the currently installed version of [Julia](https://juli symbol = "∴ " ``` -## localip - -The `localip` module shows the IPv4 address of the primary network interface. - -### Options - -| Option | الافتراضي | الوصف | -| ---------- | ------------------------- | ------------------------------------------------------ | -| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `true` | Disables the `localip` module. | - -### Variables - -| Variable | مثال | الوصف | -| --------- | ------------ | ----------------------------------- | -| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | -| style\* | | Mirrors the value of option `style` | - -*: This variable can only be used as a part of a style string - -### مثال - -```toml -# ~/.config/starship.toml - -[localip] -ssh_only = false -format = "@[$localipv4](bold red) " -disabled = false -``` - ## Kotlin The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: @@ -1793,7 +1790,7 @@ kotlin_binary = "kotlinc" ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. 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 @@ -1815,8 +1812,10 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Variable | مثال | الوصف | | --------- | -------------------- | ---------------------------------------- | -| context | `starship-cluster` | The current kubernetes context | +| context | `starship-context` | The current kubernetes context name | | namespace | `starship-namespace` | If set, the current kubernetes namespace | +| user | `starship-user` | If set, the current kubernetes user | +| cluster | `starship-cluster` | If set, the current kubernetes cluster | | symbol | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | @@ -1828,12 +1827,12 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [kubernetes] -format = 'on [⛵ $context \($namespace\)](dimmed green) ' +format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false [kubernetes.context_aliases] "dev.local.cluster.k8s" = "dev" ".*/openshift-cluster/.*" = "openshift" -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,12 +1848,12 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` ## Line Break @@ -1876,6 +1875,39 @@ The `line_break` module separates the prompt into two lines. disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Options + +| Option | الافتراضي | الوصف | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `localip` module. | + +### Variables + +| Variable | مثال | الوصف | +| --------- | ------------ | ----------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### مثال + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). By default the module will be shown if any of the following conditions are met: @@ -3025,12 +3057,12 @@ By default the module will be shown if any of the following conditions are met: ### Variables -| Variable | مثال | الوصف | -| --------- | ----------- | ------------------------------------ | -| version | `v0.12.24` | The version of `terraform` | -| workspace | `الافتراضي` | The current Terraform workspace | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | مثال | الوصف | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `terraform` | +| workspace | `default` | The current Terraform workspace | +| 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 @@ -3334,7 +3366,7 @@ 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` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `الوصف` | `""` | The description of the module that is shown when running `starship explain`. | +| `description` | `""` | The description of the module that is shown when running `starship explain`. | | `files` | `[]` | The files that will be searched in the working directory for a match. | | `directories` | `[]` | The directories that will be searched in the working directory for a match. | | `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | diff --git a/docs/ar-SA/installing/README.md b/docs/ar-SA/installing/README.md index c0553eec8..281066b09 100644 --- a/docs/ar-SA/installing/README.md +++ b/docs/ar-SA/installing/README.md @@ -63,7 +63,6 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett { programs.starship = { enable = true; - enableZshIntegration = true; # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/ckb-IR/config/README.md b/docs/ckb-IR/config/README.md index 6b460344d..5c94f2e2e 100644 --- a/docs/ckb-IR/config/README.md +++ b/docs/ckb-IR/config/README.md @@ -261,7 +261,9 @@ format = "$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. 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. @@ -795,19 +797,20 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Options -| Option | Default | Description | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | -| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | -| `style` | `"bold cyan"` | The style for the module. | -| `disabled` | `false` | Disables the `directory` module. | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
This module has a few advanced configuration options that control how the directory is displayed. @@ -839,6 +842,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an *: This variable can only be used as a part of a style string +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| گۆڕاو | نموونە | Description | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Mirrors the value of option `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
+ ### نموونە ```toml @@ -1048,7 +1066,7 @@ default = "unknown user" | Option | Default | Description | | ---------- | ------------------------------ | ---------------------------------------------------------------------------- | | `symbol` | `""` | The symbol used before displaying the variable value. | -| `گۆڕاو` | | The environment variable to be displayed. | +| `variable` | | The environment variable to be displayed. | | `default` | | The default value to be displayed when the selected variable is not defined. | | `format` | `"with [$env_value]($style) "` | The format for the module. | | `disabled` | `false` | Disables the `env_var` module. | @@ -1159,13 +1177,14 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud ### Options -| Option | Default | Description | -| ---------------- | ---------------------------------------------------------- | --------------------------------------------------------------- | -| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | -| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `gcloud` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------------------------------- | ---------------------------------------------------------------- | +| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | +| `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. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `gcloud` module. | ### Variables @@ -1214,6 +1233,17 @@ us-central1 = "uc1" asia-northeast1 = "an1" ``` +#### Display account and aliased project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' +[gcloud.project_aliases] +very-long-project-name = "vlpn" +``` + ## Git Branch The `git_branch` module shows the active branch of the repo in your current directory. @@ -1711,39 +1741,6 @@ The `julia` module shows the currently installed version of [Julia](https://juli symbol = "∴ " ``` -## localip - -The `localip` module shows the IPv4 address of the primary network interface. - -### Options - -| Option | Default | Description | -| ---------- | ------------------------- | ------------------------------------------------------ | -| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `true` | Disables the `localip` module. | - -### Variables - -| گۆڕاو | نموونە | Description | -| --------- | ------------ | ----------------------------------- | -| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | -| style\* | | Mirrors the value of option `style` | - -*: This variable can only be used as a part of a style string - -### نموونە - -```toml -# ~/.config/starship.toml - -[localip] -ssh_only = false -format = "@[$localipv4](bold red) " -disabled = false -``` - ## Kotlin The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: @@ -1793,7 +1790,7 @@ kotlin_binary = "kotlinc" ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. 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 @@ -1815,8 +1812,10 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | گۆڕاو | نموونە | Description | | --------- | -------------------- | ---------------------------------------- | -| context | `starship-cluster` | The current kubernetes context | +| context | `starship-context` | The current kubernetes context name | | namespace | `starship-namespace` | If set, the current kubernetes namespace | +| user | `starship-user` | If set, the current kubernetes user | +| cluster | `starship-cluster` | If set, the current kubernetes cluster | | symbol | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | @@ -1828,12 +1827,12 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [kubernetes] -format = 'on [⛵ $context \($namespace\)](dimmed green) ' +format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false [kubernetes.context_aliases] "dev.local.cluster.k8s" = "dev" ".*/openshift-cluster/.*" = "openshift" -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,12 +1848,12 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` ## Line Break @@ -1876,6 +1875,39 @@ The `line_break` module separates the prompt into two lines. disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Options + +| Option | Default | Description | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `localip` module. | + +### Variables + +| گۆڕاو | نموونە | Description | +| --------- | ------------ | ----------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### نموونە + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). By default the module will be shown if any of the following conditions are met: @@ -2059,12 +2091,12 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ ### Variables -| گۆڕاو | نموونە | Description | -| --------- | -------- | ------------------------------------ | -| state | `بێخەوش` | The state of the nix-shell | -| name | `lorri` | The name of the nix-shell | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| گۆڕاو | نموونە | Description | +| --------- | ------- | ------------------------------------ | +| state | `pure` | The state of the nix-shell | +| name | `lorri` | The name of the nix-shell | +| 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 diff --git a/docs/ckb-IR/installing/README.md b/docs/ckb-IR/installing/README.md index b12cf29cf..3b623915b 100644 --- a/docs/ckb-IR/installing/README.md +++ b/docs/ckb-IR/installing/README.md @@ -63,7 +63,6 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett { programs.starship = { enable = true; - enableZshIntegration = true; # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/de-DE/config/README.md b/docs/de-DE/config/README.md index e9ceeada8..4a039e2ee 100644 --- a/docs/de-DE/config/README.md +++ b/docs/de-DE/config/README.md @@ -261,7 +261,9 @@ format = "$all$directory$character" ## AWS -Das `aws`-Modul zeigt das aktuelle AWS-Profil an. Dies basiert auf den Umgebungsvariablen: `AWS_REGION`, `AWS_DEFAULT_REGION`, `AWS_PROFILE` und der `~/.aws/config` Datei. This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. Dies basiert auf den Umgebungsvariablen: `AWS_REGION`, `AWS_DEFAULT_REGION`, `AWS_PROFILE` und der `~/.aws/config` Datei. This module also shows an expiration timer when using temporary credentials. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. 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. @@ -360,7 +362,7 @@ style = "blue bold" ## 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. +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%. ### Optionen @@ -388,7 +390,7 @@ discharging_symbol = "💀 " ### Anzeige des Akkustandes -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). Wenn `display` nicht angegeben ist. Die Standardwerte sind folgende: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. Die Standardwerte sind folgende: ```toml [[battery.display]] @@ -400,7 +402,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### Optionen -Die `display`-Option beinhaltet ein Array mit den folgenden Werten. +The `display` option is an array of the following table. | Option | Standardwert | Beschreibung | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | @@ -426,9 +428,9 @@ discharging_symbol = "💦" ## Zeichen -Das `character` Modul zeigt ein Zeichen ( meistens einen Pfeil "❯") vor der Texteingabe an. +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -Das Zeichen zeigt an ob der letzte Befehl erfolgreich war, oder einen Fehler erzeugt hat. It can do this in two ways: +The character will tell you whether the last command was successful or not. It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -556,15 +558,15 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ## Befehlsdauer -Das `cmd_duration` Modul zeigt an wie lange der letzte Befehl ausgeführt wurde. Das Modul wird nur angezeigt wenn der letzte Befehl länger als zwei Sekunden ausgeführt wurde. Mit der `min_time` Option kann die Zeit eingestellt werden ab der <0>cmd_duration angezeigt wird. +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. -::: warning Nicht die DEBUG-trap in der Bash hooken +::: warning Do not hook the DEBUG trap in Bash -Ist `bash` die Konsole der Wahl, dann nicht die `DEBUG`-trap nach der Ausführung von `eval $(starship init $0)` hooken, andernfalls **wird** dieses Modul unweigerlich untergehen. +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -Bash Nutzer, die eine "preexec" ähnliche Funktion benötigen, können [rcaloras bash_preexec Framework](https://github.com/rcaloras/bash-preexec) verwenden. Definieren Sie einfach die Arrays `preexec_functions` und `precmd_functions` bevor sie `eval $(starship init $0)` ausführen, und fahren Sie dann wie gewohnt fort. +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### Optionen @@ -602,9 +604,9 @@ 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. -::: Tipp +::: tip -Hinweis: Dies unterdrückt nicht conda's eigenen Prompt-Modifikator, sie können jedoch conda mit `conda config --set changeps1 False` konfigurieren, um die Ausgabe von conda selbst auszuschalten. +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. ::: @@ -787,7 +789,7 @@ format = "via [🦕 $version](green bold) " ## Verzeichnis -Das `directory` -Modul zeigt den Pfad zu Ihrem aktuellen Verzeichnis an, abgeschnitten auf drei übergeordnete Ordner. Your directory will also be truncated to the root of the git repo that you're currently in. +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. @@ -795,22 +797,23 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Optionen -| Option | Standardwert | Beschreibung | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | Die Anzahl der übergeordneten Ordner, die angezeigt werden. | -| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Das Format für das Modul. | -| `style` | `"bold cyan"` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `directory`-Modul. | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Option | Standardwert | Beschreibung | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | Die Anzahl der übergeordneten Ordner, die angezeigt werden. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Das Format für das Modul. | +| `style` | `"bold cyan"` | Stil für dieses Modul. | +| `disabled` | `false` | Deaktiviert das `directory`-Modul. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
-Dieses Modul hat einige erweiterte Konfigurationsoptionen, welche die Darstellung von Verzeichnissen steuern. +This module has a few advanced configuration options that control how the directory is displayed. | Advanced Option | Standardwert | Beschreibung | | --------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -839,6 +842,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an *: This variable can only be used as a part of a style string +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Variable | Beispiel | Beschreibung | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Spiegelt den Wert der Option `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
+ ### Beispiel ```toml @@ -912,13 +930,13 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,23 +1848,23 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` -## Zeilenumbruch +## Line Break -Das `line_break`-Modul unterteilt den Prompt in zwei Zeilen. +The `line_break` module separates the prompt into two lines. ### Optionen -| Option | Standardwert | Beschreibung | -| ---------- | ------------ | ---------------------------------------------------------------------- | -| `disabled` | `false` | Deaktiviert das `line_break`-Modul, wodurch der Prompt einzeilig wird. | +| Option | Standardwert | Beschreibung | +| ---------- | ------------ | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | ### Beispiel @@ -1876,6 +1875,39 @@ Das `line_break`-Modul unterteilt den Prompt in zwei Zeilen. disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Optionen + +| Option | Standardwert | Beschreibung | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | Das Format für das Modul. | +| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `disabled` | `true` | Disables the `localip` module. | + +### Variables + +| Variable | Beispiel | Beschreibung | +| --------- | ------------ | ------------------------------------ | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| 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 + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). By default the module will be shown if any of the following conditions are met: @@ -1919,25 +1951,25 @@ format = "via [🌕 $version](bold blue) " ## Speicherauslastung -Das `memory_usage` Modul zeigt den aktuellen Systemspeicher und die swap-Nutzung an. +The `memory_usage` module shows current system memory and swap usage. -Standardmäßig wird die swap-Nutzung angezeigt, wenn der gesamte System-swap nicht Null ist. +By default the swap usage is displayed if the total system swap is non-zero. -::: Tipp +::: tip -Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Optionen -| Option | Standardwert | Beschreibung | -| ----------- | ----------------------------------------------- | --------------------------------------------------------------------- | -| `threshold` | `75` | Speicherauslastung ausblenden, wenn sie unter diesem Prozentsatz ist. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Das Format für das Modul. | -| `symbol` | `"🐏"` | Symbol das vor der Speicherauslastung angezeigt wird. | -| `style` | `"bold dimmed white"` | Stil für dieses Modul. | -| `disabled` | `true` | Deaktiviert das `memory_usage`-Modul. | +| Option | Standardwert | Beschreibung | +| ----------- | ----------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Das Format für das Modul. | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | Stil für dieses Modul. | +| `disabled` | `true` | Disables the `memory_usage` module. | ### Variables @@ -2013,7 +2045,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | | `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | @@ -2044,7 +2076,7 @@ symbol = "🎣 " ## Nix-Shell -The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. Das Modul wird angezeigt, wenn es sich in einer nix-Shell-Umgebung befindet. +The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. ### Optionen @@ -2055,7 +2087,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | `style` | `"bold blue"` | Stil für dieses Modul. | | `impure_msg` | `"impure"` | A format string shown when the shell is impure. | | `pure_msg` | `"pure"` | A format string shown when the shell is pure. | -| `disabled` | `false` | Deaktiviert das `nix_shell`-Modul. | +| `disabled` | `false` | Disables the `nix_shell` module. | ### Variables @@ -2102,7 +2134,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | | `style` | `"bold green"` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `nodejs`-Modul. | +| `disabled` | `false` | Disables the `nodejs` module. | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2208,7 +2240,7 @@ symbol = "☁️ " ## Paketversion -Das `Package` Modul wird angezeigt, wenn das aktuelle Verzeichnis das Repository für ein Paket ist, und zeigt dessen aktuelle Version an. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2234,11 +2266,11 @@ Das `Package` Modul wird angezeigt, wenn das aktuelle Verzeichnis das Repository | Option | Standardwert | Beschreibung | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | | `format` | `"is [$symbol$version]($style) "` | Das Format für das Modul. | -| `symbol` | `"📦 "` | Symbol das vor der Paketversion angezeigt wird. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `"bold 208"` | Stil für dieses Modul. | | `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | Deaktiviert das `package`-Modul. | +| `disabled` | `false` | Disables the `package` module. | ### Variables @@ -2313,12 +2345,12 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `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` | `"🐘 "` | Symbol das vor der PHP-Version angezeigt wird. | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | | `detect_extensions` | `["php"]` | Which extensions should trigger this module. | | `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `style` | `"147 bold"` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `php`-Modul. | +| `disabled` | `false` | Disables the `php` module. | ### Variables @@ -2343,7 +2375,7 @@ format = "via [🔹 $version](147 bold) " The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version. -::: Tipp +::: tip By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). @@ -2366,13 +2398,13 @@ By default the module will be shown if any of the following conditions are met: ### Variables -| Variable | Beispiel | Beschreibung | -| ------------ | ---------- | ------------------------------------- | -| version | `v0.12.24` | The version of `pulumi` | -| stack | `dev` | The current Pulumi stack | -| benutzername | `alice` | The current Pulumi username | -| symbol | | Spiegelt den Wert der Option `symbol` | -| style\* | | Spiegelt den Wert der Option `style` | +| Variable | Beispiel | Beschreibung | +| --------- | ---------- | ------------------------------------- | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| username | `alice` | The current Pulumi username | +| 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 @@ -2461,15 +2493,15 @@ By default the module will be shown if any of the following conditions are met: | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"🐍 "` | A format string representing the symbol of Python | | `style` | `"yellow bold"` | Stil für dieses Modul. | -| `pyenv_version_name` | `false` | Verwende `pyenv` um die Python-Versionzu beziehen. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | | `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `["py"]` | Which extensions should trigger this module | | `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `disabled` | `false` | Deaktiviert das `python`-Modul. | +| `disabled` | `false` | Disables the `python` module. | -::: Tipp +::: tip 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. @@ -2568,7 +2600,7 @@ format = "with [📐 $version](blue bold) " ## Red -By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: +By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met: - The current directory contains a file with `.red` or `.reds` extension @@ -2606,7 +2638,7 @@ symbol = "🔴 " ## Ruby -By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: +By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met: - Das aktuelle Verzeichnis enthält eine `Gemfile`-Datei - The current directory contains a `.ruby-version` file @@ -2627,7 +2659,7 @@ Starship gets the current Ruby version by running `ruby -v`. | `detect_folders` | `[]` | Which folders should trigger this module. | | `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | | `style` | `"bold red"` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `ruby`-Modul. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -2650,7 +2682,7 @@ symbol = "🔺 " ## Rust -By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: +By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met: - Das aktuelle Verzeichnis enthält eine `Cargo.toml`-Datei - Das aktuelle Verzeichnis enthält eine Datei mit der `.rs`-Erweiterung @@ -2666,7 +2698,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `style` | `"bold red"` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `rust`-Modul. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -2731,9 +2763,9 @@ symbol = "🌟 " The `shell` module shows an indicator for currently used shell. -::: Tipp +::: tip -Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2761,7 +2793,7 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis | Variable | Standardwert | Beschreibung | | --------- | ------------ | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | -| style\* | | Spiegelt den Wert der Option `style`. | +| style\* | | Mirrors the value of option `style`. | *: This variable can only be used as a part of a style string @@ -2850,9 +2882,9 @@ format = '[📦 \[$env\]]($style) ' The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer. -::: Tipp +::: tip -Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2911,9 +2943,9 @@ disabled = false The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. -::: Tipp +::: tip -Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2958,7 +2990,7 @@ disabled = false ## Swift -By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: +By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met: - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -2999,7 +3031,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. -::: Tipp +::: tip By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). @@ -3021,7 +3053,7 @@ By default the module will be shown if any of the following conditions are met: | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | | `style` | `"bold 105"` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `terraform` Modul. | +| `disabled` | `false` | Disables the `terraform` module. | ### Variables @@ -3056,33 +3088,33 @@ format = "[🏎💨 $workspace]($style) " ## Zeit -Das `time` Modul zeigt die aktuelle **lokale** Zeit an. Der `format` Wert wird von der crate [`chrono`](https://crates.io/crates/chrono) benutzt um die Zeit zu formatieren. Schau dir [die chrono strftime Dokumentation](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) an, um die möglichen Optionen zu sehen. +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. -::: Tipp +::: tip -Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Optionen -| Option | Standardwert | Beschreibung | -| ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | -| `use_12hr` | `false` | Aktiviert die Formatierung der Uhrzeit im 12-Stunden-Format. | -| `time_format` | Siehe unten | Das Format zum Anzeigen der Uhrzeit in [chrono-Formatierung](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html). | -| `style` | `"bold yellow"` | Stil für dieses Modul. | -| `utc_time_offset` | `"local"` | Legt das UTC-Offset fest, das verwendet werden soll. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | -| `disabled` | `true` | Deaktiviert das `time`-Modul. | -| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | +| Option | Standardwert | Beschreibung | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Ansonsten ist der Standardwert hierfür `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. +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 | Variable | Beispiel | Beschreibung | | --------- | ---------- | ------------------------------------ | -| uhrzeit | `13:08:10` | The current time. | +| time | `13:08:10` | The current time. | | style\* | | Spiegelt den Wert der Option `style` | *: This variable can only be used as a part of a style string @@ -3102,14 +3134,14 @@ time_range = "10:00:00-14:00:00" ## Benutzername -Das Modul `username` zeigt den Benutzernamen des aktiven Benutzers. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: - Der aktuelle Benutzer ist root - Der aktuelle Benutzer ist nicht derjenige, der derzeit angemeldet ist - Der Benutzer ist über eine SSH-Sitzung verbunden - Die Variale `show_always` ist auf `true` gesetzt -::: Tipp +::: tip 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. @@ -3117,13 +3149,13 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` ### Optionen -| Option | Standardwert | Beschreibung | -| ------------- | ----------------------- | --------------------------------- | -| `style_root` | `"bold red"` | Stil beim root-Benutzer. | -| `style_user` | `"bold yellow"` | Stil bei allen anderen Benutzern. | -| `format` | `"[$user]($style) in "` | Das Format für das Modul. | -| `show_always` | `false` | `username`-Modul immer anzeigen. | -| `disabled` | `false` | Deaktiviert das `username`-Modul. | +| Option | Standardwert | Beschreibung | +| ------------- | ----------------------- | ------------------------------------- | +| `style_root` | `"bold red"` | The style used when the user is root. | +| `style_user` | `"bold yellow"` | The style used for non-root users. | +| `format` | `"[$user]($style) in "` | Das Format für das Modul. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | ### Variables @@ -3253,7 +3285,7 @@ format = "[🆅 $repo](bold blue) " ## Zig -By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft: +By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met: - The current directory contains a `.zig` file @@ -3301,19 +3333,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) matchs with `os` field if defined. -::: Tipp +::: tip Multiple custom modules can be defined by using a `.`. ::: -::: Tipp +::: tip 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. ::: -::: Tipp +::: tip [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! @@ -3329,20 +3361,20 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt ### Optionen -| Option | Standardwert | Beschreibung | -| -------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | -| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. | -| `shell` | | [See below](#custom-command-shell) | -| `beschreibung` | `""` | The description of the module that is shown when running `starship explain`. | -| `files` | `[]` | The files that will be searched in the working directory for a match. | -| `directories` | `[]` | The directories that will be searched in the working directory for a match. | -| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | -| `symbol` | `""` | The symbol used before displaying the command output. | -| `style` | `"bold green"` | Stil für dieses Modul. | -| `format` | `"[$symbol($output )]($style)"` | Das Format für das Modul. | -| `disabled` | `false` | Disables this `custom` module. | -| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | +| Option | Standardwert | Beschreibung | +| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. | +| `shell` | | [See below](#custom-command-shell) | +| `description` | `""` | The description of the module that is shown when running `starship explain`. | +| `files` | `[]` | The files that will be searched in the working directory for a match. | +| `directories` | `[]` | The directories that will be searched in the working directory for a match. | +| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | +| `symbol` | `""` | The symbol used before displaying the command output. | +| `style` | `"bold green"` | Stil für dieses Modul. | +| `format` | `"[$symbol($output )]($style)"` | Das Format für das Modul. | +| `disabled` | `false` | Disables this `custom` module. | +| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | ### Variables diff --git a/docs/de-DE/installing/README.md b/docs/de-DE/installing/README.md index 50da21aa9..5778426ca 100644 --- a/docs/de-DE/installing/README.md +++ b/docs/de-DE/installing/README.md @@ -63,7 +63,6 @@ Aktivieren Sie das Modul `programs.starship` in Ihrer `home.nix`-Datei und füge { programs.starship = { enable = true; - enableZshIntegration = true; # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/es-ES/README.md b/docs/es-ES/README.md index 0b966b67a..51b86fb01 100644 --- a/docs/es-ES/README.md +++ b/docs/es-ES/README.md @@ -18,7 +18,7 @@ features: footer: Bajo una licencia ISC | Derechos de autor © 2019-presente Colaboradores de Starship #Used for the description meta tag, for SEO metaTitle: "Starship: el prompt multi-intérprete" -description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos! Muestra la información que necesitas, a la par que es elegante y minimalista. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.' +description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos! Muestra la información que necesitas, a la par que es elegante y minimalista. Instalación rápida disponible para Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, y PowerShell.' ---
@@ -168,7 +168,7 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente #### Cmd - You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory: + Necesitas usar [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) con Cmd. Añade lo siguiente a un archivo `starship.lua` y coloca este archivo en el directorio de scripts de Clink: ```lua -- starship.lua diff --git a/docs/es-ES/advanced-config/README.md b/docs/es-ES/advanced-config/README.md index f0a4c3cd0..fe277881b 100644 --- a/docs/es-ES/advanced-config/README.md +++ b/docs/es-ES/advanced-config/README.md @@ -8,11 +8,11 @@ Las configuraciones de esta sección están sujetos a cambios en futuras version ::: -## Custom pre-prompt and pre-execution Commands in Cmd +## Comandos pre-prompt y pre-ejecución personalizados en Cmd -Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: +Clink proporciona una API extremadamente flexible para ejecutar comandos pre-prompt y pre-ejecución en la shell de Cmd. Es bastante sencillo de usar con Starship. Haz los siguientes cambios a tu archivo `starship.lua` según tus requisitos: -- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do +- Para ejecutar una función personalizada justo antes de dibujar la shell, defina una nueva función llamada `starship_preprompt_user_func`. Esta función recibe el prompt actual como una cadena que puedes utilizar. Por ejemplo, para dibujar un cohete antes del prompt, podrías hacer lo siguiente ```lua function starship_preprompt_user_func(prompt) @@ -22,7 +22,7 @@ end load(io.popen('starship init cmd'):read("*a"))() ``` -- To run a custom function right before a command is executed, define a new function called `starship_precmd_user_func`. This function receives the current commandline as a string that you can utilize. For example, to print the command that's about to be executed, you would do +- Para ejecutar una función personalizada justo antes de ejecutar un comando, define una nueva función llamada `starship_precmd_user_func`. Esta función recibe la línea de comandos actual como una cadena que se puede utilizar. Por ejemplo, para imprimir el comando que va a ser ejecutado, escribirías ```lua function starship_precmd_user_func(line) @@ -71,7 +71,7 @@ function Invoke-Starship-PreCommand { ## Cambiar título de la ventana -Algunos intérpretes de comandos van a cambiar automáticamente el título de la ventana por ti (p. ej., para mostrar tu directorio actual). Fish incluso lo hace por defecto. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`. +Algunos intérpretes de comandos van a cambiar automáticamente el título de la ventana por ti (p. ej., para mostrar tu directorio actual). Fish incluso lo hace por defecto. Starship no hace esto, pero es bastante sencillo añadir esta funcionalidad a `bash`, `zsh`, `cmd` o `powershell`. Primero, define una función para el cambio de título de la ventana (idéntico en Bash y zsh): @@ -106,7 +106,7 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` -For Cmd, you can change the window title using the `starship_preprompt_user_func` function. +Para Cmd, puedes cambiar el título de la ventana usando la función `starship_preprompt_user_func`. ```lua function starship_preprompt_user_func(prompt) @@ -133,7 +133,7 @@ Algunos intérpretes de órdenes soportan un prompt derecho que se renderiza en Nota: El prompt derecho es una sola línea siguiendo la ubicación de entrada. Para alinear módulos arriba de la línea de entrada en un prompt multi-línea, vea el [módulo fill](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd. +`right_format` está actualmente soportado para los siguientes intérpretes de comandos: elvish, fish, zsh, xonsh, cmd. ### Ejemplo @@ -153,15 +153,15 @@ Produce un prompt como el siguiente: ▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s ``` -## Continuation Prompt +## Prompt de continuación -Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote). +Algunos intérpretes de comandos admiten un prompt de continuacion junto con el prompt normal. Este prompt es renderizado en lugar del prompt normal cuando el usuario ha introducido una orden incompleta (como solamente un paréntesis izquierdo o comilla). -Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `"[∙](bright-black) "`. +Starship puede establecer el prompt de continuación usando la opción `continuation_prompt`. El prompt por defecto es `"[∙](bright-black) "`. -Note: `continuation_prompt` should be set to a literal string without any variables. +Nota: `continuation_prompt` debe establecerse en una cadena literal sin ninguna variable. -Note: Continuation prompts are only available in the following shells: +Nota: Los prompts de continuación solo están disponibles en los siguientes intérpretes de comandos: - `bash` - `zsh` @@ -172,7 +172,7 @@ Note: Continuation prompts are only available in the following shells: ```toml # ~/.config/starship.toml -# A continuation prompt that displays two filled in arrows +# Un prompt de continuación que muestra dos flechas rellenas continuation_prompt = "▶▶" ``` @@ -196,7 +196,7 @@ El token `none` anula todos los demás tokens en una cadena si no es parte de un Un especificador de color puede ser uno de los siguientes: -- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). +- Uno de los colores estándar del terminal: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Opcionalmente puede prefijar estos con `bright-` para obtener la versión brillante (por ejemplo, `bright-white`). - Un `#` seguido de un número hexadecimal de seis dígitos. Esto especifica un [código hexadecimal de color RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp). - Un número entre 0-255. Esto especifica un [Código de color ANSI de 8-bits](https://i.stack.imgur.com/KTSQa.png). diff --git a/docs/es-ES/config/README.md b/docs/es-ES/config/README.md index 90c58c213..38973fdd3 100644 --- a/docs/es-ES/config/README.md +++ b/docs/es-ES/config/README.md @@ -9,14 +9,14 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Toda la configuración de Starship se realiza en este archivo [TOML](https://github.com/toml-lang/toml): ```toml -# Inserts a blank line between shell prompts +# Inserta una línea en blanco al inicio del prompt 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" +# Reemplaza el símbolo "❯" por "➜" en el prompt +[character] # El nombre del módulo que se está configurando es "character" +success_symbol = "[➜](bold green)"# El segmento "success_symbol" se establece como "➜" con el color "bold green" -# Disable the package module, hiding it from the prompt completely +# Deshabilita el módulo "package", ocultándolo por completo del prompt [package] disabled = true ``` @@ -33,7 +33,7 @@ El equivalente en PowerShell (Windows) es añadir esta línea a tu `$PROFILE`: $ENV:STARSHIP_CONFIG = "$HOME\example\non\default\path\starship.toml" ``` -Or for Cmd (Windows) would be adding this line to your `starship.lua`: +O para Cmd (Windows) añadiría esta línea a su `starship.lua`: ```lua os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\starship.toml') @@ -53,7 +53,7 @@ El equivalente en PowerShell (Windows) es añadir esta línea a tu `$PROFILE`: $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` -Or for Cmd (Windows) would be adding this line to your `starship.lua`: +O para Cmd (Windows) añadiría esta línea a su `starship.lua`: ```lua os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') @@ -73,7 +73,7 @@ Es el formato con el que un módulo imprime todas sus variables. La mayoría de #### Variable -Una variable contiene un símbolo `$` seguido por el nombre de la variable. The name of a variable can only contain letters, numbers and `_`. +Una variable contiene un símbolo `$` seguido por el nombre de la variable. El nombre de una variable solamente puede contener letras, números y `_`. Por ejemplo: @@ -118,11 +118,11 @@ Por ejemplo: - `(algún texto)` siempre mostrará nada ya que no hay variables envueltas entre llaves. - Cuando `$all` es un atajo para `\[$a$b\]`, `($all)` no mostrará nada solo si `$a` y `$b` ambos son `None`. Esto funciona igual que `(\[$a$b\] )`. -#### Special characters +#### Caracteres especiales -The following symbols have special usage in a format string and must be escaped: `$ \ [ ] ( )`. +Los siguientes símbolos tienen un uso especial en una cadena de formato y deben ser escapados: `$ \ [ ] ( )`. -Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`). +Ten en cuenta que TOML tiene [cadenas de caracteres básicas y cadenas de caracteres literales](https://toml.io/en/v1.0.0#string). Se recomienda usar una cadena de caracteres literal (rodeada de comillas simples) en tu configuración. Si quieres utilizar una cadena de caracteres básica (rodeada de comillas dobles), debes escapar la barra inversa, en sí misma (es decir, utilizar `\\`). Por ejemplo, cuando se desea imprimir un símbolo `$` en una nueva línea, las siguientes configuraciones para el `format` son equivalentes: @@ -255,19 +255,21 @@ $character""" Si solo quieres extender el formato predeterminado, puedes usar `$all`; los módulos que se añaden explícitamente al formato no serán duplicados. Ej. ```toml -# Move the directory to the second line -format = "$all$directory$character" +# Mueve el módulo directorio a la segunda línea +format="$all$directory$character" ``` ## AWS -El módulo `aws` muestra la región actual de AWS y el perfil. Éste se basa en las variables de entorno `AWS_REGION`, `AWS_DEFAULT_REGION`, y `AWS_PROFILE` del fichero `~/.aws/config`. Este módulo también muestra un temporizador de caducidad al usar credenciales temporales. +El módulo `aws` muestra la región y el perfil actual de AWS cuando se han configurado credenciales o un `credential_process`. Éste se basa en las variables de entorno `AWS_REGION`, `AWS_DEFAULT_REGION`, y `AWS_PROFILE` del fichero `~/.aws/config`. Este módulo también muestra un temporizador de caducidad al usar credenciales temporales. -Cuando se utiliza [aws-vault](https://github.com/99designs/aws-vault), el perfil se lee de la variable de entorno `AWS_VAULT` y la fecha de expiración de credenciales se lee de la variable de entorno `AWS_SESSION_EXPIRATION`. +El módulo mostrará un perfil solamente si sus credenciales están presentes en `~/.aws/credentials` o un `credential_process` está definido en `~/.aws/config`. Alternativamente, es suficiente con tener cualquiera de las siguientes variables de entorno `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, o `AWS_SESSION_TOKEN`. + +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`. Cuando uses [awsu](https://github.com/kreuzwerker/awsu) el perfil se obtiene de la variable de entorno `AWSU_PROFILE`. -Cuando se utiliza [AWSume](https://awsu.me), el perfil se lee de la variable de entorno `AWSUME_PROFILE` y la fecha de expiración de credenciales se lee de la variable de entorno `AWSUME_EXPIRATION`. +Cuando se utiliza [AWSume](https://awsu.me), el perfil se obtiene de la variable de entorno `AWSUME_PROFILE` y la fecha de expiración de credenciales se obtiene de la variable de entorno `AWSUME_EXPIRATION`. ### Opciones @@ -290,7 +292,7 @@ Cuando se utiliza [AWSume](https://awsu.me), el perfil se lee de la variable de | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplos @@ -335,16 +337,16 @@ symbol = "🅰 " ## Azure -The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. +El módulo `azure` muestra la suscripción Azure actual. Esto consiste en mostrar el nombre de la suscripción predeterminada, como se define en el archivo `~/.azure/azureProfile.json`. ### Opciones -| Variable | Por defecto | Descripción | -| ---------- | ---------------------------------------- | ------------------------------------------ | -| `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 | Por defecto | 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`. | ### Ejemplo @@ -360,7 +362,7 @@ style = "blue bold" ## Battery -El módulo `battery` muestra la cantidad de batería y si está cargando o no. El módulo es solo visible cuando la batería está por debajo del 10%. +El módulo `battery` muestra qué tan cargada está la batería del dispositivo y su estado de carga actual. El módulo solamente es visible cuando la batería del dispositivo está por debajo del 10%. ### Opciones @@ -388,7 +390,7 @@ discharging_symbol = "💀 " ### Indicador de batería -La opción de configuración `display` se utiliza para definir cuándo debe mostrarse el indicador de batería (threshold), qué symbol se utilizaría (symbol), y cómo sería (style). Si no se provee ningún valor para `display` El valor por defecto es el siguiente: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. El valor por defecto es el siguiente: ```toml [[battery.display]] @@ -396,11 +398,11 @@ threshold = 10 style = "bold red" ``` -El valor por defecto para las opciones `charging_symbol` y `discharging_symbol` son respectivamente los valores `charging_symbol` y `discharging_symbol` de las opción de `battery`. +The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. #### Opciones -La opción `display` es un array de la siguiente tabla. +The `display` option is an array of the following table. | Opción | Por defecto | Descripción | | -------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------- | @@ -412,28 +414,28 @@ La opción `display` es un array de la siguiente tabla. #### Ejemplo ```toml -[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% +[[battery.display]] # Estilo "rojo fuerte" y símbolo de descarga cuando la capacidad está entre 0% y 10% threshold = 10 style = "bold red" -[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% +[[battery.display]] # Estilo "amarillo fuerte" y símbolo 💦 cuando la capacidad está entre 10% y 30% threshold = 30 style = "bold yellow" discharging_symbol = "💦" -# when capacity is over 30%, the battery indicator will not be displayed +# cuando la capacidad está sobre el 30%, el indicador de batería no se visualizara ``` -## Character +## Carácter -El módulo `character` muestra un carater (normalmente una flecha) tras el texto que introduces en el terminal. +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -El carácter te dirá si el último comando funcionó o no. Se puede hacer de dos maneras: +The character will tell you whether the last command was successful or not. It can do this in two ways: - Cambiando el color (`red`/`green`) - Cambiando la forma (`.`/`✖`) -Por defecto sólo cambia el color. Si también se quiere cambiar su forma, ver [este ejemplo](#with-custom-error-shape). +By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). ::: aviso @@ -496,10 +498,10 @@ vicmd_symbol = "[V](bold green) " ## CMake -El módulo `cmake` muestra la versión actualmente instalada de [CMake](https://cmake.org/). Por defecto el módulo se activará si se cumplen cualquiera de las siguientes condiciones: +The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: - El directorio actual contiene un archivo `CMakeLists.txt` -- The current directory contains a `CMakeCache.txt` file +- El directorio actual contiene un archivo `CMakeCache.txt` ### Opciones @@ -522,11 +524,11 @@ El módulo `cmake` muestra la versión actualmente instalada de [CMake](https:// | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ## COBOL / GNUCOBOL -El módulo `cobol` muestra la versión instalada de COBOL. Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met: - El directorio actual contiene cualquier archivo que termine en `.cob` o `.COB` - El directorio actual contiene cualquier archivo que termine en `.cbl` o `.CBL` @@ -552,32 +554,32 @@ El módulo `cobol` muestra la versión instalada de COBOL. Por defecto, el módu | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo -## Tiempo de Ejecución +## Tiempo de ejecución -El módulo `cmd_duration` muestra cuánto tiempo tardó el último comando en ejecutarse. El módulo se mostrará solo si el comando llevó dos segundos o más, o el valor de `min_time`, si existe. +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. -::: warning No utilizar DEBUG en Bash +::: warning Do not hook the DEBUG trap in Bash -Si estás usando Starship con `bash`, no uses `DEBUG` después de ejecutar `eval $(starship init $0)`, o el módulo **se romperá**. +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -Los usuarios de bash que necesiten la funcionalidad preexec-like pueden usar el framework rcaloras's bash_preexec. Simplemente define los arrays preexec_functions y precmd_functions antes de ejecutar eval $(starship init $0), y continúa con normalidad. Basta con definir los arrays `preexec_functions` y `precmd_functions` antes de ejecutar `eval $(starship init $0)`, y luego proceder como siempre. +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### Opciones -| Opción | Por defecto | Descripción | -| ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `min_time` | `2_000` | Duración mínima para mostrar el tiempo de ejecución (en milisegundos) | -| `show_milliseconds` | `false` | Muestra la duración con precisión en milisegundos. | -| `format` | `"took [$duration]($style) "` | El formato del módulo. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `cmd_duration`. | -| `show_notifications` | `false` | Muestra notificaciones de escritorio cuando se complete el comando. | -| `min_time_to_notify` | `45_000` | Duración mínima para mostrar el tiempo de ejecución (en milisegundos). | -| `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. | +| Opción | Por defecto | Descripción | +| ---------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `min_time` | `2_000` | Duración mínima para mostrar el tiempo de ejecución (en milisegundos) | +| `show_milliseconds` | `false` | Muestra la duración con precisión en milisegundos. | +| `format` | `"took [$duration]($style) "` | El formato del módulo. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `cmd_duration`. | +| `show_notifications` | `false` | Muestra notificaciones de escritorio cuando se complete el comando. | +| `min_time_to_notify` | `45_000` | Duración mínima para mostrar el tiempo de ejecución (en milisegundos). | +| `notification_timeout` | | Duración para mostrar la notificación (en milisegundos). Si no se establece, el tiempo de espera para notificar será determinado por el demonio. No todos los demonios de notificaciones honran esta opción. | ### Variables @@ -586,7 +588,7 @@ Los usuarios de bash que necesiten la funcionalidad preexec-like pueden usar el | duration | `16m40s` | El tiempo que tardó en ejecutar el comando | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -600,11 +602,11 @@ format = "underwent [$duration](bold yellow)" ## Conda -El módulo `conda` muestra el entorno actual [Conda](https://docs.conda.io/en/latest/), si `$CONDA_DEFAULT_ENV` está configurado. +The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. -::: consejo +::: tip -Esto no modifica el propio símbolo de sistema de Conda. En caso de querer suprimirlo, ejecuta `conda config --set changeps1 False`. +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. ::: @@ -627,7 +629,7 @@ Esto no modifica el propio símbolo de sistema de Conda. En caso de querer supri | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -638,28 +640,28 @@ Esto no modifica el propio símbolo de sistema de Conda. En caso de querer supri format = "[$symbol$environment](dimmed green) " ``` -## Container +## Contenedor The `container` module displays a symbol and container name, if inside a container. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ------------------------------------ | ----------------------------------------- | -| `symbol` | `"⬢"` | The symbol shown, when inside a container | -| `style` | `"bold red dimmed"` | El estilo del módulo. | -| `format` | "[$symbol \\[$name\\]]($style) " | El formato del módulo. | -| `disabled` | `false` | Disables the `container` module. | +| Opción | Predeterminado | Descripción | +| ---------- | ------------------------------------ | ---------------------------------------------------------------- | +| `symbol` | `"⬢"` | El símbolo mostrado, cuando se encuentra dentro de un contenedor | +| `style` | `"bold red dimmed"` | El estilo del módulo. | +| `format` | "[$symbol \\[$name\\]]($style) " | El formato del módulo. | +| `disabled` | `false` | Deshabilita el módulo `container`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------------------- | -------------------------------------- | -| name | `fedora-toolbox:35` | The name of the container | +| name | `fedora-toolbox:35` | El nombre del contenedor | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -672,7 +674,7 @@ format = "[$symbol \\[$name\\]]($style) " ## Crystal -El módulo `cristal` muestra la versión instalada de [Crystal](https://crystal-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un fichero `shard.yml` - El directorio actual contiene un fichero `.cr` @@ -698,7 +700,7 @@ El módulo `cristal` muestra la versión instalada de [Crystal](https://crystal- | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -711,7 +713,7 @@ format = "via [✨ $version](bold blue) " ## Dart -El módulo `dart` muestra la versión instalada de [Dart](https://dart.dev/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `dart` module shows the currently installed version of [Dart](https://dart.dev/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo con la extensión `.dart` - El directorio actual contiene un directorio `.dart_tool` @@ -738,7 +740,7 @@ El módulo `dart` muestra la versión instalada de [Dart](https://dart.dev/). Po | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -751,9 +753,9 @@ format = "via [🔰 $version](bold red) " ## Deno -El módulo `deno` le muestra la versión instalada de [Deno](https://deno.land/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `deno` module shows you your currently installed version of [Deno](https://deno.land/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file +- El directorio actual contiene un archivo `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` o `deps.js` ### Opciones @@ -787,30 +789,31 @@ format = "via [🦕 $version](green bold) " ## Directory -El módulo `directory` muestra la ruta hasta el directorio actual, mostrando tres directorios padre como máximo. Tu directorio se truncará a la raíz del repositorio git en el que estés. +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. -Cuando usas el estilo fish de la opción pwd, en lugar de ocultar la ruta truncada, verás una versión acortada del nombre de cada directorio basada en el número que activa la opción. +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. -Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repositorio y el valor de la opción es `1`. En ese caso, verás `~/D/N/nixpkgs/pkgs`, cuando antes hubiera sido `nixpkgs/pkgs`. +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. ### Opciones -| Opción | Por defecto | Descripción | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | El número de directorios padre a los que se debe truncar el directorio actual. | -| `truncate_to_repo` | `true` | Trunca o no hasta la raíz del repositorio git en el que estés. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | El formato del módulo. | -| `style` | `"bold cyan"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `directory`. | -| `read_only` | `"🔒"` | El símbolo que indica si el directorio actual es de sólo lectura. | -| `read_only_style` | `"red"` | El estilo para el símbolo de sólo lectura. | -| `truncation_symbol` | `""` | El símbolo a prefijar a las rutas truncadas. ej: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | El símbolo que indica el directorio personal. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Opción | Predeterminado | Descripción | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | El número de directorios padre a los que se debe truncar el directorio actual. | +| `truncate_to_repo` | `true` | Trunca o no hasta la raíz del repositorio git en el que estés. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | El formato del módulo. | +| `style` | `"bold cyan"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `directory`. | +| `read_only` | `"🔒"` | El símbolo que indica si el directorio actual es de sólo lectura. | +| `read_only_style` | `"red"` | El estilo para el símbolo de sólo lectura. | +| `truncation_symbol` | `""` | El símbolo a prefijar a las rutas truncadas. ej: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
-Este módulo tiene algunas opciones avanzadas de configuración que controlan cómo se muestra el directorio. +This module has a few advanced configuration options that control how the directory is displayed. | Opciones avanzadas | Por defecto | Descripción | | --------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -818,7 +821,7 @@ Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repos | `fish_style_pwd_dir_length` | `0` | El número de caracteres a usar al aplicar la lógica de ruta pwd de la shell de fish. | | `use_logical_path` | `true` | Si `true` renderiza la ruta lógica originada desde el intérprete de comandos a través de `PWD` o `--logical-path`. Si `false` en su lugar renderiza la ruta física del sistema de archivos con enlaces simbólicos resueltos. | -`substitutions` permite definir reemplazos arbitrarios para cadenas literales que ocurren en la ruta, por ejemplo prefijos largos de red o directorios de desarrollo (p. ej. Java). Ten en cuenta que esto desactivará el estilo PWD de fish. +`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. ```toml [directory.substitutions] @@ -826,7 +829,7 @@ Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repos "src/com/long/java/path" = "mypath" ``` -`fish_style_pwd_dir_length` interactúa con las opciones de truncamiento estándar de una manera que puede sorprenderse primero: si no es cero, los componentes de la ruta que normalmente se truncarían se muestran con esa cantidad de caracteres. Por ejemplo, la ruta `/built/this/city/on/rock/and/roll`, que normalmente se mostraría como `rock/and/roll`, se mostraría como `/b/t/c/o/rock/and/roll` con `fish_style_pwd_dir_length = 1`--los componentes de ruta que normalmente se eliminarían se muestran con un solo carácter. Para `fish_style_pwd_dir_length = 2`, sería `/bu/th/ci/on/rock/and/roll`. +`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
@@ -837,7 +840,22 @@ Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repos | path | `"D:/Projects"` | La ruta de directorio actual | | style\* | `"black bold dimmed"` | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo + +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Variable | Ejemplo | Descripción | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Refleja el valor de la opción `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
### Ejemplo @@ -855,26 +873,26 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Opciones -| Opción | Por defecto | Descripción | -| ------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | El formato del módulo. | -| `symbol` | `"🐳 "` | El símbolo usado antes de mostrar el contexto de Docker. | -| `only_with_files` | `true` | Mostrar solo cuando haya una coincidencia | -| `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo (necesita que `solly_with_files` sea verdadero, con un valor "true"). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Qué nombres de archivo deberían activar este módulo (necesita que `solly_with_files` sea verdadero, con un valor "true"). | -| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo (necesita que `solly_with_files` sea verdadero, con un valor "true"). | -| `style` | `"blue bold"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `docker_context`. | +| Opción | Por defecto | Descripción | +| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | El formato del módulo. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `only_with_files` | `true` | Only show when there's a match | +| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | +| `style` | `"blue bold"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------------- | -------------------------------------- | -| context | `test_context` | El contexto actual de docker | +| context | `test_context` | The current docker context | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -887,9 +905,9 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -El módulo `dotnet` muestra la versión usada de .NET Core SDK para el directorio actual. Si el SDK ha sido anclado en el directorio actual, se mostrará la versión fijada. De lo contrario, el módulo muestra la última versión instalada del SDK. +The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. -Por defecto, este módulo solo se mostrará en tu prompt cuando uno o más de de los siguientes archivos estén presentes en el directorio actual: +By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: - `global.json` - `project.json` @@ -900,11 +918,11 @@ Por defecto, este módulo solo se mostrará en tu prompt cuando uno o más de de - `*.fsproj` - `*.xproj` -También necesitará tener instalado .NET Core SDK para poder usarlo correctamente. +You'll also need the .NET Core SDK installed in order to use it correctly. -Internamente, este módulo utiliza su propio mecanismo para la detección de versiones. Normalmente es el doble de rápido que ejecutar `dotnet --version`, pero puede mostrar una versión incorrecta si tu proyecto .NET tiene un diseño de directorio inusual. Si la precisión es más importante que la velocidad, puede desactivar el mecanismo estableciendo `heuristic = false` en las opciones del módulo. +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. -El módulo también mostrará el Target Framework Moniker ([https://docs.microsoft. om/es/dotnet/standard/frameworks#supported-target-framework-versions](https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions)) cuando exista un archivo csproj en el directorio actual. +The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. ### Opciones @@ -912,24 +930,24 @@ El módulo también mostrará el Target Framework Moniker ([https://docs.microso | ------------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | El formato del módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `".NET "` | Símbolo usado antes de mostrar la versión de .NET | -| `heuristic` | `true` | Usa una detección de versiones más rápida para mantener a starship veloz. | +| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | | `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | | `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `dotnet`. | +| `disabled` | `false` | Disables the `dotnet` module. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | ---------------- | --------------------------------------------------------------- | -| version | `v3.1.201` | La version del sdk de `dotnet` | -| tfm | `netstandard2.0` | El Target Framework Moniker al que se dirige el proyecto actual | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | ---------------- | ------------------------------------------------------------------ | +| version | `v3.1.201` | The version of `dotnet` sdk | +| tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -944,7 +962,7 @@ heuristic = false ## Elixir -El módulo `elixir` muestra la versión instalada de [Elixir](https://elixir-lang.org/) y [Erlang/OTP](https://erlang.org/doc/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `elixir` module shows the currently installed version of [Elixir](https://elixir-lang.org/) and [Erlang/OTP](https://erlang.org/doc/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `mix.exs`. @@ -952,25 +970,25 @@ El módulo `elixir` muestra la versión instalada de [Elixir](https://elixir-lan | Opción | Por defecto | Descripción | | ------------------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version \(OTP $otp_version\) )]($style)'` | El formato para el módulo elixir. | +| `format` | `'via [$symbol($version \(OTP $otp_version\) )]($style)'` | The format for the module elixir. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💧 "` | El símbolo usado antes de mostrar la version de Elixir/Erlang. | +| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["mix.exs"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | | `style` | `"bold purple"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `elixir`. | +| `disabled` | `false` | Disables the `elixir` module. | ### Variables | Variable | Ejemplo | Descripción | | ----------- | ------- | -------------------------------------- | -| version | `v1.10` | La version de `elixir` | -| otp_version | | La version de otp de `elixir` | +| version | `v1.10` | The version of `elixir` | +| otp_version | | The otp version of `elixir` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -983,7 +1001,7 @@ symbol = "🔮 " ## Elm -El módulo `elm` muestra la versión instalada de [Elm](https://elm-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `elm` module shows the currently installed version of [Elm](https://elm-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `elm.json` - El directorio actual contiene un archivo `elm-package.json` @@ -997,22 +1015,22 @@ El módulo `elm` muestra la versión instalada de [Elm](https://elm-lang.org/). | ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | | `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 Elm. | +| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. | | `detect_extensions` | `["elm"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["elm.json", "elm-package.json", ".elm-version"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `["elm-stuff"]` | Qué carpetas deberían activar estos módulos. | +| `detect_folders` | `["elm-stuff"]` | Which folders should trigger this modules. | | `style` | `"cyan bold"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `elm`. | +| `disabled` | `false` | Disables the `elm` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | --------- | -------------------------------------- | -| version | `v0.19.1` | La versión de `elm` | +| version | `v0.19.1` | The version of `elm` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1025,14 +1043,14 @@ format = "via [ $version](cyan bold) " ## Variable de entorno -El módulo `env_var` muestra el valor actual de una variable de entorno seleccionada. El módulo se mostrará sólo si se cumplen cualquiera de las siguientes condiciones: +The `env_var` module displays the current value of a selected environment variables. The module will be shown only if any of the following conditions are met: - La opción de configuración de `variable` coincide con una variable de entorno existente - La opción de configuración de `variable` no está definida, pero la opción de configuración se encuentra `por defecto` -::: consejo Múltiples variables de entorno pueden mostrarse usando un `.`. (ver ejemplo) Si la opción de configuración de la `variable` no está definida, el módulo mostrará el valor de la variable bajo el nombre del texto después del caracter `.`. +::: tip 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. -Ejemplo: la siguiente configuración mostrará el valor de la variable de entorno USER +Example: following configuration will display value of USER environment variable ```toml # ~/.config/starship.toml @@ -1045,23 +1063,23 @@ default = "unknown user" ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ------------------------------ | -------------------------------------------------------------------------------------- | -| `symbol` | `""` | El símbolo usado antes de mostrar el valor de la variable. | -| `variable` | | La variable de entorno a mostrar. | -| `default` | | El valor por defecto que se mostrará cuando la variable seleccionada no está definida. | -| `format` | `"with [$env_value]($style) "` | El formato del módulo. | -| `disabled` | `false` | Desactiva el módulo `env_var`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------ | ---------------------------------------------------------------------------- | +| `symbol` | `""` | The symbol used before displaying the variable value. | +| `variable` | | The environment variable to be displayed. | +| `default` | | The default value to be displayed when the selected variable is not defined. | +| `format` | `"with [$env_value]($style) "` | El formato del módulo. | +| `disabled` | `false` | Disables the `env_var` module. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | ------------------------------------- | ------------------------------------------- | -| env_value | `Windows NT` (si _variable_ es `$OS`) | El valor de entorno de la opción `variable` | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | `black bold dimmed` | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | ------------------------------------------- | ------------------------------------------ | +| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | `black bold dimmed` | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1073,7 +1091,7 @@ variable = "SHELL" default = "unknown shell" ``` -Mostrando múltiples variables de entorno: +Displaying multiple environmental variables: ```toml # ~/.config/starship.toml @@ -1087,7 +1105,7 @@ default = "unknown user" ## Erlang -El módulo `erlang` muestra la versión instalada de [Erlang/OTP](https://erlang.org/doc/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `erlang` module shows the currently installed version of [Erlang/OTP](https://erlang.org/doc/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un fichero `rebar.config`. - El directorio actual contiene un fichero `erlang.mk`. @@ -1098,22 +1116,22 @@ El módulo `erlang` muestra la versión instalada de [Erlang/OTP](https://erlang | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `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` | `" "` | El símbolo usado antes de mostrar la versión de Erlang. | +| `symbol` | `" "` | The symbol used before displaying the version of erlang. | | `style` | `"bold red"` | El estilo del módulo. | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["rebar.config", "elang.mk"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `disabled` | `false` | Desactiva el módulo `erlang`. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `disabled` | `false` | Disables the `erlang` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | --------- | -------------------------------------- | -| version | `v22.1.3` | La versión de `erlang` | +| version | `v22.1.3` | The version of `erlang` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1126,15 +1144,15 @@ format = "via [e $version](bold red) " ## Llenar -El módulo `fill` llena cualquier espacio extra en la línea con un símbolo. Si múltiples módulos `fill` están presentes en una línea, dividirán el espacio equitativamente entre ellos. Esto es útil para alinear otros módulos. +The `fill` module fills any extra space on the line with a symbol. If multiple `fill` modules are present in a line they will split the space evenly between them. This is useful for aligning other modules. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | -------------- | ------------------------------------------ | -| `symbol` | `"."` | El símbolo utilizado para llenar la línea. | -| `style` | `"bold black"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `fill` | +| Opción | Por defecto | Descripción | +| ---------- | -------------- | --------------------------------- | +| `symbol` | `"."` | The symbol used to fill the line. | +| `style` | `"bold black"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `fill` module | ### Ejemplo @@ -1147,7 +1165,7 @@ symbol = "-" style = "bold green" ``` -Produce un prompt que se ve como: +Produces a prompt that looks like: ``` AA -------------------------------------------- BB -------------------------------------------- CC @@ -1155,31 +1173,32 @@ AA -------------------------------------------- BB ----------------------------- ## Google Cloud (`gcloud`) -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`. +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. ### Opciones -| Opción | Por defecto | Descripción | -| ---------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | El formato del módulo. | -| `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. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `gcloud`. | +| Opción | Por defecto | Descripción | +| ----------------- | ---------------------------------------------------------- | ---------------------------------------------------------------- | +| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | El formato del módulo. | +| `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. | +| `style` | `"bold blue"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `gcloud` module. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | ------------- | ----------------------------------------------------------------------------- | -| region | `us-central1` | La región GCP actual | -| account | `foo` | El perfil actual de GCP | -| dominio | `ejemplo.com` | El dominio actual del perfil GCP | -| project | | El proyecto GCP actual | -| active | `default` | El nombre de configuración activo escrito en `~/.config/gcloud/active_config` | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | ------------- | ------------------------------------------------------------------ | +| region | `us-central1` | The current GCP region | +| account | `foo` | The current GCP profile | +| domain | `example.com` | The current GCP profile domain | +| project | | The current GCP project | +| active | `default` | The active config name written in `~/.config/gcloud/active_config` | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplos @@ -1214,34 +1233,45 @@ us-central1 = "uc1" asia-northeast1 = "an1" ``` +#### Display account and aliased project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' +[gcloud.project_aliases] +very-long-project-name = "vlpn" +``` + ## Git Branch -El módulo `git_branch` muestra la rama activa del repositorio en tu directorio actual. +The `git_branch` module shows the active branch of the repo in your current directory. ### Opciones -| Opción | Por defecto | Descripción | -| -------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `always_show_remote` | `false` | Muestra el nombre de la rama de seguimiento remoto, incluso si es igual al nombre de la rama local. | -| `format` | `"on [$symbol$branch]($style) "` | El formato del módulo. Use `"$branch"` para referirse al nombre de la rama actual. | -| `symbol` | `" "` | Una cadena de formato que representa el símbolo de la rama git. | -| `style` | `"bold purple"` | El estilo del módulo. | -| `truncation_length` | `2^63 - 1` | Trunca una rama git a grafemas `N`. | -| `truncation_symbol` | `"…"` | El símbolo usado para indicar que un nombre de rama fue truncado. Puedes usar `""` para ningún símbolo. | -| `only_attached` | `false` | Mostrar solo el nombre de la rama cuando no esté en un estado `HEAD`. | -| `disabled` | `false` | Desactiva el módulo `git_branch`. | +| Opción | Por defecto | Descripción | +| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | +| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. | +| `format` | `"on [$symbol$branch]($style) "` | El formato del módulo. Use `"$branch"` to refer to the current branch name. | +| `symbol` | `" "` | A format string representing the symbol of git branch. | +| `style` | `"bold purple"` | El estilo del módulo. | +| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` graphemes. | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. | +| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. | +| `disabled` | `false` | Disables the `git_branch` module. | ### Variables -| Variable | Ejemplo | Descripción | -| ------------- | -------- | -------------------------------------------------------------------------------------------------------------- | -| branch | `master` | El nombre de la rama actual, vuelve a `HEAD` si no hay ninguna rama actual (por ejemplo, git detached `HEAD`). | -| remote_name | `origin` | El nombre remoto. | -| remote_branch | `master` | El nombre de la rama rastreada en `remote_name`. | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| ------------- | -------- | ------------------------------------------------------------------------------------------------------ | +| branch | `master` | The current branch name, falls back to `HEAD` if there's no current branch (e.g. git detached `HEAD`). | +| remote_name | `origin` | The remote name. | +| remote_branch | `master` | The name of the branch tracked on `remote_name`. | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1256,28 +1286,28 @@ truncation_symbol = "" ## Git commit -El módulo `git_commit` muestra el hash de la confirmación actual y también la etiqueta (si existe) del repositorio en su directorio actual. +The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory. ### Opciones -| Opción | Por defecto | Descripción | -| -------------------- | ---------------------------------- | -------------------------------------------------------------------------------------- | -| `commit_hash_length` | `7` | La longitud del hash del commit de git mostrado. | -| `format` | `"[\\($hash$tag\\)]($style) "` | El formato del módulo. | -| `style` | `"bold green"` | El estilo del módulo. | -| `only_detached` | `true` | Mostrar solo el hash de la confirmación de git cuando esté en estado "detached `HEAD`" | -| `tag_disabled` | `true` | Deshabilita mostrar información de etiquetas en el módulo `git_commit`. | -| `tag_symbol` | `" 🏷 "` | Símbolo de etiqueta prefijando la información mostrada | -| `disabled` | `false` | Desactiva el módulo `git_commit`. | +| Opción | Por defecto | Descripción | +| -------------------- | ---------------------------------- | ------------------------------------------------------- | +| `commit_hash_length` | `7` | The length of the displayed git commit hash. | +| `format` | `"[\\($hash$tag\\)]($style) "` | El formato del módulo. | +| `style` | `"bold green"` | El estilo del módulo. | +| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state | +| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. | +| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown | +| `disabled` | `false` | Disables the `git_commit` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | --------- | ------------------------------------- | -| hash | `b703eb3` | El hash actual del commit de git | +| hash | `b703eb3` | The current git commit hash | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1291,33 +1321,33 @@ tag_symbol = "🔖 " ## Git state -El módulo `git_state` se mostrará en directorios que son parte de un repositorio git, y donde hay una operación en curso, tales como: _REBASING_, _BISECTING_, etc. Si hay información de progreso (por ejemplo, REBASING 3/10), esa información será mostrada también. +The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too. ### Opciones -| Opción | Por defecto | Descripción | -| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `rebase` | `"REBASING"` | Una cadena de formato que se muestra cuando un `rebase` está en progreso. | -| `merge` | `"MERGING"` | Una cadena de formato que se muestra cuando un `merge` está en progreso. | -| `revert` | `"REVERTING"` | Una cadena de formato mostrada cuando un `revert` está en progreso. | -| `cherry_pick` | `"CHERRY-PICKING"` | Una cadena de formato que se muestra cuando un `cherry-pick` está en progreso. | -| `bisect` | `"BISECTING"` | Una cadena de formato que se muestra cuando un `bisect` está en progreso. | -| `am` | `"AM"` | Una cadena de formato que se muestra cuando un `apply-mailbox` (`git am`) está en progeso. | -| `am_or_rebase` | `"AM/REBASE"` | Una cadena de formato que se muestra cuando un ambiguo `apply-builbox` o `rebase` está en progreso. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | El formato del módulo. | -| `disabled` | `false` | Desactiva el módulo `git_state`. | +| Opción | Por defecto | Descripción | +| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `rebase` | `"REBASING"` | A format string displayed when a `rebase` is in progress. | +| `merge` | `"MERGING"` | A format string displayed when a `merge` is in progress. | +| `revert` | `"REVERTING"` | A format string displayed when a `revert` is in progress. | +| `cherry_pick` | `"CHERRY-PICKING"` | A format string displayed when a `cherry-pick` is in progress. | +| `bisect` | `"BISECTING"` | A format string displayed when a `bisect` is in progress. | +| `am` | `"AM"` | A format string displayed when an `apply-mailbox` (`git am`) is in progress. | +| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | El formato del módulo. | +| `disabled` | `false` | Disables the `git_state` module. | ### Variables | Variable | Ejemplo | Descripción | | ---------------- | ---------- | ------------------------------------- | -| state | `REBASING` | El estado actual del repositorio | -| progress_current | `1` | El progreso de la operación actual | -| progress_total | `2` | El progreso total de la operación | +| state | `REBASING` | The current state of the repo | +| progress_current | `1` | The current operation progress | +| progress_total | `2` | The total operation progress | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1331,34 +1361,34 @@ cherry_pick = "[🍒 PICKING](bold red)" ## Métricas de Git -El módulo `git_metrics` mostrará el número de líneas añadidas y eliminadas en el repositorio git actual. +The `git_metrics` module will show the number of added and deleted lines in the current git repository. -::: consejo +::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Opciones -| Opción | Por defecto | Descripción | -| -------------------- | ------------------------------------------------------------ | -------------------------------------------------- | -| `added_style` | `"bold green"` | El estilo para el recuento añadido. | -| `deleted_style` | `"bold red"` | El estilo para el recuento eliminado. | -| `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`. | +| Opción | Por defecto | Descripción | +| -------------------- | ------------------------------------------------------------ | ------------------------------------- | +| `added_style` | `"bold green"` | The style for the added count. | +| `deleted_style` | `"bold red"` | The style for the deleted count. | +| `only_nonzero_diffs` | `true` | Render status only for changed items. | +| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | El formato del módulo. | +| `disabled` | `true` | Disables the `git_metrics` module. | ### Variables -| Variable | Ejemplo | Descripción | -| ----------------- | ------- | --------------------------------------------- | -| added | `1` | El número actual de líneas añadidas | -| deleted | `2` | El número actual de líneas eliminadas | -| added_style\* | | Refleja el valor de la opción `added_style` | -| deleted_style\* | | Refleja el valor de la opción `deleted_style` | +| Variable | Ejemplo | Descripción | +| ----------------- | ------- | ------------------------------------------- | +| added | `1` | The current number of added lines | +| deleted | `2` | The current number of deleted lines | +| added_style\* | | Mirrors the value of option `added_style` | +| deleted_style\* | | Mirrors the value of option `deleted_style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1372,59 +1402,59 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' ## Git status -El módulo `git_status` muestra símbolos que representan el estado del repositorio en su directorio actual. +The `git_status` module shows symbols representing the state of the repo in your current directory. ### Opciones -| Opción | Por defecto | Descripción | -| ------------------- | ----------------------------------------------- | ---------------------------------------- | -| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | El formato por defecto para `git_status` | -| `conflicted` | `"="` | Esta rama tiene conflictos de fusión. | -| `ahead` | `"⇡"` | El formato de `ahead` | -| `behind` | `"⇣"` | El formato de `behind` | -| `diverged` | `"⇕"` | El formato de `diverged` | -| `up_to_date` | `""` | El formato de `up_to_date` | -| `untracked` | `"?"` | El formato de `untracked` | -| `stashed` | `"$"` | El formato de `stashed` | -| `modified` | `"!"` | El formato de `modified` | -| `staged` | `"+"` | El formato de `staged` | -| `renamed` | `"»"` | El formato de `renamed` | -| `deleted` | `"✘"` | El formato de `deleted` | -| `style` | `"bold red"` | El estilo del módulo. | -| `ignore_submodules` | `false` | Ignore changes to submodules. | -| `disabled` | `false` | Desactiva el módulo `git_status`. | +| Opción | Por defecto | Descripción | +| ------------------- | ----------------------------------------------- | ----------------------------------- | +| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | +| `conflicted` | `"="` | This branch has merge conflicts. | +| `ahead` | `"⇡"` | The format of `ahead` | +| `behind` | `"⇣"` | The format of `behind` | +| `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"` | El estilo del módulo. | +| `ignore_submodules` | `false` | Ignore changes to submodules. | +| `disabled` | `false` | Disables the `git_status` module. | ### Variables -Las siguientes variables se pueden utilizar en `format`: +The following variables can be used in `format`: -| Variable | Descripción | -| -------------- | ------------------------------------------------------------------------------------------------------------------------ | -| `all_status` | Atajo para `$conflicted$stashed$deleted$renamed$modified$staged$untracked` | -| `ahead_behind` | Muestra la cadena de formato de `diverged` `ahead` o `behind` o `up_to_date` basado en el estado actual del repositorio. | -| `conflicted` | Muestra `conflicted` cuando esta rama tiene conflictos de fusión. | -| `untracked` | Muestra `untracked` cuando hay archivos sin rastrear en el directorio de trabajo. | -| `stashed` | Muestra `stashed` cuando existe un "stash" para el repositorio local. | -| `modified` | Muestra `modified` cuando hay modificaciones de archivo en el directorio de trabajo. | -| `staged` | Muestra `staged` cuando se ha añadido un nuevo archivo al área de "stash". | -| `renamed` | Muestra `renamed` cuando un archivo renombrado ha sido añadido al área de "stash". | -| `deleted` | Muestra `deleted` cuando un archivo ha sido añadido al área de "stash". | -| style\* | Refleja el valor de la opción `style` | +| Variable | Descripción | +| -------------- | ------------------------------------------------------------------------------------------------------------- | +| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` | +| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. | +| `conflicted` | Displays `conflicted` when this branch has merge conflicts. | +| `untracked` | Displays `untracked` when there are untracked files in the working directory. | +| `stashed` | Displays `stashed` when a stash exists for the local repository. | +| `modified` | Displays `modified` when there are file modifications in the working directory. | +| `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. | +| style\* | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo -Las siguientes variables pueden ser usadas en `diverged`: +The following variables can be used in `diverged`: -| Variable | Descripción | -| -------------- | ------------------------------------------------------- | -| `ahead_count` | Número de commits por delante de la rama de seguimiento | -| `behind_count` | Número de commits detrás de la rama de seguimiento | +| Variable | Descripción | +| -------------- | ---------------------------------------------- | +| `ahead_count` | Number of commits ahead of the tracking branch | +| `behind_count` | Number of commits behind the tracking branch | -Las siguientes variales pueden ser usadas en `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` y `deleted`: +The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`: -| Variable | Descripción | -| -------- | ----------------------------- | -| `count` | Muestra el número de archivos | +| Variable | Descripción | +| -------- | ------------------------ | +| `count` | Show the number of files | ### Ejemplo @@ -1445,7 +1475,7 @@ renamed = "👅" deleted = "🗑" ``` -Mostrar el recuento delante/detrás de la rama que está siendo rastreada +Show ahead/behind count of the branch being tracked ```toml # ~/.config/starship.toml @@ -1458,7 +1488,7 @@ behind = "⇣${count}" ## Go -El módulo `golang` muestra la versión instalada de [Go](https://golang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `golang` module shows the currently installed version of [Go](https://golang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `go.mod` - El directorio actual contiene un archivo `go.sum` @@ -1475,22 +1505,22 @@ El módulo `golang` muestra la versión instalada de [Go](https://golang.org/). | ------------------- | ------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- | | `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. | +| `symbol` | `"🐹 "` | A format string representing the symbol of Go. | | `detect_extensions` | `["go"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["go.mod", "go.sum", "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` | Desactiva el módulo de `golang`. | +| `disabled` | `false` | Disables the `golang` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | --------- | -------------------------------------- | -| version | `v1.12.1` | La versión de `go` | +| version | `v1.12.1` | The version of `go` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1503,7 +1533,7 @@ format = "via [🏎💨 $version](bold cyan) " ## Helm -El módulo `helm` muestra la versión instalada de [Helm](https://helm.sh/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `helm` module shows the currently installed version of [Helm](https://helm.sh/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un fichero `helmfile.yaml` - El directorio actual contiene un archivo `Chart.yaml` @@ -1516,20 +1546,20 @@ El módulo `helm` muestra la versión instalada de [Helm](https://helm.sh/). Por | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["helmfile.yaml", "Chart.yaml"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `symbol` | `"⎈ "` | Una cadena de formato que representa el símbolo de Helm. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. | | `style` | `"bold white"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `helm`. | +| `disabled` | `false` | Disables the `helm` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v3.1.1` | La versión de `helm` | +| version | `v3.1.1` | The version of `helm` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1542,17 +1572,17 @@ format = "via [⎈ $version](bold white) " ## Hostname -El módulo `hostname` muestra el nombre de host del sistema. +The `hostname` module shows the system hostname. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ssh_only` | `true` | Mostrar sólo el nombre de host cuando esté conectado a una sesión SSH. | -| `trim_at` | `"."` | Cadena en la que el nombre de host se corta, después de la primera partida. `"."` se detendrá después del primer punto. `""` deshabilitará cualquier truncamiento | -| `format` | `"[$hostname]($style) in "` | El formato del módulo. | -| `style` | `"bold dimmed green"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `hostname`. | +| Opción | Por defecto | Descripción | +| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | +| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation | +| `format` | `"[$hostname]($style) in "` | El formato del módulo. | +| `style` | `"bold dimmed green"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `hostname` module. | ### Variables @@ -1561,7 +1591,7 @@ El módulo `hostname` muestra el nombre de host del sistema. | hostname | `computer` | The hostname of the computer | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1577,7 +1607,7 @@ disabled = false ## Java -El módulo `java` muestra la versión instalada de [Java](https://www.oracle.com/java/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, o `build.boot` - El directorio actual contiene un archivo con la extensión `.java`, `.class`, `.gradle` o `.jar`, `.clj` o `.cljc` @@ -1590,20 +1620,20 @@ El módulo `java` muestra la versión instalada de [Java](https://www.oracle.com | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | | `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `symbol` | `"☕ "` | Una cadena de formato que representa el símbolo de Java | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `symbol` | `"☕ "` | A format string representing the symbol of Java | | `style` | `"red dimmed"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `java`. | +| `disabled` | `false` | Disables the `java` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| version | `v14` | La versión de `java` | +| version | `v14` | The version of `java` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1616,9 +1646,9 @@ symbol = "🌟 " ## Jobs -El módulo `jobs` muestra el número actual de tareas en ejecución. El módulo se mostrará sólo si hay tareas en segundo plano ejecutándose. El módulo mostrará el número de tareas ejecutados si hay al menos 2 tareas, o más del valor de configuración de `number_threshold`, si existe. El módulo mostrará un símbolo si hay al menos 1 tarea, o más del valor de configuración de `symbol_threshold`, si existe. Puedes establecer ambos valores a 0 para _siempre_ mostrar el símbolo y el número de tareas, incluso si hay 0 tareas en ejecución. +The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running. -La funcionalidad por defecto es: +The default functionality is: - 0 tareas -> Nada se muestra. - 1 tarea -> `symbol` se muestra. @@ -1626,39 +1656,39 @@ La funcionalidad por defecto es: ::: aviso -Este módulo no está soportado por tcsh y nu. +This module is not supported on tcsh and nu. ::: ::: aviso -La opción `threshold` está obsoleta, pero si deseas usarla, el módulo mostrará el número de tareas en ejecución si hay más de 1 tarea, o más que el valor de configuración `threshold`, si existe. Si `threshold` se establece en 0, entonces el módulo también se mostrará cuando haya 0 tareas en ejecución. +The `threshold` option is deprecated, but if you want to use it, the module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ------------------ | ----------------------------- | ---------------------------------------------------------------------------------- | -| `threshold`* | `1` | Muestra el número de tareas si se exceden. | -| `symbol_threshold` | `1` | Muestra `symbol` si el conteo de tareas es al menos `symbol_threshold`. | -| `number_threshold` | `2` | Muestra el número de tareas si el conteo de tareas es al menos `symbol_threshold`. | -| `format` | `"[$symbol$number]($style) "` | El formato del módulo. | -| `symbol` | `"✦"` | La cadena utilizada para representar la variable `symbol`. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `jobs`. | +| Opción | Por defecto | Descripción | +| ------------------ | ----------------------------- | ------------------------------------------------------------------------ | +| `threshold`* | `1` | Show number of jobs if exceeded. | +| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | +| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | +| `format` | `"[$symbol$number]($style) "` | El formato del módulo. | +| `symbol` | `"✦"` | The string used to represent the `symbol` variable. | +| `style` | `"bold blue"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `jobs` module. | -*: Esta opción está desaprobada, por favor utiliza las opciones `number_threshold` y `symbol_threshold` en su lugar. +*: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead. ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| number | `1` | El número de tareas | +| number | `1` | The number of jobs | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1673,7 +1703,7 @@ symbol_threshold = 0 ## Julia -El módulo `julia` muestra la versión instalada de [Julia](https://julialang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `julia` module shows the currently installed version of [Julia](https://julialang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `Project.toml` - El directorio actual contiene un archivo `Manifest.toml` @@ -1687,20 +1717,20 @@ El módulo `julia` muestra la versión instalada de [Julia](https://julialang.or | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | | `detect_extensions` | `["jl"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["Project.toml", "Manifest.toml"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `symbol` | `"ஃ "` | Una cadena de formato que representa el símbolo de Julia. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | | `style` | `"bold purple"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `julia`. | +| `disabled` | `false` | Disables the `julia` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v1.4.0` | La versión de `julia` | +| version | `v1.4.0` | The version of `julia` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1711,7 +1741,141 @@ El módulo `julia` muestra la versión instalada de [Julia](https://julialang.or symbol = "∴ " ``` -## localip +## Kotlin + +The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: + +- El directorio actual contiene un archivo `.kt` o `.kts` + +### Opciones + +| Opción | Por defecto | 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` | +| `detect_extensions` | `["kt", "kts"]` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | +| `style` | `"bold blue"` | El estilo del módulo. | +| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `kotlin` module. | + +### Variables + +| Variable | Ejemplo | Descripción | +| --------- | --------- | -------------------------------------- | +| version | `v1.4.21` | The version of `kotlin` | +| 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 + +[kotlin] +symbol = "🅺 " +``` + +```toml +# ~/.config/starship.toml + +[kotlin] +# Uses the Kotlin Compiler binary to get the installed version +kotlin_binary = "kotlinc" +``` + +## Kubernetes + +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Opciones + +| Opción | Por defecto | Descripción | +| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | +| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | El formato del módulo. | +| `style` | `"cyan bold"` | El estilo del módulo. | +| `context_aliases` | | Table of context aliases to display. | +| `disabled` | `true` | Disables the `kubernetes` module. | + +### Variables + +| Variable | Ejemplo | Descripción | +| --------- | -------------------- | ---------------------------------------- | +| context | `starship-context` | The current kubernetes context name | +| namespace | `starship-namespace` | If set, the current kubernetes namespace | +| user | `starship-user` | If set, the current kubernetes user | +| cluster | `starship-cluster` | If set, the current kubernetes cluster | +| symbol | | 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 + +[kubernetes] +format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' +disabled = false +[kubernetes.context_aliases] +"dev.local.cluster.k8s" = "dev" +".*/openshift-cluster/.*" = "openshift" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +``` + +#### Regex Matching + +Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions. + +The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. + +Long and automatically generated cluster names can be identified and shortened using regular expressions: + +```toml +[kubernetes.context_aliases] +# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: +".*/openshift-cluster/.*" = "openshift" +# Or better, to rename every OpenShift cluster at once: +".*/(?P[\\w-]+)/.*" = "$var_cluster" + +# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. +# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) +# and renames every matching kube context into a more readable format (`gke-cluster-name`): +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +``` + +## Line Break + +The `line_break` module separates the prompt into two lines. + +### Opciones + +| Opción | Por defecto | Descripción | +| ---------- | ----------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | + +### Ejemplo + +```toml +# ~/.config/starship.toml + +[line_break] +disabled = true +``` + +## Local IP The `localip` module shows the IPv4 address of the primary network interface. @@ -1731,7 +1895,7 @@ The `localip` module shows the IPv4 address of the primary network interface. | localipv4 | 192.168.1.13 | Contains the primary IPv4 address | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1744,141 +1908,9 @@ format = "@[$localipv4](bold red) " disabled = false ``` -## Kotlin - -El módulo `kotlin` muestra la versión instalada de [Kotlin](https://kotlinlang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - -- El directorio actual contiene un archivo `.kt` o `.kts` - -### Opciones - -| Opción | Por defecto | 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` | -| `detect_extensions` | `["kt", "kts"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `symbol` | `"🅺 "` | Una cadena de formato que representa el símbolo de Kotlin. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `kotlin_binary` | `"kotlin"` | Configura el binario kotlin que Starship ejecuta al obtener la versión. | -| `disabled` | `false` | Deshabilita el módulo `kotlin`. | - -### Variables - -| Variable | Ejemplo | Descripción | -| --------- | --------- | -------------------------------------- | -| version | `v1.4.21` | La versión de `kotlin` | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | - -*: Esta variable sólo puede ser usada como parte de una cadena de estilo - -### Ejemplo - -```toml -# ~/.config/starship.toml - -[kotlin] -symbol = "🅺 " -``` - -```toml -# ~/.config/starship.toml - -[kotlin] -# Utiliza el binario del Compilador de Kotlin para obtener la versión instalada -kotlin_binary = "kotlinc" -``` - -## Kubernetes - -Muestra el nombre actual del [contexto de Kubernetes](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) y, si se establece, el espacio de nombres del archivo kubeconfig. El espacio de nombres necesita establecerse en el archivo kubeconfig, esto puede hacerse mediante `kubectl config set-context starship-cluster --namespace astronaut`. Si se establece la variable de entorno `$KUBECONFIG`, el módulo usará eso si no usará el `~/.kube/config`. - -::: consejo - -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. - -::: - -### Opciones - -| Opción | Por defecto | Descripción | -| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------------- | -| `symbol` | `"☸ "` | Una cadena de formato que representa el símbolo mostrado antes del Cluster. | -| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | El formato del módulo. | -| `style` | `"cyan bold"` | El estilo del módulo. | -| `context_aliases` | | Tabla de alias de contexto a mostrar. | -| `disabled` | `true` | Desactiva el módulo `kubernetes`. | - -### Variables - -| Variable | Ejemplo | Descripción | -| --------- | -------------------- | ----------------------------------------------------------- | -| context | `starship-cluster` | El contexto actual de kubernetes | -| namespace | `starship-namespace` | Si se establece, el espacio de nombres actual de kubernetes | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | - -*: Esta variable sólo puede ser usada como parte de una cadena de estilo - -### Ejemplo - -```toml -# ~/.config/starship.toml - -[kubernetes] -format = 'on [⛵ $context \($namespace\)](dimmed green) ' -disabled = false -[kubernetes.context_aliases] -"dev.local.cluster.k8s" = "dev" -".*/openshift-cluster/.*" = "openshift" -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" -``` - -#### Busqueda por Regex - -Adicional al alias simple, `context_aliases` también soporta coincidencias extendidas y renombradas usando expresiones regulares. - -La expresión regular debe coincidir en todo el contexto de kube. los grupos de captura pueden ser referenciados usando `$name` y `$N` en el reemplazo. Esto está más explicado en la documentación del [crate regex](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace). - -Los nombres de cluster generados de forma larga y automática pueden ser identificados y abreviados usando expresiones regulares: - -```toml -[kubernetes.context_aliases] -# los contextos de OpenShift llevan el espacio de nombres y el usuario en el contexto de kube: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" -# Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" - -# Los contextos de GKE, AWS y otros proveedores de nube normalmente llevan información adicional, como la región/zona. -# La siguiente entrada coincide con el formato GKE (`gke_projectname_zone_cluster-name`) -# y renombra cada contexto de kube coincidente a un formato más legible (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" -``` - -## Salto de línea - -El módulo `line_break` separa el indicador en dos líneas. - -### Opciones - -| Opción | Por defecto | Descripción | -| ---------- | ----------- | ------------------------------------------------------------------------------- | -| `disabled` | `false` | Deshabilita el módulo `line_break`, haciendo que el mensaje sea una sola línea. | - -### Ejemplo - -```toml -# ~/.config/starship.toml - -[line_break] -disabled = true -``` - ## Lua -El módulo `lua` muestra la versión instalada de [Lua](http://www.lua.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `.lua-version` - El directorio actual contiene un directorio `lua` @@ -1890,23 +1922,23 @@ El módulo `lua` muestra la versión instalada de [Lua](http://www.lua.org/). Po | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `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 Lua. | +| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | | `detect_extensions` | `["lua"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[".lua-version"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `["lua"]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold blue"` | El estilo del módulo. | -| `lua_binary` | `"lua"` | Configura el binario de lua que Starship ejecuta al obtener la versión. | -| `disabled` | `false` | Desactiva el módulo `lua`. | +| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `lua` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v5.4.0` | La versión de `lua` | +| version | `v5.4.0` | The version of `lua` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -1919,36 +1951,36 @@ format = "via [🌕 $version](bold blue) " ## Memoria utilizada -El módulo `memory_usage` muestra la memoria del sistema actual y el uso de memoria de intercambio. +The `memory_usage` module shows current system memory and swap usage. -Por defecto, el uso de swap se muestra si el intercambio total del sistema no es cero. +By default the swap usage is displayed if the total system swap is non-zero. -::: consejo +::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ----------- | ----------------------------------------------- | ------------------------------------------------------------- | -| `threshold` | `75` | Ocultar el uso de memoria a menos que supere este porcentaje. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | El formato del módulo. | -| `symbol` | `"🐏"` | El símbolo usado antes de mostrar el uso de memoria. | -| `style` | `"bold dimmed white"` | El estilo del módulo. | -| `disabled` | `true` | Desactiva el módulo `memory_usage`. | +| Opción | Por defecto | Descripción | +| ----------- | ----------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | El formato del módulo. | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | El estilo del módulo. | +| `disabled` | `true` | Disables the `memory_usage` module. | ### Variables -| Variable | Ejemplo | Descripción | -| ---------------- | ------------- | ---------------------------------------------------------------------------------- | -| ram | `31GiB/65GiB` | La memoria RAM usada/total del sistema actual. | -| ram_pct | `48%` | El porcentaje de la memoria actual del sistema. | -| swap\*\* | `1GiB/4GiB` | El tamaño de la memoria de intercambio del archivo de memoria del sistema actual. | -| swap_pct\*\* | `77%` | El porcentaje de memoria de intercambio del archivo de memoria del sistema actual. | -| symbol | `🐏` | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| ---------------- | ------------- | ------------------------------------------------------------------ | +| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | +| ram_pct | `48%` | The percentage of the current system memory. | +| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. | +| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. | +| symbol | `🐏` | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | *: This variable can only be used as a part of a style string *\*: The SWAP file information is only displayed if detected on the current system @@ -1966,28 +1998,28 @@ style = "bold dimmed green" ## Mercurial Branch -El módulo `hg_branch` muestra la rama activa del repositorio en su directorio actual. +The `hg_branch` module shows the active branch of the repo in your current directory. ### Opciones -| Opción | Por defecto | Descripción | -| ------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------- | -| `symbol` | `" "` | El símbolo usado antes del marcador hg o nombre de la rama del repositorio en su directorio actual. | -| `style` | `"bold purple"` | El estilo del módulo. | -| `format` | `"on [$symbol$branch]($style) "` | El formato del módulo. | -| `truncation_length` | `2^63 - 1` | Trunca el nombre de la rama hg a `N` grafemas | -| `truncation_symbol` | `"…"` | El símbolo usado para indicar que un nombre de rama fue truncado. | -| `disabled` | `true` | Desactiva el módulo `hg_branch`. | +| Opción | Por defecto | Descripción | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `"bold purple"` | El estilo del módulo. | +| `format` | `"on [$symbol$branch]($style) "` | El formato del módulo. | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| branch | `master` | La rama de mercurial activa | +| branch | `master` | The active mercurial branch | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2002,7 +2034,7 @@ truncation_symbol = "" ## Nim -El módulo `nim` muestra la versión instalada de [Nim](https://nim-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `nim.cfg` - El directorio actual contiene un archivo con la extensión `.nim` @@ -2013,24 +2045,24 @@ El módulo `nim` muestra la versión instalada de [Nim](https://nim-lang.org/). | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | El símbolo usado antes de mostrar la versión de Nim. | +| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | | `detect_extensions` | `["nim", "nims", "nimble"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["nim.cfg"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `nim`. | +| `disabled` | `false` | Disables the `nim` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v1.2.0` | La versión de `nimc` | +| version | `v1.2.0` | The version of `nimc` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2044,29 +2076,29 @@ symbol = "🎣 " ## Nix-shell -El módulo `nix_shell` muestra el entorno [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html). El módulo se mostrará dentro de un entorno nix-shell. +The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. ### Opciones -| Opción | Por defecto | Descripción | -| ------------ | ---------------------------------------------- | -------------------------------------------------------------------------------- | -| `format` | `'via [$symbol$state( \($name\))]($style) '` | El formato del módulo. | -| `symbol` | `"❄️ "` | Una cadena de formato que representa el símbolo de nix-shell. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `impure_msg` | `"impure"` | Una cadena de formato que se muestra cuando el intérprete de comandos es impuro. | -| `pure_msg` | `"pure"` | Una cadena de formato que se muestra cuando el intérprete de comandos es puro. | -| `disabled` | `false` | Desactiva el módulo `nix_shell`. | +| Opción | Por defecto | Descripción | +| ------------ | ---------------------------------------------- | ----------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | El formato del módulo. | +| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | +| `style` | `"bold blue"` | El estilo del módulo. | +| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | +| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `disabled` | `false` | Disables the `nix_shell` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| state | `pure` | El estado de nix-shell | -| name | `lorri` | El nombre de nix-shell | +| state | `pure` | The state of the nix-shell | +| name | `lorri` | The name of the nix-shell | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2082,7 +2114,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' ## Node.js -El módulo `nodejs` muestra la versión instalada de [Node.js](https://nodejs.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `package.json` - El directorio actual contiene un archivo `.node-version` @@ -2093,27 +2125,27 @@ El módulo `nodejs` muestra la versión instalada de [Node.js](https://nodejs.or ### Opciones -| Opción | Por defecto | 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 Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["package.json", ".node-version"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `["node_modules"]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold green"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `nodejs`. | -| `not_capable_style` | `bold red` | El estilo para el módulo cuando una propiedad de motores en package.json no coincide con la versión de Node.js. | +| Opción | Por defecto | 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` | `" "` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `["package.json", ".node-version"]` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `["node_modules"]` | Qué carpetas deberían activar este módulo. | +| `style` | `"bold green"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `nodejs` module. | +| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ---------- | -------------------------------------- | -| version | `v13.12.0` | La versión de `node` | +| version | `v13.12.0` | The version of `node` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2126,7 +2158,7 @@ format = "via [🤖 $version](bold green) " ## OCaml -El módulo `ocaml` muestra la versión instalada de [OCaml](https://ocaml.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `ocaml` module shows the currently installed version of [OCaml](https://ocaml.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo con extensión `.opam` o directorio `_opam` - El directorio actual contiene un directorio `esy.lock` @@ -2139,28 +2171,28 @@ El módulo `ocaml` muestra la versión instalada de [OCaml](https://ocaml.org/). | Opción | Por defecto | Descripción | | ------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | La cadena de formato para el módulo. | +| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | El símbolo usado antes de mostrar la versión de OCaml. | -| `global_switch_indicator` | `""` | La cadena de formato usada para representar el interruptor global de OPAM. | -| `local_switch_indicator` | `"*"` | La cadena de formato usada para representar el interruptor local de OPAM. | +| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | | `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `["_opam", "esy.lock"]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `ocaml`. | +| `disabled` | `false` | Disables the `ocaml` module. | ### Variables -| Variable | Ejemplo | Descripción | -| ---------------- | ------------ | --------------------------------------------------------------------------- | -| version | `v4.10.0` | La versión de `ocaml` | -| switch_name | `my-project` | El interruptor OPAM activo | -| switch_indicator | | Refleja el valor de `indicator` para el interruptor OPAM activo actualmente | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| ---------------- | ------------ | ----------------------------------------------------------------- | +| version | `v4.10.0` | The version of `ocaml` | +| switch_name | `my-project` | The active OPAM switch | +| switch_indicator | | Mirrors the value of `indicator` for currently active OPAM switch | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2173,27 +2205,27 @@ format = "via [🐪 $version]($style) " ## OpenStack -El módulo `openstack` muestra la nube OpenStack actual y el proyecto. El módulo solo está activo cuando la variable env `OS_CLOUD` está definida en cuyo caso leerá el archivo `nubes. aml` desde cualquiera de las [ubicaciones por defecto](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files) para obtener el proyecto actual en uso. +The `openstack` module shows the current OpenStack cloud and project. The module only active when the `OS_CLOUD` env var is set, in which case it will read `clouds.yaml` file from any of the [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). to fetch the current project in use. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | --------------------------------------------------- | ----------------------------------------------------------- | -| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | El formato del módulo. | -| `symbol` | `"☁️ "` | El símbolo usado antes de mostrar la nube OpenStack actual. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `openstack`. | +| Opción | Por defecto | Descripción | +| ---------- | --------------------------------------------------- | -------------------------------------------------------------- | +| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | El formato del módulo. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `openstack` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| cloud | `corp` | La nube OpenStack actual | -| project | `dev` | El proyecto OpenStack actual | +| cloud | `corp` | The current OpenStack cloud | +| project | `dev` | The current OpenStack project | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2208,7 +2240,7 @@ symbol = "☁️ " ## Versión del paquete -El módulo `package` se muestra cuando el directorio actual es el repositorio de un paquete, y muestra su versión actual. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – La versión del paquete `npm` se extrae del `package.json` presente en el directorio actual - [**Cargo**](https://doc.rust-lang.org/cargo/) – La versión del paquete `cargo` se extrae del `Cargo.toml` presente en el directorio actual @@ -2222,10 +2254,10 @@ El módulo `package` se muestra cuando el directorio actual es el repositorio de - [**Help**](https://helm.sh/docs/helm/helm_package/) - La versión del paquete `helm` se extrae del `Chart.yaml` presente en el directorio actual - [**Maven**](https://maven.apache.org/) - La versión de paquete `maven` se extrae del `pom.xml` presente en el directorio actual - [**Meson**](https://mesonbuild.com/) - La versión del paquete `meson` se extrae del `meson.build` presente en el directorio actual -- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - La version del paquete `shards` se extrae del archivo `shard.yml` presente - [**V**](https://vlang.io) - La versión del paquete `vlang` se extrae del `v.mod` presente en el directorio actual -- [**SBT**](https://scala-sbt.org) - The `sbt` package version is extracted from the `build.sbt` present in the current directory -- [**Dart**](https://pub.dev/) - The `dart` package version is extracted from the `pubspec.yaml` present in the current directory +- [**SBT**](https://scala-sbt.org) - La versión del paquete `sbt` se extrae del archivo `build.sbt` presente en el directorio actual +- [**Dart**](https://pub.dev/) - La versión del paquete `dart` se extrae del archivo `pubspec.yaml` presente en el directorio actual > ⚠️ La versión que se muestra es la del paquete cuyo código fuente está en tu directorio actual, no en tu gestor de paquetes. @@ -2234,21 +2266,21 @@ El módulo `package` se muestra cuando el directorio actual es el repositorio de | Opción | Por defecto | Descripción | | ----------------- | --------------------------------- | --------------------------------------------------------------------------------------- | | `format` | `"is [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"📦 "` | El símbolo usado antes de mostrar la versión del paquete. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | | `style` | `"bold 208"` | El estilo del módulo. | -| `display_private` | `false` | Activar la visualización de la versión para los paquetes marcados como privados. | -| `disabled` | `false` | Desactiva el módulo `package`. | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v1.0.0` | La versión de su paquete | +| version | `v1.0.0` | The version of your package | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2261,7 +2293,7 @@ format = "via [🎁 $version](208 bold) " ## Perl -El módulo `perl` muestra la versión instalada de [Perl](https://www.perl.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `perl` module shows the currently installed version of [Perl](https://www.perl.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `Makefile.PL` o `Build.PL` - El directorio actual contiene un archivo `cpanfile` o `cpanfile.snapshot` @@ -2273,20 +2305,20 @@ El módulo `perl` muestra la versión instalada de [Perl](https://www.perl.org/) | Opción | Por defecto | Descripción | | ------------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | La cadena de formato para el módulo. | +| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | El símbolo usado antes de mostrar la versión de Perl | +| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | | `detect_extensions` | `["pl", "pm", "pod"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold 149"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `perl`. | +| `disabled` | `false` | Disables the `perl` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | --------- | -------------------------------------- | -| version | `v5.26.1` | La versión de `perl` | +| version | `v5.26.1` | The version of `perl` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2301,7 +2333,7 @@ format = "via [🦪 $version]($style) " ## PHP -El módulo `php` muestra la versión instalada de [PHP](https://www.php.net/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `php` module shows the currently installed version of [PHP](https://www.php.net/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `composer.json` - El directorio actual contiene un archivo `.php-version` @@ -2313,22 +2345,22 @@ El módulo `php` muestra la versión instalada de [PHP](https://www.php.net/). P | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `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` | `"🐘 "` | El símbolo usado antes de mostrar la versión de PHP. | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | | `detect_extensions` | `["php"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["composer.json", ".php-version"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"147 bold"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `php`. | +| `disabled` | `false` | Disables the `php` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v7.3.8` | La versión de `php` | +| version | `v7.3.8` | The version of `php` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2343,9 +2375,9 @@ format = "via [🔹 $version](147 bold) " The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version. -::: consejo +::: tip -Por defecto la versión de Pulumi no se muestra, ya que toma un orden de magnitud más largo para cargar que la mayoría de los plugins (~70ms). Si aún deseas activarlo, [sigue el ejemplo que se muestra a continuación](#with-pulumi-version). +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). ::: @@ -2358,27 +2390,27 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes | Opción | Por defecto | Descripción | | ---------------- | -------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($username@)$stack]($style) "` | La cadena de formato para el módulo. | +| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | Una cadena de formato que se muestra antes de la pila de Pulumi. | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | | `style` | `"bold 5"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `pulumi`. | +| `disabled` | `false` | Disables the `pulumi` module. | ### Variables -| Variable | Ejemplo | Descripción | -| ----------------- | ---------- | -------------------------------------- | -| version | `v0.12.24` | La versión de `pulumi` | -| stack | `dev` | La pila actual de Pulumi | -| nombre de usuario | `alice` | The current Pulumi username | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | ---------- | -------------------------------------- | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| username | `alice` | The current Pulumi username | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo -#### Con la versión de Pulumi +#### With Pulumi Version ```toml # ~/.config/starship.toml @@ -2387,7 +2419,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes format = "[🛥 ($version )$stack]($style) " ``` -#### Sin versión de Pulumi +#### Without Pulumi version ```toml # ~/.config/starship.toml @@ -2398,7 +2430,7 @@ format = "[$symbol$stack]($style) " ## PureScript -El módulo `purescript` muestra la versión instalada de [PureScript](https://www.purescript.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `spago.dhall` - El directorio actual contiene un archivo con la extensión `.purs` @@ -2409,22 +2441,22 @@ El módulo `purescript` muestra la versión instalada de [PureScript](https://ww | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `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` | `"<=> "` | El símbolo usado antes de mostrar la versión de PureScript. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | | `detect_extensions` | `["purs"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["spago.dhall"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold white"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `purescript`. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `0.13.5` | La versión de `purescript` | +| version | `0.13.5` | The version of `purescript` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2437,9 +2469,9 @@ format = "via [$symbol$version](bold white)" ## Python -El módulo `python` muestra la versión instalada de [Python](https://www.python.org/) y el entorno virtual actual [Python](https://docs.python.org/tutorial/venv.html) si uno está activado. +The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated. -Si `pyenv_version_name` se establece en `true`, mostrará el nombre de la versión de pyenv. De lo contrario, se mostrará el número de versión de `python --version`. +If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: @@ -2459,33 +2491,33 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes | -------------------- | ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($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 Python | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | | `style` | `"yellow bold"` | El estilo del módulo. | -| `pyenv_version_name` | `false` | Usar pyenv para obtener la versión de Python | -| `pyenv_prefix` | `pyenv` | Prefijo antes de mostrar la versión de pyenv sólo se utiliza si se utiliza pyenv | -| `python_binary` | `["python", "python3", "python2"]` | Configura los binarios de python que Starship debería ejecutar al obtener la versión. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `["py"]` | Qué extensiones deben activar este módulo | | `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Qué nombres de archivo deben activar este módulo | | `detect_folders` | `[]` | Qué carpetas deben activar este módulo | -| `disabled` | `false` | Desactiva el módulo `python`. | +| `disabled` | `false` | Disables the `python` module. | -::: consejo +::: tip -La variable `python_binary` acepta una cadena o una lista de cadenas. Starship intentará ejecutar cada binario hasta que obtenga un resultado. Ten en cuenta que sólo puedes cambiar el binario que Starship ejecuta para obtener la versión de Python no los argumentos que se utilizan. +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. -Los valores por defecto y el orden para `python_binary` fue elegido para identificar primero la versión de Python en un entorno virtualenv/conda (que actualmente añade un `python`, no importa si apunta a `pithon3` o `pithon2`). Esto tiene el efecto secundario que si todavía tienes un sistema de Python 2 instalado, puede ser recogido antes de cualquier Python 3 (al menos en las Distros de Linux que siempre enlazan `/usr/bin/python` a Python 2). Si ya no trabajas con Python 2 pero no puedes removerlo del sistema, cambiando esto a `"python3"` ocultará cualquier versión de Python 2, ver ejemplo a continuación. +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. ::: ### Variables -| Variable | Ejemplo | Descripción | -| ------------ | --------------- | ------------------------------------------- | -| version | `"v3.8.1"` | La versión de `python` | -| symbol | `"🐍 "` | Refleja el valor de la opción `symbol` | -| style | `"yellow bold"` | Refleja el valor de la opción `style` | -| pyenv_prefix | `"pyenv "` | Ordena el valor de la opción `pyenv_prefix` | -| virtualenv | `"venv"` | El nombre actual del `virtualenv` | +| Variable | Ejemplo | Descripción | +| ------------ | --------------- | ------------------------------------------ | +| version | `"v3.8.1"` | The version of `python` | +| symbol | `"🐍 "` | Refleja el valor de la opción `symbol` | +| style | `"yellow bold"` | Refleja el valor de la opción `style` | +| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `"venv"` | The current `virtualenv` name | ### Ejemplo @@ -2501,7 +2533,7 @@ pyenv_version_name = true # ~/.config/starship.toml [python] -# Solo usa el binario `python3` para obtener la versión. +# Only use the `python3` binary to get the version. python_binary = "python3" ``` @@ -2509,7 +2541,7 @@ python_binary = "python3" # ~/.config/starship.toml [python] -# No se dispara con archivos con extensión py +# Don't trigger for files with the py extension detect_extensions = [] ``` @@ -2517,16 +2549,16 @@ detect_extensions = [] # ~/.config/starship.toml [python] -# Muestra la versión de python desde dentro de un entorno virtual local. +# Display the version of python from inside a local venv. # -# Ten en cuenta que esto solo funcionará cuando el venv esté dentro del proyecto y sólo -# funcionará en el directorio que contiene el directorio venv dir pero ¿tal vez esté bien? +# Note this will only work when the venv is inside the project and it will only +# work in the directory that contains the venv dir but maybe this is ok? python_binary = ["./venv/bin/python", "python", "python3", "python2"] ``` ## R -El módulo `rlang` muestra la versión instalada de [R](https://www.r-project.org/). El módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if any of the following conditions are met: - El directorio actual contiene un archivo con la extensión `.R`. - El directorio actual contiene un archivo con la extensión `.Rd`. @@ -2542,18 +2574,18 @@ El módulo `rlang` muestra la versión instalada de [R](https://www.r-project.or | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `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 R. | +| `symbol` | `"📐"` | A format string representing the symbol of R. | | `style` | `"blue bold"` | El estilo del módulo. | | `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Qué extensiones deben activar este módulo | | `detect_files` | `[".Rprofile"]` | Qué nombres de archivo deben activar este módulo | | `detect_folders` | `[".Rproj.user"]` | Qué carpetas deben activar este módulo | -| `disabled` | `false` | Deshabilita el módulo `r`. | +| `disabled` | `false` | Disables the `r` module. | ### Variables | Variable | Ejemplo | Descripción | | -------- | ------------- | -------------------------------------- | -| version | `v4.0.5` | La versión de `R` | +| version | `v4.0.5` | The version of `R` | | symbol | | Refleja el valor de la opción `symbol` | | style | `"blue bold"` | Refleja el valor de la opción `style` | @@ -2568,7 +2600,7 @@ format = "with [📐 $version](blue bold) " ## Red -Por defecto, el módulo `red` muestra la versión actualmente instalada de [Red](https://www.red-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met: - El directorio actual contiene un archivo con extensión `.red` o `.Red` @@ -2578,22 +2610,22 @@ Por defecto, el módulo `red` muestra la versión actualmente instalada de [Red] | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `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 Red. | +| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | | `detect_extensions` | `["red"]` | 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` | `"red bold"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `rojo`. | +| `disabled` | `false` | Disables the `red` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v2.5.1` | La versión de `red` | +| version | `v2.5.1` | The version of `red` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2606,12 +2638,12 @@ symbol = "🔴 " ## Ruby -Por defecto, el módulo `ruby` muestra la versión actualmente instalada de [Ruby](https://www.ruby-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met: - El directorio actual contiene un archivo `Gemfile` - El directorio actual contiene un archivo `.ruby-version` - El directorio actual contiene un archivo `.rb` -- The environment variables `RUBY_VERSION` or `RBENV_VERSION` are set +- Las variables de entorno `RUBY_VERSION` o `RBENV_VERSION` están configuradas Starship gets the current Ruby version by running `ruby -v`. @@ -2621,23 +2653,23 @@ Starship gets the current Ruby version by running `ruby -v`. | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `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 Ruby. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | | `detect_extensions` | `["rb"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["Gemfile", ".ruby-version"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | | `style` | `"bold red"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `ruby`. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v2.5.1` | La versión de `ruby` | +| version | `v2.5.1` | The version of `ruby` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2650,7 +2682,7 @@ symbol = "🔺 " ## Rust -Por defecto, el módulo `rust` muestra la versión instalada de [Rust](https://www.rust-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met: - El directorio actual contiene un archivo `Cargo.toml` - El directorio actual contiene un archivo con la extensión `.rs` @@ -2661,22 +2693,22 @@ Por defecto, el módulo `rust` muestra la versión instalada de [Rust](https://w | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `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 Rust | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | | `detect_extensions` | `["rs"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["Cargo.toml"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold red"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `rust`. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ----------------- | -------------------------------------- | -| version | `v1.43.0-nightly` | La versión de `rustc` | +| version | `v1.43.0-nightly` | The version of `rustc` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2689,7 +2721,7 @@ format = "via [⚙️ $version](red bold)" ## Scala -El módulo `scala` muestra la versión actualmente instalada de [Scala](https://www.scala-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `scala` module shows the currently installed version of [Scala](https://www.scala-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `build.sbt`, `.scalaenv` o `.sbtenv` - El directorio actual contiene un archivo con la extensión `.scala` o `.sbt` @@ -2703,20 +2735,20 @@ El módulo `scala` muestra la versión actualmente instalada de [Scala](https:// | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | | `detect_extensions` | `["sbt", "scala"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `[".metals"]` | Qué carpetas deberían activar estos módulos. | -| `symbol` | `"🆂 "` | Una cadena de formato que representa el símbolo de Scala. | +| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | +| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | | `style` | `"red dimmed"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `scala`. | +| `disabled` | `false` | Disables the `scala` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `2.13.5` | La versión de `scala` | +| version | `2.13.5` | The version of `scala` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2729,41 +2761,41 @@ symbol = "🌟 " ## Shell -El módulo `shell` muestra un indicador para el intérprete de comandos actualmente utilizado. +The `shell` module shows an indicator for currently used shell. -::: consejo +::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ---------------------- | ------------------------- | -------------------------------------------------------------------- | -| `bash_indicator` | `bsh` | Una cadena de formato usada para representar Bash. | -| `fish_indicator` | `fsh` | Una cadena de formato usada para representar Fish. | -| `zsh_indicator` | `zsh` | Una cadena de formato usada para representar Zsh. | -| `powershell_indicator` | `psh` | Una cadena de formato usada para representar Powershell. | -| `ion_indicator` | `ion` | Una cadena de formato usada para representar Ion. | -| `elvish_indicator` | `esh` | Una cadena de formato usada para representar Elvish. | -| `tcsh_indicator` | `tsh` | Una cadena de formato usada para representar tcsh. | -| `xonsh_indicator` | `xsh` | Una cadena de formato usada para representar xonsh. | -| `cmd_indicator` | `cmd` | A format string used to represent cmd. | -| `nu_indicator` | `nu` | A format string used to represent nu. | -| `unknown_indicator` | | El valor por defecto que se mostrará cuando se desconoce el comando. | -| `format` | `"[$indicator]($style) "` | El formato del módulo. | -| `style` | `"white bold"` | El estilo del módulo. | -| `disabled` | `true` | Deshabilita el módulo `shell`. | +| Opción | Por defecto | Descripción | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `cmd_indicator` | `cmd` | A format string used to represent cmd. | +| `nu_indicator` | `nu` | A format string used to represent nu. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | El formato del módulo. | +| `style` | `"white bold"` | El estilo del módulo. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables -| Variable | Por defecto | Descripción | -| --------- | ----------- | ------------------------------------------------------------------------------------ | -| indicator | | Ordena el valor de `indicator` para el intérprete de comandos actualmente utilizado. | -| style\* | | Refleja el valor de la opción `style`. | +| Variable | Por defecto | Descripción | +| --------- | ----------- | ---------------------------------------------------------- | +| indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplos @@ -2780,28 +2812,28 @@ disabled = false ## SHLVL -El módulo `shlvl` muestra la variable de entorno [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") actual, si está establecido en un número y reúne o supera el umbral especificado. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. ### Opciones -| Opción | Por defecto | Descripción | -| ----------- | ---------------------------- | ----------------------------------------------------------------- | -| `threshold` | `2` | Mostrar umbral. | -| `format` | `"[$symbol$shlvl]($style) "` | El formato del módulo. | -| `symbol` | `"↕️ "` | El símbolo utilizado para representar el `SHLVL`. | -| `repeat` | `false` | Hace que el `symbol` se repita con la cantidad actual de `SHLVL`. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `true` | Desactiva el módulo `shlvl`. | +| Opción | Por defecto | Descripción | +| ----------- | ---------------------------- | ------------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | El formato del módulo. | +| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `true` | Disables the `shlvl` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| shlvl | `3` | El valor actual de `SHLVL` | +| shlvl | `3` | The current value of `SHLVL` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2816,26 +2848,26 @@ threshold = 3 ## Singularity -El módulo `singularity` muestra la imagen de [singularity](https://sylabs.io/singularity/) actual, si se encuentra dentro de un contenedor y `$SINGULARITY_NAME` está establecido. +The `singularity` module shows the current [Singularity](https://sylabs.io/singularity/) image, if inside a container and `$SINGULARITY_NAME` is set. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | -------------------------------- | ------------------------------------------------------------------- | -| `format` | `'[$symbol\[$env\]]($style) '` | El formato del módulo. | -| `symbol` | `""` | Una cadena de formato que se muestra antes del nombre de la imagen. | -| `style` | `"bold dimmed blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `singularity`. | +| Opción | Por defecto | Descripción | +| ---------- | -------------------------------- | ------------------------------------------------ | +| `format` | `'[$symbol\[$env\]]($style) '` | El formato del módulo. | +| `symbol` | `""` | A format string displayed before the image name. | +| `style` | `"bold dimmed blue"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `singularity` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------------ | -------------------------------------- | -| env | `centos.img` | La imagen de Singularity actual | +| env | `centos.img` | The current Singularity image | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2848,11 +2880,11 @@ format = '[📦 \[$env\]]($style) ' ## Status -El módulo `status` muestra el código de salida del comando anterior. El módulo se mostrará sólo si el código de salida no es `0`. The status code will cast to a signed 32-bit integer. +The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer. -::: consejo +::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2860,39 +2892,39 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable ### Opciones -| Opción | Por defecto | Descripción | -| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------ | -| `format` | `"[$symbol$status]($style) "` | El formato del módulo | -| `symbol` | `"✖"` | El símbolo mostrado en error del programa | -| `success_symbol` | `"✔️"` | El símbolo mostrado en el éxito del programa | -| `not_executable_symbol` | `"🚫"` | El símbolo mostrado cuando el archivo no es ejecutable | -| `not_found_symbol` | `"🔍"` | El símbolo mostrado cuando no se encuentra el comando | -| `sigint_symbol` | `"🧱"` | El símbolo mostrado en SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | El símbolo mostrado en cualquier señal | -| `style` | `"bold red"` | El estilo del módulo. | -| `recognize_signal_code` | `true` | Activar mapeo de señales desde el código de salida | -| `map_symbol` | `false` | Activar mapeo de símbolos desde el código de salida | -| `pipestatus` | `false` | Habilita el reporte de pipstatus | -| `pipestatus_separator` | `|` | | -| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | El formato del módulo cuando el comando es un pipeline | -| `disabled` | `true` | Desactiva el módulo `status`. | +| Opción | Por defecto | Descripción | +| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `success_symbol` | `"✔️"` | The symbol displayed on program success | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | +| `style` | `"bold red"` | El estilo del módulo. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `pipestatus` | `false` | Enable pipestatus reporting | +| `pipestatus_separator` | `|` | | +| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | +| `disabled` | `true` | Disables the `status` module. | ### Variables -| Variable | Ejemplo | Descripción | -| -------------- | ------- | ------------------------------------------------------------------------------------------------------------------ | -| status | `127` | El código de salida del último comando | -| hex_status | `0x7F` | The exit code of the last command in hex | -| int | `127` | El código de salida del último comando | -| common_meaning | `ERROR` | Comprobación del código si no es una señal | -| signal_number | `9` | Número de señal correspondiente al código de salida, sólo si está señalizada | -| signal_name | `KILL` | Nombre de la señal correspondiente al código de salida, sólo si está señalizada | -| maybe_int | `7` | Contiene el número de código de salida cuando no se ha encontrado ningún significado | -| pipestatus | | Renderizado en los códigos de salida de los programas del pipeline, esto sólo está disponible en pipestatus_format | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| -------------- | ------- | ------------------------------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| hex_status | `0x7F` | The exit code of the last command in hex | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2911,9 +2943,9 @@ disabled = false The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. -::: consejo +::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2921,7 +2953,7 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable | Opción | Por defecto | Descripción | | --------------- | ----------------------- | ------------------------------------------------------- | -| `format` | `[as $symbol]($style)"` | El formato del módulo | +| `format` | `[as $symbol]($style)"` | The format of the module | | `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | | `style` | `"bold blue"` | El estilo del módulo. | | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | @@ -2934,7 +2966,7 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2958,7 +2990,7 @@ disabled = false ## Swift -Por defecto, el módulo `swift` muestra la versión instalada de [Swift](https://swift.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met: - El directorio actual contiene un archivo `Package.swift` - El directorio actual contiene un archivo con la extensión `.swift` @@ -2969,22 +3001,22 @@ Por defecto, el módulo `swift` muestra la versión instalada de [Swift](https:/ | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `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 Swift | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | | `detect_extensions` | `["swift"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["Package.swift"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold 202"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `swift`. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v5.2.4` | La versión de `swift` | +| version | `v5.2.4` | The version of `swift` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -2997,11 +3029,11 @@ format = "via [🏎 $version](red bold)" ## Terraform -El módulo `Terraform` muestra el espacio de trabajo de [Terraform](https://www.terraform.io/docs/language/state/workspaces.html) y la versión seleccionados actualmente. +The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. -::: consejo +::: tip -Por defecto no se muestra la versión de Terraform, ya que esto es lento para las versiones actuales de Terraform cuando hay muchos complementos en uso. Si aún deseas activarlo, [sigue el ejemplo que se muestra a continuación](#with-terraform-version). +By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). ::: @@ -3014,29 +3046,29 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | La cadena de formato para el módulo. | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | Una cadena de formato que se muestra antes del espacio de trabajo de terraform. | +| `symbol` | `"💠"` | A format string shown before the terraform workspace. | | `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[".terraform"]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold 105"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `terraform`. | +| `disabled` | `false` | Disables the `terraform` module. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | ---------- | ----------------------------------------- | -| version | `v0.12.24` | La versión de `terraform` | -| workspace | `default` | El espacio de trabajo actual de Terraform | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | ---------- | -------------------------------------- | +| version | `v0.12.24` | The version of `terraform` | +| workspace | `default` | The current Terraform workspace | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo -#### Con la versión de Terraform +#### With Terraform Version ```toml # ~/.config/starship.toml @@ -3045,7 +3077,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes format = "[🏎💨 $version$workspace]($style) " ``` -#### Sin la versión de Terraform +#### Without Terraform version ```toml # ~/.config/starship.toml @@ -3056,36 +3088,36 @@ format = "[🏎💨 $workspace]($style) " ## Hora -El módulo `time` muestra la hora **local** actual. El valor de configuración de `format` es usado por la caja de [`chrono`](https://crates.io/crates/chrono) para controlar cómo se muestra la hora. Echa un vistazo a [los documentos de chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) para ver qué opciones están disponibles. +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. -::: consejo +::: tip -Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ----------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | La cadena de formato para el módulo. | -| `use_12hr` | `false` | Habilita el formato de 12 horas | -| `time_format` | see below | La [cadena de formato de chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) utilizada para formatear la hora. | -| `style` | `"bold yellow"` | El estilo para la hora del módulo | -| `utc_time_offset` | `"local"` | Establece el desplazamiento UTC a utilizar. Rango de -24 < x < 24. Permite a los flotantes acomodar los desplazamientos de zona horaria de 30/45 minutos. | -| `disabled` | `true` | Desactiva el módulo `time`. | -| `time_range` | `"-"` | Establece el intervalo de tiempo durante el cual el módulo se mostrará. La hora debe ser especificada en formato de 24 horas | +| Opción | Por defecto | Descripción | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -Si `use_12hr` es `true`, entonces `time_format` por defecto `"%r"`. De lo contrario, el valor por defecto es `"%T"`. Configurar manualmente `time_format` sobrescribirá la configuración `use_12hr`. +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 | Variable | Ejemplo | Descripción | | --------- | ---------- | ------------------------------------- | -| tiempo | `13:08:10` | La hora actual. | +| time | `13:08:10` | The current time. | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -3102,35 +3134,35 @@ time_range = "10:00:00-14:00:00" ## Nombre de usuario -El módulo `username` muestra el nombre de usuario activo. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: - El usuario actual es root - El usuario actual no es el mismo que el que está conectado - El usuario está actualmente conectado como una sesión SSH - La variable `show_always` se establece en true -::: consejo +::: tip -La conexión SSH se detecta comprobando las variables de entorno `SSH_CONNECTION`, `SSH_CLIENT`, y `SSH_TTY`. Si su host SSH no configura estas variables, una solución es establecer una de ellas con un valor tonto. +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. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ------------- | ----------------------- | ------------------------------------------ | -| `style_root` | `"bold red"` | El estilo usado cuando el usuario es root. | -| `style_user` | `"bold yellow"` | El estilo usado para usuarios no root. | -| `format` | `"[$user]($style) in "` | El formato del módulo. | -| `show_always` | `false` | Siempre muestra el módulo `username`. | -| `disabled` | `false` | Desactiva el módulo `username`. | +| Opción | Por defecto | Descripción | +| ------------- | ----------------------- | ------------------------------------- | +| `style_root` | `"bold red"` | The style used when the user is root. | +| `style_user` | `"bold yellow"` | The style used for non-root users. | +| `format` | `"[$user]($style) in "` | El formato del módulo. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | ### Variables -| Variable | Ejemplo | Descripción | -| -------- | ------------ | --------------------------------------------------------------------------------------------------- | -| `style` | `"red bold"` | Refleja el valor de la opción `style_root` cuando root inició sesión y `style_user` por otra parte. | -| `user` | `"matchai"` | El ID de usuario conectado actualmente. | +| Variable | Ejemplo | Descripción | +| -------- | ------------ | ------------------------------------------------------------------------------------------- | +| `style` | `"red bold"` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | +| `user` | `"matchai"` | The currently logged-in user ID. | ### Ejemplo @@ -3147,7 +3179,7 @@ show_always = true ## Vagrant -El módulo `vagrant` muestra la versión instalada de [Vagrant](https://www.vagrantup.com/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `vagrant` module shows the currently installed version of [Vagrant](https://www.vagrantup.com/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `Vagrantfile` @@ -3157,22 +3189,22 @@ El módulo `vagrant` muestra la versión instalada de [Vagrant](https://www.vagr | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `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 Vagrant. | +| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["Vagrantfile"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"cyan bold"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `vagrant`. | +| `disabled` | `false` | Disables the `vagrant` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ---------------- | -------------------------------------- | -| version | `Vagrant 2.2.10` | La versión de `Vagrant` | +| version | `Vagrant 2.2.10` | The version of `Vagrant` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -3185,7 +3217,7 @@ format = "via [⍱ $version](bold white) " ## V -El módulo `vlang` te muestra la versión instalada de [V](https://vlang.io/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +The `vlang` module shows you your currently installed version of [V](https://vlang.io/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo con la extensión `.v` - El directorio actual contiene un archivo `v.mod`, `vpkg.json` o `.vpkg-lock.json` @@ -3196,18 +3228,18 @@ El módulo `vlang` te muestra la versión instalada de [V](https://vlang.io/). P | ------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------- | | `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` | `"V "` | Una cadena de formato que representa el símbolo de V | +| `symbol` | `"V "` | A format string representing the symbol of V | | `detect_extensions` | `["v"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"blue bold"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `vlang`. | +| `disabled` | `false` | Disables the `vlang` module. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| version | `v0.2` | La versión de `v` | +| version | `v0.2` | The version of `v` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -3221,26 +3253,26 @@ format = "via [V $version](blue bold) " ## VCSH -El módulo `vcsh` muestra el repositorio activo [VCSH](https://github.com/RichiH/vcsh) actual. El módulo sólo se mostrará si un repositorio está actualmente en uso. +The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | -------------------------------- | ------------------------------------------------------------ | -| `symbol` | | El símbolo usado antes de mostrar el nombre del repositorio. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `format` | `"vcsh [$symbol$repo]($style) "` | El formato del módulo. | -| `disabled` | `false` | Deshabilita el módulo `vcsh`. | +| Opción | Por defecto | Descripción | +| ---------- | -------------------------------- | ------------------------------------------------------ | +| `symbol` | | The symbol used before displaying the repository name. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `format` | `"vcsh [$symbol$repo]($style) "` | El formato del módulo. | +| `disabled` | `false` | Disables the `vcsh` module. | ### Variables -| Variable | Ejemplo | Descripción | -| ----------- | ----------------------------------------------------------- | -------------------------------------- | -| repositorio | `dotfiles` si está en un repositorio VCSH nombrado dotfiles | El nombre del repositorio activo | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | `black bold dimmed` | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | ------------------------------------------- | -------------------------------------- | +| repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | `black bold dimmed` | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -3253,7 +3285,7 @@ format = "[🆅 $repo](bold blue) " ## Zig -Por defecto, el módulo `zig` muestra la versión instalada de [Zig](https://ziglang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met: - El directorio actual contiene un archivo `.zig` @@ -3263,9 +3295,9 @@ Por defecto, el módulo `zig` muestra la versión instalada de [Zig](https://zig | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `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` | `"↯ "` | El símbolo usado antes de mostrar la versión de Zig. | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | | `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `zig`. | +| `disabled` | `false` | Disables the `zig` module. | | `detect_extensions` | `["zig"]` | 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. | @@ -3274,11 +3306,11 @@ Por defecto, el módulo `zig` muestra la versión instalada de [Zig](https://zig | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v0.6.0` | La versión de `zig` | +| version | `v0.6.0` | The version of `zig` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo ### Ejemplo @@ -3291,9 +3323,9 @@ symbol = "⚡️ " ## Comandos personalizados -Los módulos `personalizados` muestran la salida de algunos comandos arbitrarios. +The `custom` modules show the output of some arbitrary commands. -Estos módulos se mostrarán si se cumplen alguna de las siguientes condiciones: +These modules will be shown if any of the following conditions are met: - El directorio actual contiene un archivo cuyo nombre está en `files` - El directorio actual contiene un directorio cuyo nombre está en `directories` @@ -3301,21 +3333,21 @@ Estos módulos se mostrarán si se cumplen alguna de las siguientes condiciones: - El comando `when` devuelve 0 - El sistema operativo actual (std::env::consts::OS) coincide con el campo `os` si está definido. -::: consejo +::: tip -Múltiples módulos personalizados pueden definirse usando una `.`. +Multiple custom modules can be defined by using a `.`. ::: -::: consejo +::: tip -El orden en el que se muestran los módulos personalizados se puede establecer individualmente incluyendo `${custom.foo}` en el `format` de nivel superior (ya que incluye un punto, necesita usar `${...}`). Por defecto, el módulo `custom` simplemente mostrará todos los módulos personalizados en el orden en que fueron definidos. +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. ::: -::: consejo +::: tip -[El issue #1252](https://github.com/starship/starship/discussions/1252) contiene ejemplos de módulos personalizados. Si tiene un ejemplo interesante no cubierto allí, no dude en compartirlo allí! +[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! ::: @@ -3329,57 +3361,57 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt ### Opciones -| Opción | Por defecto | Descripción | -| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | El comando cuya salida debe ser impresa. El comando se pasará en stdin al shell. | -| `when` | | Comando de shell usado como condición para mostrar el módulo. El módulo se mostrará si el comando devuelve un código de estado `0`. | -| `shell` | | [Ver abajo](#custom-command-shell) | -| `description` | `""` | La descripción del módulo que se muestra al ejecutar `starship explain`. | -| `files` | `[]` | Los archivos que se buscarán en el directorio de trabajo para obtener una coincidencia. | -| `directories` | `[]` | Los directorios que se buscarán en el directorio de trabajo para una coincidencia. | -| `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` | Desactiva 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). | +| Opción | Por defecto | Descripción | +| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. | +| `shell` | | [See below](#custom-command-shell) | +| `description` | `""` | The description of the module that is shown when running `starship explain`. | +| `files` | `[]` | The files that will be searched in the working directory for a match. | +| `directories` | `[]` | The directories that will be searched in the working directory for a match. | +| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | +| `symbol` | `""` | The symbol used before displaying the command output. | +| `style` | `"bold green"` | El estilo del módulo. | +| `format` | `"[$symbol($output )]($style)"` | El formato del módulo. | +| `disabled` | `false` | Disables this `custom` module. | +| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | ### Variables -| Variable | Descripción | -| --------- | ----------------------------------------- | -| output | La salida del comando de shell en `shell` | -| symbol | Refleja el valor de la opción `symbol` | -| style\* | Refleja el valor de la opción `style` | +| Variable | Descripción | +| --------- | -------------------------------------- | +| output | The output of shell command in `shell` | +| symbol | Refleja el valor de la opción `symbol` | +| style\* | Refleja el valor de la opción `style` | -*: Esta variable sólo puede ser usada como parte de una cadena de estilo +*: Esta variable solamente puede ser usada como parte de una cadena de caracteres de estilo -#### Comando personalizado del intérprete de comandos +#### Custom command shell -`shell` acepta una lista no vacía de cadenas, donde: +`shell` accepts a non-empty list of strings, where: - La primera cadena es la ruta al intérprete de comandos a usar para ejecutar el comando. - Otros argumentos siguientes son pasados al shell. -Si no está activado, se retornará a STARSHIP_SHELL y luego a "sh" en Linux, y "cmd /C" en Windows. +If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows. -El `comando` será pasado en stdin. +The `command` will be passed in on stdin. -Si no se da el `shell` o solo contiene un elemento y Starship detecta PowerShell los siguientes argumentos se añadirán automáticamente: `-NoProfile -Command -`. Este comportamiento puede evitarse pasando explícitamente argumentos al intérprete, p.ej. +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 -`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml shell = ["pwsh", "-Command", "-"] ``` -::: advertencia Asegúrate de que tu configuración personalizada de shell salga con éxito +::: warning Make sure your custom shell configuration exits gracefully -Si establece un comando personalizado, asegúrese de que el Shell por defecto usado por starship ejecutará correctamente el comando con una salida elgante (a través de la opción `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). -Por ejemplo, PowerShell requiere el parámetro `-Command` para ejecutar una sola línea. Omitir este parámetro puede arrojar a starchip a un bucle recursivo donde el shell podría intentar cargar un entorno de perfil completo con starship en sí misma y volver a ejecutar el comando personalizado, entrando en un bucle infinito. +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. -Se recomiendan parámetros similares a `-NoProfile` en PowerShell para otros shells para evitar tiempo extra de carga de un perfil personalizado en cada invocación de 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. -La detección automática de shells y la adición adecuada de parámetros están actualmente implementados, pero es posible que no todos los shells estén cubiertos. Por favor, [abre un issue](https://github.com/starship/starship/issues/new/choose) con los detalles del intérprete de comandos y la configuración de Starship si te encuentras en tal escenario. +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. ::: diff --git a/docs/es-ES/faq/README.md b/docs/es-ES/faq/README.md index d10ece4c9..d50f1f1b2 100644 --- a/docs/es-ES/faq/README.md +++ b/docs/es-ES/faq/README.md @@ -56,34 +56,34 @@ Si obtienes un error como "_version 'GLIBC_2.18' not found (required by starship sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` -## Why do I see `Executing command "..." timed out.` warnings? +## ¿Por qué veo advertencias `Executing command"..." timed out.`? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship ejecuta diferentes comandos para obtener la información que se muestra en el prompt, por ejemplo la versión de un programa o el estado actual de git. Para asegurarse que starship no se quede congelado mientras trata de ejecutar estos comandos, establecimos un límite de tiempo, si un comando tarda más tiempo que este límite starship detendrá la ejecución del comando y mostrara la advertencia anterior, este es el comportamiento esperado. Este límite de tiempo es configurable usando la [llave `command_timeout`](/config/#prompt) así que si lo desea puede aumentar el límite de tiempo. También puedes seguir los pasos de depuración a continuación para ver qué comando está siendo lento y ver si puedes optimizarlo. Finalmente, puedes establecer la variable de entorno `STARSHIP_LOG` a `error` para ocultar estas advertencias. ## Veo símbolos que no entiendo ni espero, ¿qué significan? Si ves símbolos que no reconoces, puedes usar `starship explain` para explicar los módulos que se muestran actualmente. -## Starship is doing something unexpected, how can I debug it? +## Starship está haciendo algo inesperado, ¿cómo puedo depurarlo? -You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. +Puede habilitar los registros de depuración usando la variable de entorno `STARSHIP_LOG`. Estos registros pueden ser muy detallados así que a menudo es útil utilizar el comando `module` si estás intentando depurar un módulo en particular, por ejemplo, si está intentando depurar el módulo `rust` podrías ejecutar el siguiente comando para obtener los registros de seguimiento y salida del módulo. ```sh env STARSHIP_LOG=trace starship module rust ``` -If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. +Si starship está siendo lento, puedes intentar usar el comando `timings` para ver si hay un módulo en particular o un comando a culpar. ```sh env STARSHIP_LOG=trace starship timings ``` -This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. +Esto producirá el registro de rastreo y un desglose de todos los módulos que tomaron más de 1 ms para ejecutarse o producir alguna salida. -Finally if you find a bug you can use the `bug-report` command to create a Github issue. +Finalmente, si encuentras un error puedes usar el comando `bug-report` para crear un issue en Github. ```sh -reporte de error starship +starship bug-report ``` ## ¿Por qué no veo un símbolo de glifo en mi prompt? @@ -117,6 +117,6 @@ Si Starship fue instalado usando un gestor de paquetes, por favor refiérete a s Si Starship fue instalado usando el guión de instalación, el siguiente comando eliminará el binario: ```sh -# Locate and delete the starship binary -sh -c 'rm "$(command -v 'starship')"' +# Localiza y elimina el binario de starship +sh -c 'rm "$(comando -v 'starship')"' ``` diff --git a/docs/es-ES/guide/README.md b/docs/es-ES/guide/README.md index d297ae042..7758e6c23 100644 --- a/docs/es-ES/guide/README.md +++ b/docs/es-ES/guide/README.md @@ -169,16 +169,16 @@ - Una [Nerd Font](https://www.nerdfonts.com/) instalada y habilitada en tu terminal (por ejemplo, prueba [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). -### Step 1. Install Starship +### Paso 1. Instalar Starship -Select your operating system from the list below to view installation instructions: +Seleccione su sistema operativo de la lista de abajo para ver las instrucciones de instalación:
Android -Install Starship using any of the following package managers: +Instalar Starship usando cualquiera de los siguientes gestores de paquetes: -| Repository | Instructions | +| Repositorio | Instrucciones | | --------------------------------------------------------------------------------- | ---------------------- | | [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | @@ -187,33 +187,33 @@ Install Starship using any of the following package managers:
BSD -Install Starship using any of the following package managers: +Instalar Starship usando cualquiera de los siguientes gestores de paquetes: -| Distribution | Repository | Instructions | -| ------------ | -------------------------------------------------------- | --------------------------------- | -| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | -| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | -| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | +| Distribución | Repositorio | Instrucciones | +| ---------------- | -------------------------------------------------------- | --------------------------------- | +| **_Cualquiera_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
Linux -Install the latest version for your system: +Instale la última versión para su sistema: ```sh sh -c "$(curl -fsSL https://starship.rs/install.sh)" ``` -Alternatively, install Starship using any of the following package managers: +Alternativamente, instale Starship usando cualquiera de los siguientes gestores de paquetes: -| Distribution | Repository | Instructions | +| Distribución | Repositorio | Instrucciones | | ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | -| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | -| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | -| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | -| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| **_Cualquiera_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Cualquiera_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Cualquiera_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _Cualquiera_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | @@ -229,15 +229,15 @@ Alternatively, install Starship using any of the following package managers:
macOS -Install the latest version for your system: +Instale la última versión para su sistema: ```sh sh -c "$(curl -fsSL https://starship.rs/install.sh)" ``` -Alternatively, install Starship using any of the following package managers: +Alternativamente, instale Starship usando cualquiera de los siguientes gestores de paquetes: -| Repository | Instructions | +| Repositorio | Instrucciones | | -------------------------------------------------------- | --------------------------------------- | | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | @@ -249,9 +249,9 @@ Alternatively, install Starship using any of the following package managers:
Windows -Install Starship using any of the following package managers: +Instalar Starship usando cualquiera de los siguientes gestores de paquetes: -| Repository | Instructions | +| Repositorio | Instrucciones | | -------------------------------------------------------------------------------- | --------------------------------------- | | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | | [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | @@ -260,9 +260,9 @@ Install Starship using any of the following package managers:
-### Step 2. Setup your shell to use Starship +### Paso 2. Configura tu shell para usar Starship -Configure your shell to initialize starship. Select yours from the list below: +Configure su shell para inicializar starship. Selecciona el tuyo de la lista de abajo:
Bash @@ -278,7 +278,7 @@ eval "$(starship init bash)"
Cmd -You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: +Necesitas usar [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) con Cmd. Crea un archivo en esta ruta `%LocalAppData%\clink\starship.lua` con el siguiente contenido: ```lua load(io.popen('starship init cmd'):read("*a"))() @@ -295,7 +295,7 @@ Añade el siguiente código al final de `~/.elvish/rc.elv`: eval (starship init elvish) ``` -Note: Only Elvish v0.17+ is supported +Nota: Solo se admite Elvish v0.17+
@@ -324,7 +324,7 @@ eval $(starship init ion)
Nushell -Add the following to the end of your Nushell configuration (find it by running `config path`): +Añade lo siguiente al final de tu configuración de Nushell (encuéntrala ejecutando `config path`): ```toml startup = [ @@ -340,7 +340,7 @@ prompt = "starship_prompt"
PowerShell -Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): +Añade lo siguiente al final de tu configuración de PowerShell (encuéntrala ejecutando `$PROFILE`): ```powershell Invoke-Expression (&starship init powershell) @@ -381,15 +381,15 @@ eval "$(starship init zsh)"
-### Step 3. Configure Starship +### Paso 3. Configurar Starship -Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! +Inicia una nueva instancia de shell, y deberías ver tu nuevo y hermoso prompt para shell. Si estás contento con los valores por defecto, ¡disfruta! -If you're looking to further customize Starship: +Si estás buscando personalizar Starship: -- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking +- **[Configuración](https://starship.rs/config/)** – aprende a configurar Starship para ajustar el prompt a tu gusto -- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others +- **[Ajustes preestablecidos](https://starship.rs/presets/)** - inspírate en la configuración construida por otros ## 🤝 Colaborando @@ -403,11 +403,11 @@ Si estás interesado en ayudar contribuyendo a starship, por favor échale un vi Por favor, revisa estos proyectos que inspiraron la creación de Starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – Un prompt de ZSH para astronautas. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Tema multi shell robbyrussell escrito en JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +- **[reujab/silver](https://github.com/reujab/silver)** - Un prompt multi-intérprete de comandos personalizable basada en Powerline con iconos.


diff --git a/docs/es-ES/installing/README.md b/docs/es-ES/installing/README.md index 951ffe385..0450bb469 100644 --- a/docs/es-ES/installing/README.md +++ b/docs/es-ES/installing/README.md @@ -63,8 +63,7 @@ Habilita el módulo `programs.starship` en tu archivo `home.nix` y añade tus co { programs.starship = { enable = true; - enableZshIntegration = true; - # Configuración escrita en ~/.config/starship.toml + # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/es-ES/migrating-to-0.45.0/README.md b/docs/es-ES/migrating-to-0.45.0/README.md index 92564b0dc..fff56d96a 100644 --- a/docs/es-ES/migrating-to-0.45.0/README.md +++ b/docs/es-ES/migrating-to-0.45.0/README.md @@ -4,9 +4,9 @@ Starship v0.45.0 es un lanzamiento que contiene cambios de ruptura, en preparaci Esta guía pretende guiarle a través de los cambios de ruptura. -## `prompt_order` ha sido reemplazado por un "nivel raíz" `format` +## `prompt_order` ha sido reemplazado por un `format` en el nivel raiz -Anterioramente a v0.45.0, `prompt_order` aceptaría un arreglo de nombres de módulos en el orden que deberían ser renderizados por Starship. +Previo a v0.45.0, `prompt_order` aceptaría un arreglo de nombres de módulos en el orden en que deberían ser renderizados por Starship. En su lugar, Starship v0.45.0 acepta un valor de `format`, permitiendo la personalización del indicador fuera de los propios módulos. @@ -109,9 +109,9 @@ Para configurar el prompt para usar la configuración anterior `use_symbol_for_s error_symbol = "[✖](bold red)" ``` -_Note:_ The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. +_Nota:_ El elemento `character` añade automáticamente un espacio después, así que a diferencia de las otras cadenas de `format`, no añadimos uno en los ejemplos anteriores. -#### Tiempo de Ejecución +#### Tiempo de ejecución | Propiedad eliminada | Reemplazo | | ------------------- | --------- | diff --git a/docs/fr-FR/config/README.md b/docs/fr-FR/config/README.md index 6581c702c..9ee22f9e9 100644 --- a/docs/fr-FR/config/README.md +++ b/docs/fr-FR/config/README.md @@ -261,13 +261,15 @@ format = "$all$directory$character" ## AWS -Le module `aws` affiche la région et le profil AWS courant. Ces informations sont basées sur les variables d'environnement `AWS_REGION`, `AWS_DEFAULT_REGION`, et `AWS_PROFILE` ainsi que le fichier `~/.aws/config`. Ce module affiche également un minuteur d'expiration lorsque vous utilisez des identifiants temporaires. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. Ces informations sont basées sur les variables d'environnement `AWS_REGION`, `AWS_DEFAULT_REGION`, et `AWS_PROFILE` ainsi que le fichier `~/.aws/config`. Ce module affiche également un minuteur d'expiration lorsque vous utilisez des identifiants temporaires. -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`. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. -Lorsque vous utilisez [awsu](https://github.com/kreuzwerker/awsu) le profil est lu depuis la variable d'environnement `AWSU_PROFILE`. +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. -Lorsque vous utilisez [AWSume](https://awsu.me) le profil est lu à partir de la variable d'environnement `AWSUME_PROFILE` et la date d'expiration des identifiants est lue à partir de la variable d'environnement `AWSUME_EXPIRATION`. +When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. + +When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. ### Options @@ -290,7 +292,7 @@ Lorsque vous utilisez [AWSume](https://awsu.me) le profil est lu à partir de la | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemples @@ -360,7 +362,7 @@ style = "blue bold" ## 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%. +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%. ### Options @@ -388,7 +390,7 @@ discharging_symbol = "💀 " ### Indicateur de batterie -L'option de configuration `display` est utilisée pour définir quand l'indicateur de batterie doit être affiché (threshold), quel symbole doit être utilisé (symbol) et à quoi il ressemble (style). Si aucun `display` n'est fourni. La valeur par défaut est la suivante : +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. La valeur par défaut est la suivante : ```toml [[battery.display]] @@ -396,11 +398,11 @@ threshold = 10 style = "bold red" ``` -La valeur par défaut pour les options `charging_symbol` et `discharging_symbol` est respectivement la valeur des options `charging_symbol` et `discharging_symbol` du module `battery`. +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 -L'option `display` est une array de la table suivante. +The `display` option is an array of the following table. | Option | Défaut | Description | | -------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------- | @@ -426,14 +428,14 @@ discharging_symbol = "💦" ## Character -Le module `character` affiche un caractère (habituellement une flèche) à côté de l'endroit où le texte est entré dans votre terminal. +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -Le caractère vous dira si la dernière commande a été réussie ou pas. Cela peut être fait de deux manières: +The character will tell you whether the last command was successful or not. It can do this in two ways: - changement de couleur (`red`/`green`) - changement de forme (`❯`/`✖`) -Par défaut, il ne change que la couleur. Si vous désirez également changer sa forme, jetez un œil à [cet exemple](#with-custom-error-shape). +By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). ::: warning @@ -496,7 +498,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -Le module `cmake` affiche la version actuellement installée de [CMake](https://cmake.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: - Le répertoire actuel contient un fichier `CMakeLists.txt` - Le répertoire actuel contient un fichier ` CMakeCache.txt` @@ -522,11 +524,11 @@ Le module `cmake` affiche la version actuellement installée de [CMake](https:// | symbol | | 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 +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL -Le module `cobol` affiche la version de COBOL installée. Par défaut, le module sera affiché si l’une de ces conditions est remplie : +The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met: - Le répertoire courant contient un fichier finissant par `.cob` ou `.COB` - Le répertoire courant contiens un fichier finissant par `.cbl` ou `.CBL` @@ -552,19 +554,19 @@ Le module `cobol` affiche la version de COBOL installée. Par défaut, le module | symbol | | 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 +*: This variable can only be used as a part of a style string ## Temps d'exécution -Le module `cmd_duration` montre le temps qu'a pris la dernière commande a pris pour s'exécuter. Le module ne sera affiché que si la commande a pris plus de deux secondes, ou si la valeur de configuration `min_time` existe. +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. -::: attention, n'accrochez pas la trappe DEBUG en Bash +::: warning Do not hook the DEBUG trap in Bash -Si vous utilisez starship en `bash`, n'accrochez pas `DEBUG` après avoir exécuté `eval $(starship init $0)`, ou ce module **cassera**. +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -Les utilisateurs de Bash qui ont besoin de fonctionnalité pré-exec peuvent utiliser [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Définissez simplement les array `preexec_functions` et `precmd_functions` avant d'éxécuter `eval $(starship init $0)`, puis procédez comme d'habitude. +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### Options @@ -586,7 +588,7 @@ Les utilisateurs de Bash qui ont besoin de fonctionnalité pré-exec peuvent uti | duration | `16m40s` | Le temps nécessaire pour exécuter la commande | | style\* | | Reflète la valeur de l'option `style` | -*: Cette variable peut uniquement être utilisée dans une chaine de style +*: This variable can only be used as a part of a style string ### Exemple @@ -600,11 +602,11 @@ format = "underwent [$duration](bold yellow)" ## Conda -Le module `conda` affiche l’environnement [Conda](https://docs.conda.io/en/latest/) courant, si `$CONDA_DEFAULT_ENV` est définie. +The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. ::: tip -Cela ne supprime pas le modificateur d'invite de conda, vous pouvez exécuter `conda config --set changeps1 False`. +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. ::: @@ -627,7 +629,7 @@ Cela ne supprime pas le modificateur d'invite de conda, vous pouvez exécuter `c | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -659,7 +661,7 @@ The `container` module displays a symbol and container name, if inside a contain | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -672,7 +674,7 @@ format = "[$symbol \\[$name\\]]($style) " ## Crystal -Le module `crystal` affiche la version actuellement installée de [Crystal](https://crystal-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier `shard.yml` - Le répertoire courant contient un fichier `.cr` @@ -698,7 +700,7 @@ Le module `crystal` affiche la version actuellement installée de [Crystal](http | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -711,7 +713,7 @@ format = "via [✨ $version](bold blue) " ## Dart -Le module `dart` affiche la version actuellement installée de [Dart](https://dart.dev/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `dart` module shows the currently installed version of [Dart](https://dart.dev/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier `.dart` - Le répertoire courant contient un répertoire `.dart_tool` @@ -738,7 +740,7 @@ Le module `dart` affiche la version actuellement installée de [Dart](https://da | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -751,7 +753,7 @@ format = "via [🔰 $version](bold red) " ## Deno -Le module `deno` affiche la version actuellement installée de [Deno](https://deno.land/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `deno` module shows you your currently installed version of [Deno](https://deno.land/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file @@ -787,30 +789,31 @@ format = "via [🦕 $version](green bold) " ## Dossier -Le mode `directory` montre le chemin de votre dossier actuel, tronqué aux 3 dossiers parents. Votre répertoire sera également tronqué à la racine du repo git dans lequel vous vous trouvez actuellement. +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. -Quand vous utilisez le style pwd de fish, au lieu de cacher le chemin qui est tronqué, vous verrez un nom raccourci de chaque dossier basé sur le nombre établi pour l'option. +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. -Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo, et l'option définie à `1`. Vous verrez maintenant `~/D/N/nixpkgs/pkgs`, alors que vous auriez vu `nixpkgs/pkgs` avant. +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. ### Options -| Option | Défaut | Description | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | Le nombre de dossiers parents selon lesquels le répertoire courant doit être tronqué. | -| `truncate_to_repo` | `true` | Si oui ou non tronquer à la racine du repo git dans lequel vous vous trouvez. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Format du module. | -| `style` | `"bold cyan"` | Le style du module. | -| `disabled` | `false` | Désactive le module `directory`. | -| `read_only` | `"🔒"` | Le symbole indiquant que le répertoire courant est en lecture seule. | -| `read_only_style` | `"red"` | Le style du symbole en lecture seule. | -| `truncation_symbol` | `""` | Le symbole en préfixe aux chemins tronqués. eg: "…/" | -| `repo_root_style` | `None` | Le style pour la racine du dépôt git quand l’option `truncate_to_repo` est à false. | -| `home_symbol` | `"~"` | Le symbole indiquant le répertoire personnel. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Option | Défaut | Description | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | Le nombre de dossiers parents selon lesquels le répertoire courant doit être tronqué. | +| `truncate_to_repo` | `true` | Si oui ou non tronquer à la racine du repo git dans lequel vous vous trouvez. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Format du module. | +| `style` | `"bold cyan"` | Le style du module. | +| `disabled` | `false` | Désactive le module `directory`. | +| `read_only` | `"🔒"` | Le symbole indiquant que le répertoire courant est en lecture seule. | +| `read_only_style` | `"red"` | Le style du symbole en lecture seule. | +| `truncation_symbol` | `""` | Le symbole en préfixe aux chemins tronqués. eg: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |

-Ce module possède quelques options de configuration avancées qui contrôlent l'affichage du répertoire. +This module has a few advanced configuration options that control how the directory is displayed. | Options avancées | Défaut | Description | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -818,7 +821,7 @@ Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo | `fish_style_pwd_dir_length` | `0` | Le nombre de caractères à utiliser lors de l'application de la logique de troncature du pwd de fish. | | `use_logical_path` | `true` | Si `true` affiche le chemin logique issu du shell via `PWD` ou `--logical-path`. Si `false` renvoie plutôt le chemin du système de fichiers physique avec les liens symboliques résolus. | -`substitutions` vous permet de définir des remplacements arbitraires pour les chaînes littérales qui apparaissent dans le chemin, par exemple pour de longs préfixes de réseau ou des répertoires de développement (ex. Java). Notez que cela désactivera la PWD de style fish. +`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. ```toml [directory.substitutions] @@ -826,7 +829,7 @@ Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo "src/com/long/java/path" = "mypath" ``` -`fish_style_pwd_dir_leng` interagit avec les options de troncature d'une manière qui peut être surprenante au début : si elle n'est pas nulle, les composantes du chemin qui seraient normalement tronquées sont affichées à la place avec autant de caractères. Par exemple, le chemin `/built/this/city/on/rock/and/roll`, qui devrait normalement être affiché comme `rock/and/roll`, sera affiché sous la forme de `/b/t/c/o/rock/and/roll` avec `fish_style_pwd_dir_length = 1`--les composants de chemin qui seraient normalement supprimés sont affichés avec un caractère unique. Pour `fish_style_pwd_dir_length = 2`, ce serait `/bu/th/ci/on/rock/and/roll`. +`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
@@ -837,7 +840,22 @@ Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo | path | `"D:/Projects"` | Le chemin du répertoire courant | | style\* | `"black bold dimmed"` | Reflète la valeur de l'option `style` | -*: Cette variable peut uniquement être utilisée dans une chaine de style +*: This variable can only be used as a part of a style string + +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Variable | Exemple | Description | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Reflète la valeur de l'option `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
### Exemple @@ -855,26 +873,26 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol$context]($style) "` | Format du module. | -| `symbol` | `"🐳 "` | Le symbole utilisé avant d'afficher le contexte Docker. | -| `only_with_files` | `true` | Afficher uniquement quand il y a une correspondance | -| `detect_extensions` | `[]` | Quelles extensions devraient activer ce module (il faut que `only_with_files` soit réglé sur true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Quels noms de fichier devraient activer ce module (il faut que `only_with_files` soit réglé sur true). | -| `detect_folders` | `[]` | Quels dossiers devraient activer ce module (il faut que `only_with_files` soit réglé sur true). | -| `style` | `"blue bold"` | Le style du module. | -| `disabled` | `false` | Désactive le module `docker_context`. | +| Option | Défaut | Description | +| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | Format du module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `only_with_files` | `true` | Only show when there's a match | +| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | +| `style` | `"blue bold"` | Le style du module. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variables | Variable | Exemple | Description | | --------- | -------------- | -------------------------------------- | -| context | `test_context` | Le contexte actuel de Docker | +| context | `test_context` | The current docker context | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -887,9 +905,9 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -Le module `dotnet` montre la version pertinente du [SDK .NET Core](https://dotnet.microsoft.com/) pour le répertoire courant. Si le SDK a été épinglé dans le répertoire courant, la version épinglée est affichée. Sinon, le module affiche la dernière version installée du SDK. +The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. -Par défaut, ce module ne sera affiché dans votre invite que lorsqu'un ou plusieurs des fichiers suivants sont présents dans le répertoire courant : +By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: - `global.json` - `project.json` @@ -900,9 +918,9 @@ Par défaut, ce module ne sera affiché dans votre invite que lorsqu'un ou plusi - `*.fsproj` - `*.xproj` -Vous aurez également besoin du SDK .NET Core pour pouvoir l'utiliser correctement. +You'll also need the .NET Core SDK installed in order to use it correctly. -En interne, ce module utilise son propre mécanisme de détection de version. Généralement, il est deux fois plus rapide que d'exécuter `dotnet --version`, mais il peut afficher une version incorrecte si votre projet .NET a une arborescence inhabituelle. Si la précision est plus importante que la vitesse, vous pouvez désactiver le mécanisme en définissant `heuristic = false` dans les options du module. +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. @@ -912,24 +930,24 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,23 +1848,23 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` -## Saut de ligne +## Line Break -Le module `line_break` sépare l'invite en deux lignes. +The `line_break` module separates the prompt into two lines. ### Options -| Option | Défaut | Description | -| ---------- | ------- | ----------------------------------------------------------------------- | -| `disabled` | `false` | Désactive le module `line_break` , faisant de l'invite une seule ligne. | +| Option | Défaut | Description | +| ---------- | ------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | ### Exemple @@ -1876,9 +1875,42 @@ Le module `line_break` sépare l'invite en deux lignes. disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Options + +| Option | Défaut | Description | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | Format du module. | +| `style` | `"bold yellow"` | Le style du module. | +| `disabled` | `true` | Disables the `localip` module. | + +### Variables + +| Variable | Exemple | Description | +| --------- | ------------ | ------------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Reflète la valeur de l'option `style` | + +*: This variable can only be used as a part of a style string + +### Exemple + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua -Le module `lua` affiche la version actuellement installée de [Lua](http://www.lua.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier `.lua-version` - Le répertoire courant contient un répertoire `lua` @@ -1890,23 +1922,23 @@ Le module `lua` affiche la version actuellement installée de [Lua](http://www.l | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | | `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` | -| `symbol` | `"🌙 "` | Une chaîne de caractères représentant le symbole de Lua. | +| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | | `detect_extensions` | `["lua"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `[".lua-version"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `["lua"]` | Quels dossiers devraient activer ce module. | | `style` | `"bold blue"` | Le style du module. | -| `lua_binary` | `"lua"` | Configure le binaire lua que Starship exécute lors de l'obtention de la version. | -| `disabled` | `false` | Désactive le module `lua`. | +| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `lua` module. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v5.4.0` | La version de `lua` | +| version | `v5.4.0` | The version of `lua` | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -1919,38 +1951,38 @@ format = "via [🌕 $version](bold blue) " ## Utilisation mémoire -Le module `memory_usage` affiche la mémoire système actuelle et l'utilisation de swap. +The `memory_usage` module shows current system memory and swap usage. -Par défaut, l'utilisation du swap est affichée si le swap total du système n'est pas nul. +By default the swap usage is displayed if the total system swap is non-zero. ::: tip -Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Options -| Option | Défaut | Description | -| ----------- | ----------------------------------------------- | ------------------------------------------------------------------------------ | -| `threshold` | `75` | Masquer l'utilisation de la mémoire à moins qu'elle ne dépasse ce pourcentage. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Format du module. | -| `symbol` | `"🐏"` | Le symbole utilisé avant d'afficher l'utilisation de la mémoire. | -| `style` | `"bold dimmed white"` | Le style du module. | -| `disabled` | `true` | Désactiver le module `memory_usage`. | +| Option | Défaut | Description | +| ----------- | ----------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Format du module. | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | Le style du module. | +| `disabled` | `true` | Disables the `memory_usage` module. | ### Variables -| Variable | Exemple | Description | -| ---------------- | ------------- | ------------------------------------------------------------------------------- | -| ram | `31GiB/65GiB` | La mémoire système utilisée/totale . | -| ram_pct | `48%` | Le pourcentage de la mémoire du système actuel. | -| swap\*\* | `1GiB/4GiB` | La taille de la mémoire swap du fichier de mémoire swap du système courant. | -| swap_pct\*\* | `77%` | Le poucentage de la mémoire swap du fichier de mémoire swap du système courant. | -| symbol | `🐏` | Reflète la valeur de l'option `symbol` | -| style\* | | Reflète la valeur de l'option `style` | +| Variable | Exemple | Description | +| ---------------- | ------------- | ------------------------------------------------------------------ | +| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | +| ram_pct | `48%` | The percentage of the current system memory. | +| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. | +| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. | +| symbol | `🐏` | 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 *\*: Les informations sur le fichier SWAP est uniquement affichée si détectée sur le système courant +*: This variable can only be used as a part of a style string *\*: The SWAP file information is only displayed if detected on the current system ### Exemple @@ -1966,28 +1998,28 @@ style = "bold dimmed green" ## Branche Mercurial -Le module `hg_branch` affiche la branche active du dépôt dans votre répertoire courant. +The `hg_branch` module shows the active branch of the repo in your current directory. ### Options -| Option | Défaut | Description | -| ------------------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `symbol` | `" "` | Le symbole utilisé avant le marque-page hg ou le nom de la branche du dépôt dans votre répertoire courant. | -| `style` | `"bold purple"` | Le style du module. | -| `format` | `"on [$symbol$branch]($style) "` | Format du module. | -| `truncation_length` | `2^63 - 1` | Tronque le nom de la branche hg à `N` graphèmes | -| `truncation_symbol` | `"…"` | Le symbole utilisé pour indiquer qu'un nom de branche a été tronqué. | -| `disabled` | `true` | Désactive le module `hg_branch`. | +| Option | Défaut | Description | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `"bold purple"` | Le style du module. | +| `format` | `"on [$symbol$branch]($style) "` | Format du module. | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| branch | `master` | La branche mercuriale active | +| branch | `master` | The active mercurial branch | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2002,7 +2034,7 @@ truncation_symbol = "" ## Nim -Le module `nim` affiche la version actuellement installée de [Nim](https://nim-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier `nim.cfg` - Le répertoire actuel contient un fichier avec l'extension `.nim` @@ -2013,24 +2045,24 @@ Le module `nim` affiche la version actuellement installée de [Nim](https://nim- | Option | Défaut | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | Format du module | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | Le symbole utilisé avant d'afficher la version de Nim. | +| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | | `detect_extensions` | `["nim", "nims", "nimble"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["nim.cfg"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | | `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `false` | Désactive le module `nim`. | +| `disabled` | `false` | Disables the `nim` module. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v1.2.0` | La version de `nim` | +| version | `v1.2.0` | The version of `nimc` | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2048,14 +2080,14 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ ### Options -| Option | Défaut | Description | -| ------------ | ---------------------------------------------- | ---------------------------------------------------------- | -| `format` | `'via [$symbol$state( \($name\))]($style) '` | Format du module. | -| `symbol` | `"❄️ "` | Une chaîne de format représentant le symbole de nix-shell. | -| `style` | `"bold blue"` | Le style du module. | -| `impure_msg` | `"impure"` | Une chaîne de format affichée lorsque le shell est impur. | -| `pure_msg` | `"pure"` | Une chaîne de format affichée lorsque le shell est pur. | -| `disabled` | `false` | Désactive le module `nix_shell`. | +| Option | Défaut | Description | +| ------------ | ---------------------------------------------- | ----------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | Format du module. | +| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | +| `style` | `"bold blue"` | Le style du module. | +| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | +| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `disabled` | `false` | Disables the `nix_shell` module. | ### Variables @@ -2066,7 +2098,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2082,7 +2114,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' ## Node.js -Le module `nodejs` affiche la version actuellement installée de [Node.js](https://nodejs.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier `package.json` - Le répertoire courant contient un fichier `.node-version` @@ -2097,23 +2129,23 @@ Le module `nodejs` affiche la version actuellement installée de [Node.js](https | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | `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` | -| `symbol` | `" "` | Une chaîne de caractères représentant le symbole de Node.js. | +| `symbol` | `" "` | A format string representing the symbol of Node.js. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["package.json", ".node-version"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `["node_modules"]` | Quels dossiers devraient activer ce module. | | `style` | `"bold green"` | Le style du module. | -| `disabled` | `false` | Désactive le module `nodejs`. | +| `disabled` | `false` | Disables the `nodejs` module. | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables | Variable | Exemple | Description | | --------- | ---------- | -------------------------------------- | -| version | `v13.12.0` | La version de `node` | +| version | `v13.12.0` | The version of `node` | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2126,7 +2158,7 @@ format = "via [🤖 $version](bold green) " ## OCaml -Le module `ocaml` affiche la version actuellement installée de [OCaml](https://ocaml.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `ocaml` module shows the currently installed version of [OCaml](https://ocaml.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier avec l'extension `.opam` ou le répertoire `_opam` - Le répertoire courant contient un répertoire `esy.lock` @@ -2139,28 +2171,28 @@ Le module `ocaml` affiche la version actuellement installée de [OCaml](https:// | Option | Défaut | Description | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | La chaîne de format pour le module. | +| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | Le symbole utilisé avant d'afficher la version de OCaml. | -| `global_switch_indicator` | `""` | La chaîne de caractères utilisée pour représenter le commutateur OPAM global. | -| `local_switch_indicator` | `"*"` | La chaîne de caractères utilisée pour représenter le commutateur OPAM local. | +| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | | `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `["_opam", "esy.lock"]` | Quels dossiers devraient activer ce module. | | `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `false` | Désactive le module `ocaml`. | +| `disabled` | `false` | Disables the `ocaml` module. | ### Variables | Variable | Exemple | Description | | ---------------- | ------------ | ----------------------------------------------------------------- | -| version | `v4.10.0` | La version de `ocaml` | +| version | `v4.10.0` | The version of `ocaml` | | switch_name | `my-project` | The active OPAM switch | | switch_indicator | | Mirrors the value of `indicator` for currently active OPAM switch | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2180,9 +2212,9 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Option | Défaut | Description | | ---------- | --------------------------------------------------- | -------------------------------------------------------------- | | `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | Format du module. | -| `symbol` | `"☁️ "` | Le symbole utilisé avant d'afficher le cloud OpenStack actuel. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | | `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `false` | Désactive le module `openstack`. | +| `disabled` | `false` | Disables the `openstack` module. | ### Variables @@ -2193,7 +2225,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2208,7 +2240,7 @@ symbol = "☁️ " ## Version du package -The `package` module is shown when the current directory is the repository for a package, and shows its current version. Le module gère actuellement les paquets `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` et `dart`. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – La version du paquet `npm` est extraite du `package.json` présent dans le répertoire courant - [**Cargo**](https://doc.rust-lang.org/cargo/) – La version du paquet `cargo` est extraite du `Cargo.toml` présent dans le répertoire courant @@ -2234,21 +2266,21 @@ The `package` module is shown when the current directory is the repository for a | Option | Défaut | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------------------------------------ | | `format` | `"is [$symbol$version]($style) "` | Format du module. | -| `symbol` | `"📦 "` | Le symbole utilisé avant d'afficher la version du paquet. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | | `style` | `"bold 208"` | Le style du module. | | `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | Désactive le module `package`. | +| `disabled` | `false` | Disables the `package` module. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v1.0.0` | La version de votre package | +| version | `v1.0.0` | The version of your package | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2261,7 +2293,7 @@ format = "via [🎁 $version](208 bold) " ## Perl -Le module `perl` affiche la version actuellement installée de [Perl](https://www.perl.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `perl` module shows the currently installed version of [Perl](https://www.perl.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier `Makefile.PL` ou `Build.PL` - Le répertoire courant contient un fichier `cpanfile` ou `cpanfile.snapshot` @@ -2273,20 +2305,20 @@ Le module `perl` affiche la version actuellement installée de [Perl](https://ww | Option | Défaut | Description | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | La chaîne de format pour le module. | +| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | Le symbole utilisé avant d'afficher la version de Perl | +| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | | `detect_extensions` | `["pl", "pm", "pod"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | | `style` | `"bold 149"` | Le style du module. | -| `disabled` | `false` | Désactive le module `perl`. | +| `disabled` | `false` | Disables the `perl` module. | ### Variables | Variable | Exemple | Description | | --------- | --------- | -------------------------------------- | -| version | `v5.26.1` | La version de `perl` | +| version | `v5.26.1` | The version of `perl` | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | @@ -2301,7 +2333,7 @@ format = "via [🦪 $version]($style) " ## PHP -Le module `php` affiche la version actuellement installée de [PHP](https://www.php.net/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `php` module shows the currently installed version of [PHP](https://www.php.net/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier `composer.json` - Le répertoire courant contient un fichier `.php-version` @@ -2313,22 +2345,22 @@ Le module `php` affiche la version actuellement installée de [PHP](https://www. | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | | `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` | -| `symbol` | `"🐘 "` | Le symbole utilisé avant d'afficher la version de PHP. | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | | `detect_extensions` | `["php"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["composer.json", ".php-version"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | | `style` | `"147 bold"` | Le style du module. | -| `disabled` | `false` | Désactive le module `php`. | +| `disabled` | `false` | Disables the `php` module. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v7.3.8` | La version de `php` | +| version | `v7.3.8` | The version of `php` | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2358,7 +2390,7 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es | Option | Défaut | Description | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($username@)$stack]($style) "` | La chaîne de format pour le module. | +| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | | `symbol` | `" "` | A format string shown before the Pulumi stack. | | `style` | `"bold 5"` | Le style du module. | @@ -2366,15 +2398,15 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es ### Variables -| Variable | Exemple | Description | -| ----------------- | ---------- | -------------------------------------- | -| version | `v0.12.24` | The version of `pulumi` | -| stack | `dev` | The current Pulumi stack | -| nom d'utilisateur | `alice` | The current Pulumi username | -| symbol | | Reflète la valeur de l'option `symbol` | -| style\* | | Reflète la valeur de l'option `style` | +| Variable | Exemple | Description | +| --------- | ---------- | -------------------------------------- | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| username | `alice` | The current Pulumi username | +| symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2398,7 +2430,7 @@ format = "[$symbol$stack]($style) " ## PureScript -Le module `purescript` affiche la version actuellement installée de [PureScript](https://www.purescript.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier `spago.dhall` - Le répertoire actuel contient un fichier avec l'extension `.purs` @@ -2409,22 +2441,22 @@ Le module `purescript` affiche la version actuellement installée de [PureScript | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | | `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` | -| `symbol` | `"<=> "` | Le symbole utilisé avant d'afficher la version de PureScript. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | | `detect_extensions` | `["purs"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["spago.dhall"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | | `style` | `"bold white"` | Le style du module. | -| `disabled` | `false` | Désactive le module `purescript`. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `0.13.5` | La version de `purescript` | +| version | `0.13.5` | The version of `purescript` | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2437,7 +2469,7 @@ format = "via [$symbol$version](bold white)" ## Python -Le module `python` affiche la version actuellement installée de [Python](https://www.python.org/) ainsi que la version d'[environnement virtuel Python](https://docs.python.org/tutorial/venv.html) si il y en a un d'activé. +The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated. If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. @@ -2459,7 +2491,7 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es | -------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | Format du module. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | Une chaîne de caractères représentant le symbole de Python | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | | `style` | `"yellow bold"` | Le style du module. | | `pyenv_version_name` | `false` | Use pyenv to get Python version | | `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | @@ -2467,7 +2499,7 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es | `detect_extensions` | `["py"]` | Quelles extensions devraient activer ce module | | `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Quels fichiers devraient activer ce module | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module | -| `disabled` | `false` | Désactive le module `python`. | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2481,7 +2513,7 @@ The default values and order for `python_binary` was chosen to first identify th | Variable | Exemple | Description | | ------------ | --------------- | ------------------------------------------ | -| version | `"v3.8.1"` | La version de `python` | +| version | `"v3.8.1"` | The version of `python` | | symbol | `"🐍 "` | Reflète la valeur de l'option `symbol` | | style | `"yellow bold"` | Reflète la valeur de l'option `style` | | pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | @@ -2501,7 +2533,7 @@ pyenv_version_name = true # ~/.config/starship.toml [python] -# N'utilisez que le binaire `python3` pour obtenir la version. +# Only use the `python3` binary to get the version. python_binary = "python3" ``` @@ -2509,7 +2541,7 @@ python_binary = "python3" # ~/.config/starship.toml [python] -# Ne pas déclencher pour les fichiers avec l'extension py +# Don't trigger for files with the py extension detect_extensions = [] ``` @@ -2517,17 +2549,16 @@ detect_extensions = [] # ~/.config/starship.toml [python] -# Affiche la version de python depuis l'intérieur d'un venv local. +# Display the version of python from inside a local venv. # -# Notez que cela ne fonctionnera que lorsque le venv est à l'intérieur du projet, -# et uniquement lorsque vous vous situez dans le répertoire contenant le dossier du venv -# mais peut-être que c'est suffisant? +# Note this will only work when the venv is inside the project and it will only +# work in the directory that contains the venv dir but maybe this is ok? python_binary = ["./venv/bin/python", "python", "python3", "python2"] ``` ## R -Le module `rlang` affiche la version de [R](https://www.r-project.org/) actuellement installée. Le module s’affiche si l’une de ces conditions est remplie : +The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if any of the following conditions are met: - Le répertoire actuel contient un fichier avec l'extension `.R`. - Le répertoire actuel contient un fichier avec l'extension `.Rd`. @@ -2543,18 +2574,18 @@ Le module `rlang` affiche la version de [R](https://www.r-project.org/) actuelle | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | | `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` | -| `symbol` | `"📐"` | Une chaîne de caractères représentant le symbole de R. | +| `symbol` | `"📐"` | A format string representing the symbol of R. | | `style` | `"blue bold"` | Le style du module. | | `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Quelles extensions devraient activer ce module | | `detect_files` | `[".Rprofile"]` | Quels fichiers devraient activer ce module | | `detect_folders` | `[".Rproj.user"]` | Quels dossiers devraient activer ce module | -| `disabled` | `false` | Désactive le module `r`. | +| `disabled` | `false` | Disables the `r` module. | ### Variables | Variable | Exemple | Description | | -------- | ------------- | -------------------------------------- | -| version | `v4.0.5` | La version de `R` | +| version | `v4.0.5` | The version of `R` | | symbol | | Reflète la valeur de l'option `symbol` | | style | `"blue bold"` | Reflète la valeur de l'option `style` | @@ -2569,7 +2600,7 @@ format = "with [📐 $version](blue bold) " ## Red -Par défaut, le module `red` affiche la version actuellement installée de [Red](https://www.red-lang.org/). Le module est affiché si l'une de ces conditions est remplie : +By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met: - Le répertoire actuel contient un fichier avec l'extension `.red` ou `.reds` @@ -2579,22 +2610,22 @@ Par défaut, le module `red` affiche la version actuellement installée de [Red] | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | | `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` | -| `symbol` | `"🔺 "` | Une chaîne de caractères représentant le symbole de Red. | +| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | | `detect_extensions` | `["red"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `[]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | | `style` | `"red bold"` | Le style du module. | -| `disabled` | `false` | Désactive le module `red`. | +| `disabled` | `false` | Disables the `red` module. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v2.5.1` | La version de `red` | +| version | `v2.5.1` | The version of `red` | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2607,14 +2638,14 @@ symbol = "🔴 " ## Ruby -Par défaut, le module `ruby` affiche la version actuellement installée de [Ruby](https://www.ruby-lang.org/). Le module est affiché si l'une de ces conditions est remplie : +By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met: - Le répertoire courant contient un fichier `Gemfile` - Le répertoire courant contient un fichier `.ruby-version` - Le répertoire courant contient un fichier `.rb` - La variable d’environnement `RUBY_VERSION` ou `RBENV_VERSION` est définie -Starship obtient la version actuelle de Ruby en exécutant `ruby -v`. +Starship gets the current Ruby version by running `ruby -v`. ### Options @@ -2622,23 +2653,23 @@ Starship obtient la version actuelle de Ruby en exécutant `ruby -v`. | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | | `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` | -| `symbol` | `"💎 "` | Une chaîne de caractères représentant le symbole de Ruby. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | | `detect_extensions` | `["rb"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["Gemfile", ".ruby-version"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Les variables d’environnement qui activent ce module. | +| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | | `style` | `"bold green"` | Le style du module. | -| `disabled` | `false` | Désactive le module `ruby`. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v2.5.1` | La version de `ruby` | +| version | `v2.5.1` | The version of `ruby` | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2651,7 +2682,7 @@ symbol = "🔺 " ## Rust -Par défaut, le module `rust` affiche la version actuellement installée de [Rust](https://www.rust-lang.org/). Le module est affiché si l'une de ces conditions est remplie : +By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met: - Le répertoire courant contient un fichier `Cargo.toml` - Le répertoire actuel contient un fichier avec l'extension `.rs` @@ -2662,22 +2693,22 @@ Par défaut, le module `rust` affiche la version actuellement installée de [Rus | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | | `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` | -| `symbol` | `"🦀 "` | Une chaîne de caractères représentant le symbole de Rust | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | | `detect_extensions` | `["rs"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["Cargo.toml"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | | `style` | `"bold green"` | Le style du module. | -| `disabled` | `false` | Désactive le module `rust`. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables | Variable | Exemple | Description | | --------- | ----------------- | -------------------------------------- | -| version | `v1.43.0-nightly` | La version de `rustc` | +| version | `v1.43.0-nightly` | The version of `rustc` | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2690,7 +2721,7 @@ format = "via [⚙️ $version](red bold)" ## Scala -Le module `scala` affiche la version actuellement installée de [Scala](https://www.scala-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `scala` module shows the currently installed version of [Scala](https://www.scala-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier `build.sbt`, `.scalaenv` ou `.sbtenv` - Le répertoire actuel contient un fichier avec l'extension `.scala` ou `.sbt` @@ -2704,20 +2735,20 @@ Le module `scala` affiche la version actuellement installée de [Scala](https:// | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | | `detect_extensions` | `["sbt", "scala"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Quels fichiers devraient activer ce module. | -| `detect_folders` | `[".metals"]` | Quels dossiers devraient activer ce module. | -| `symbol` | `"🆂 "` | Une chaîne de caractères représentant le symbole de Scala. | +| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | +| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | | `style` | `"red dimmed"` | Le style du module. | -| `disabled` | `false` | Désactive le module `scala`. | +| `disabled` | `false` | Disables the `scala` module. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `2.13.5` | La version de `scala` | +| version | `2.13.5` | The version of `scala` | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2734,7 +2765,7 @@ The `shell` module shows an indicator for currently used shell. ::: tip -Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2742,29 +2773,29 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur | Option | Défaut | Description | | ---------------------- | ------------------------- | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | Une chaîne de format utilisée pour représenter bash. | -| `fish_indicator` | `fsh` | Une chaîne de format utilisée pour représenter fish. | -| `zsh_indicator` | `zsh` | Une chaîne de format utilisée pour représenter zsh. | -| `powershell_indicator` | `psh` | Une chaîne de format utilisée pour représenter powershell. | -| `ion_indicator` | `ion` | Une chaîne de format utilisée pour représenter ion. | -| `elvish_indicator` | `esh` | Une chaîne de format utilisée pour représenter elvish. | -| `tcsh_indicator` | `tsh` | Une chaîne de format utilisée pour représenter tcsh. | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | | `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | | `cmd_indicator` | `cmd` | A format string used to represent cmd. | | `nu_indicator` | `nu` | A format string used to represent nu. | | `unknown_indicator` | | The default value to be displayed when the shell is unknown. | | `format` | `"[$indicator]($style) "` | Format du module. | | `style` | `"white bold"` | Le style du module. | -| `disabled` | `true` | Désactive le module `shell`. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables | Variable | Défaut | Description | | --------- | ------ | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | -| style\* | | Reflète la valeur de l'option `style`. | +| style\* | | Mirrors the value of option `style`. | -*: Cette variable peut uniquement être utilisée dans une chaine de style +*: This variable can only be used as a part of a style string ### Exemples @@ -2792,7 +2823,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. | | `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. | | `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `true` | Désactive le module `shlvl`. | +| `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -2802,7 +2833,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2821,12 +2852,12 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu ### Options -| Option | Défaut | Description | -| ---------- | -------------------------------- | ------------------------------------------------------ | -| `format` | `'[$symbol\[$env\]]($style) '` | Format du module. | -| `symbol` | `""` | Une chaîne de format affichée avant le nom de l'image. | -| `style` | `"bold dimmed blue"` | Le style du module. | -| `disabled` | `false` | Désactive le module `singularity`. | +| Option | Défaut | Description | +| ---------- | -------------------------------- | ------------------------------------------------ | +| `format` | `'[$symbol\[$env\]]($style) '` | Format du module. | +| `symbol` | `""` | A format string displayed before the image name. | +| `style` | `"bold dimmed blue"` | Le style du module. | +| `disabled` | `false` | Disables the `singularity` module. | ### Variables @@ -2836,7 +2867,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2849,11 +2880,11 @@ format = '[📦 \[$env\]]($style) ' ## Status -Le module `status` affiche le code de sortie de la commande précédente. Le module ne sera affiché que si le code de sortie n’est pas `0`. The status code will cast to a signed 32-bit integer. +The `status` module displays the exit code of the previous command. 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 -Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2876,16 +2907,16 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur | `pipestatus` | `false` | Enable pipestatus reporting | | `pipestatus_separator` | `|` | | | `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | -| `disabled` | `true` | Désactiver le module `status`. | +| `disabled` | `true` | Disables the `status` module. | ### Variables | Variable | Exemple | Description | | -------------- | ------- | ------------------------------------------------------------------------------------------- | -| status | `127` | Le code de sortie de la dernière commande | -| hex_status | `0x7F` | Le code de sortie de la dernière commande en hexa | -| int | `127` | Le code de sortie de la dernière commande | -| common_meaning | `ERROR` | Signification du code si n’est pas un signal | +| status | `127` | The exit code of the last command | +| hex_status | `0x7F` | The exit code of the last command in hex | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | | signal_number | `9` | Signal number corresponding to the exit code, only if signalled | | signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | | maybe_int | `7` | Contains the exit code number when no meaning has been found | @@ -2893,7 +2924,7 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2914,7 +2945,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module ::: tip -Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2935,7 +2966,7 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -2949,7 +2980,7 @@ disabled = false ``` ```toml -# Sous Windows +# On windows # $HOME\.starship\config.toml [sudo] @@ -2959,7 +2990,7 @@ disabled = false ## Swift -Par défaut, le module `swift` affiche la version actuellement installée de [Swift](https://swift.org/). Le module est affiché si l'une de ces conditions est remplie : +By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met: - Le répertoire courant contient un fichier `Package.swift` - Le répertoire actuel contient un fichier avec l'extension `.swift` @@ -2970,22 +3001,22 @@ Par défaut, le module `swift` affiche la version actuellement installée de [Sw | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | | `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` | -| `symbol` | `"🐦 "` | Une chaîne de caractères représentant le symbole de Swift | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | | `detect_extensions` | `["swift"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["Package.swift"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | | `style` | `"bold 202"` | Le style du module. | -| `disabled` | `false` | Désactiver le module `swift`. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v5.2.4` | La version de `swift` | +| version | `v5.2.4` | The version of `swift` | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -3015,29 +3046,29 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es | Option | Défaut | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol$workspace]($style) "` | La chaîne de format pour le module. | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | Une chaîne de format montrée avant l'espace de travail terraform. | +| `symbol` | `"💠"` | A format string shown before the terraform workspace. | | `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `[]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[".terraform"]` | Quels dossiers devraient activer ce module. | | `style` | `"bold 105"` | Le style du module. | -| `disabled` | `false` | Désactive le module `terraform`. | +| `disabled` | `false` | Disables the `terraform` module. | ### Variables | Variable | Exemple | Description | | --------- | ---------- | -------------------------------------- | -| version | `v0.12.24` | La version de `terraform` | +| version | `v0.12.24` | The version of `terraform` | | workspace | `default` | The current Terraform workspace | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple -#### Avec la version de Terraform +#### With Terraform Version ```toml # ~/.config/starship.toml @@ -3046,7 +3077,7 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es format = "[🏎💨 $version$workspace]($style) " ``` -#### Sans la version de Terraform +#### Without Terraform version ```toml # ~/.config/starship.toml @@ -3057,27 +3088,27 @@ format = "[🏎💨 $workspace]($style) " ## Date et Heure -Le module `time` affiche l'heure actuelle **localement**. La valeur de `format` est utilisée par le package [`chrono`](https://crates.io/crates/chrono) pour contrôler la façon dont l'heure est affichée. Consultez la [doc de chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) pour découvrir les options disponibles. +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 -Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Options -| Option | Défaut | Description | -| ----------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | La chaîne de format pour le module. | -| `use_12hr` | `false` | Activer le format 12h | -| `time_format` | voir plus bas | Le [format chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) utilisé pour formater l'heure. | -| `style` | `"bold yellow"` | Le style utilisé par le module | -| `utc_time_offset` | `"local"` | Définir le décalage horaire UTC à utiliser. Intervalle de -24 < x < 24. Accepte des nombres décimaux pour s'adapter aux décalages de 30/45 minutes. | -| `disabled` | `true` | Désactiver le module `time`. | -| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | +| Option | Défaut | Description | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Sinon, il est défini comme `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. +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 @@ -3086,7 +3117,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Sinon, il est d | time | `13:08:10` | The current time. | | style\* | | Reflète la valeur de l'option `style` | -*: Cette variable peut uniquement être utilisée dans une chaine de style +*: This variable can only be used as a part of a style string ### Exemple @@ -3103,7 +3134,7 @@ time_range = "10:00:00-14:00:00" ## Nom d'utilisateur -Le module `username` affiche le nom d'utilisateur de l'utilisateur actif. Le module est affiché si l'une de ces conditions est remplie : +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: - L'utilisateur courant est root - L'utilisateur courant est différent de celui connecté @@ -3118,20 +3149,20 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` ### Options -| Option | Défaut | Description | -| ------------- | ----------------------- | ------------------------------------------------ | -| `style_root` | `"bold green"` | Le style utilisé quand l'utilisateur est root. | -| `style_user` | `"bold yellow"` | Le style utilisé pour les utilisateurs non-root. | -| `format` | `"[$user]($style) in "` | Format du module. | -| `show_always` | `false` | Toujours afficher le module `username`. | -| `disabled` | `false` | Désactiver le module `username`. | +| Option | Défaut | Description | +| ------------- | ----------------------- | ------------------------------------- | +| `style_root` | `"bold green"` | The style used when the user is root. | +| `style_user` | `"bold yellow"` | The style used for non-root users. | +| `format` | `"[$user]($style) in "` | Format du module. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | ### Variables | Variable | Exemple | Description | | -------- | ------------ | ------------------------------------------------------------------------------------------- | | `style` | `"red bold"` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | -| `user` | `"matchai"` | L’identifiant de l’utilisateur courant. | +| `user` | `"matchai"` | The currently logged-in user ID. | ### Exemple @@ -3148,7 +3179,7 @@ show_always = true ## Vagrant -Le module `vagrant` affiche la version actuellement installée de [Vagrant](https://www.vagrantup.com/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `vagrant` module shows the currently installed version of [Vagrant](https://www.vagrantup.com/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier `Vagrantfile` @@ -3158,22 +3189,22 @@ Le module `vagrant` affiche la version actuellement installée de [Vagrant](http | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | | `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` | -| `symbol` | `"⍱ "` | Une chaîne de caractères représentant le symbole de Vagrant. | +| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["Vagrantfile"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | | `style` | `"cyan bold"` | Le style du module. | -| `disabled` | `false` | Désactive le module `vagrant`. | +| `disabled` | `false` | Disables the `vagrant` module. | ### Variables | Variable | Exemple | Description | | --------- | ---------------- | -------------------------------------- | -| version | `Vagrant 2.2.10` | La version de `Vagrant` | +| version | `Vagrant 2.2.10` | The version of `Vagrant` | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -3186,7 +3217,7 @@ format = "via [⍱ $version](bold white) " ## V -Le module `vlang` affiche la version de [V](https://vlang.io/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +The `vlang` module shows you your currently installed version of [V](https://vlang.io/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire courant contient un fichier avec l'extension `.v` - Le répertoire courant contient un fichier `v.mod`, `vpkg.json` ou `.vpkg-lock.json` @@ -3197,18 +3228,18 @@ Le module `vlang` affiche la version de [V](https://vlang.io/) installée. Par d | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------ | | `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` | -| `symbol` | `"V "` | Une chaîne de caractères représentant le symbole de V | +| `symbol` | `"V "` | A format string representing the symbol of V | | `detect_extensions` | `["v"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | | `style` | `"blue bold"` | Le style du module. | -| `disabled` | `false` | Désactive le module `vlang`. | +| `disabled` | `false` | Disables the `vlang` module. | ### Variables | Variable | Exemple | Description | | --------- | ------- | -------------------------------------- | -| version | `v0.2` | La version de `v` | +| version | `v0.2` | The version of `v` | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | @@ -3226,22 +3257,22 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v ### Options -| Option | Défaut | Description | -| ---------- | -------------------------------- | ---------------------------------------------------- | -| `symbol` | | Le symbole utilisé avant d'afficher le nom du dépôt. | -| `style` | `"bold yellow"` | Le style du module. | -| `format` | `"vcsh [$symbol$repo]($style) "` | Format du module. | -| `disabled` | `false` | Désactive le module `vcsh`. | +| Option | Défaut | Description | +| ---------- | -------------------------------- | ------------------------------------------------------ | +| `symbol` | | The symbol used before displaying the repository name. | +| `style` | `"bold yellow"` | Le style du module. | +| `format` | `"vcsh [$symbol$repo]($style) "` | Format du module. | +| `disabled` | `false` | Disables the `vcsh` module. | ### Variables -| Variable | Exemple | Description | -| --------- | ----------------------------------------------- | -------------------------------------- | -| repo | `dotfiles` si dans un dépôt VCSH nommé dotfiles | The active repository name | -| symbol | | Reflète la valeur de l'option `symbol` | -| style\* | `black bold dimmed` | Reflète la valeur de l'option `style` | +| Variable | Exemple | Description | +| --------- | ------------------------------------------- | -------------------------------------- | +| repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name | +| symbol | | Reflète la valeur de l'option `symbol` | +| style\* | `black bold dimmed` | Reflète la valeur de l'option `style` | -*: Cette variable peut uniquement être utilisée dans une chaine de style +*: This variable can only be used as a part of a style string ### Exemple @@ -3254,7 +3285,7 @@ format = "[🆅 $repo](bold blue) " ## Zig -Par défaut, le module `zig` affiche la version actuellement installée de [Zig](https://ziglang.org/). Le module est affiché si l'une de ces conditions est remplie : +By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met: - Le répertoire courant contient un fichier `.zig` @@ -3264,9 +3295,9 @@ Par défaut, le module `zig` affiche la version actuellement installée de [Zig] | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | | `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` | -| `symbol` | `"↯ "` | Le symbole utilisé avant d'afficher la version de Zig. | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | | `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `false` | Désactive le module `zig`. | +| `disabled` | `false` | Disables the `zig` module. | | `detect_extensions` | `["zig"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `[]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | @@ -3275,11 +3306,11 @@ Par défaut, le module `zig` affiche la version actuellement installée de [Zig] | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v0.6.0` | La version de `zig` | +| version | `v0.6.0` | The version of `zig` | | symbol | | 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 +*: This variable can only be used as a part of a style string ### Exemple @@ -3339,10 +3370,10 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | `files` | `[]` | The files that will be searched in the working directory for a match. | | `directories` | `[]` | The directories that will be searched in the working directory for a match. | | `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | -| `symbol` | `""` | Le symbole utilisé avant d'afficher la sortie de la commande. | +| `symbol` | `""` | The symbol used before displaying the command output. | | `style` | `"bold green"` | Le style du module. | | `format` | `"[$symbol($output )]($style)"` | Format du module. | -| `disabled` | `false` | Désactive le module `custom`. | +| `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | ### Variables @@ -3353,11 +3384,11 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | symbol | 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 +*: This variable can only be used as a part of a style string -#### Commandes shell personnalisées +#### Custom command shell -`shell` accepte une liste de chaînes non vide, où: +`shell` accepts a non-empty list of strings, where: - La première chaîne est le chemin vers le shell à utiliser pour exécuter la commande. - Other following arguments are passed to the shell. diff --git a/docs/fr-FR/installing/README.md b/docs/fr-FR/installing/README.md index 76a6851ad..15db04cb0 100644 --- a/docs/fr-FR/installing/README.md +++ b/docs/fr-FR/installing/README.md @@ -63,8 +63,7 @@ Activez le module `programs.starship` dans votre fichier `home.nix`, et ajoutez { programs.starship = { enable = true; - enableZshIntegration = true; - # Configuration écrite dans ~/.config/starship.toml + # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/id-ID/config/README.md b/docs/id-ID/config/README.md index 1eb77e064..e38dfe905 100644 --- a/docs/id-ID/config/README.md +++ b/docs/id-ID/config/README.md @@ -261,13 +261,15 @@ format = "$all$directory$character" ## AWS -Module `aws` menampilkan region dan profil AWS terkini. Diperoleh dari variabel environment `AWS_REGION`, `AWS_DEFAULT_REGION`, dan `AWS_PROFILE` pada file `~/.aws/config`. Modul ini juga menampilkan penghitung waktu mundur kedaluwarsa ketika menggunakan temporer kredensial. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. Diperoleh dari variabel environment `AWS_REGION`, `AWS_DEFAULT_REGION`, dan `AWS_PROFILE` pada file `~/.aws/config`. Modul ini juga menampilkan penghitung waktu mundur kedaluwarsa ketika menggunakan temporer kredensial. -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`. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. -Ketika menggunakan [awsu](https://github.com/kreuzwerker/awsu) profil dibaca dari variabel environment `AWSU_PROFILE`. +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. -Ketika menggunakan [AWSume](https://awsu.me) profil dibaca dari variabel environment `AWSUME_PROFILE` dan tanggal kedaluwarsanya dibaca dari variabel environment `AWSUME_EXPIRATION`. +When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. + +When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. ### Opsi @@ -290,7 +292,7 @@ Ketika menggunakan [AWSume](https://awsu.me) profil dibaca dari variabel environ | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -360,7 +362,7 @@ style = "blue bold" ## Baterai -Modul `battery` menampilkan seberapa penuh baterai perangkat terisi dan status pengisiannya. Modulnya hanya dapat terlihat ketika baterai perangkat di bawah 10%. +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%. ### Opsi @@ -388,7 +390,7 @@ discharging_symbol = "💀 " ### Tampilan Baterai -Opsi konfigurasi `display` digunakan untuk menentukan kapan indikator baterai harus ditampilkan (threshold), simbol mana yang akan digunakan (symbol), dan bagaimana seharusnya itu terlihat (style). Jika tidak ada `display` yang diberikan. Aturannya seperti yang ditunjukkan: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. Aturannya seperti yang ditunjukkan: ```toml [[battery.display]] @@ -396,11 +398,11 @@ threshold = 10 style = "bold red" ``` -Nilai bawaan untuk opsi `charging_symbol` dan `discharging_symbol` adalah nilai dari masing-masing opsi `charging_symbol` dan `discharging_symbol` dari nilai `battery`. +The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. #### Opsi -Opsi dari `display` merupakan sebuah array dari tabel berikut. +The `display` option is an array of the following table. | Opsi | Bawaan | Deskripsi | | -------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------- | @@ -426,14 +428,14 @@ discharging_symbol = "💦" ## Karakter -Modul `character` menampilkan sebuah karakter (biasanya anak panah) di samping teks pada terminalmu. +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -Karakter dapat memberitahu kamu apakah perintah terakhir berhasil atau tidak. Karakter dapat memberitahumu dengan dua cara ini: +The character will tell you whether the last command was successful or not. It can do this in two ways: - mengganti warna (`red`/`green`) - mengganti bentuk (`❯`/`✖`) -Secara bawaan karakter hanya dapat mengganti warna. Jika kamu juga ingin mengganti bentuknya, perhatikan [contoh](#with-custom-error-shape) berikut. +By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). ::: peringatan @@ -496,7 +498,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -Modul `cmake` menampilkan versi terkini dari [CMake](https://cmake.org/) yang terpasang. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: +The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: - Direktori terkini yang berisikan sebuah file `CMakeLists.txt` - Direktori terkini yang berisikan sebuah file `CMakeCache.txt` @@ -522,7 +524,7 @@ Modul `cmake` menampilkan versi terkini dari [CMake](https://cmake.org/) yang te | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL @@ -552,19 +554,19 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ## Durasi Perintah -Modul `cmd_duration` menampilkan seberapa lama perintah sebelumnya membutuhkan waktu untuk dilaksanakan. Modulnya hanya akan ditampilkan jika perintahnya membutuhkan waktu lebih dari dua detik, atau ada nilai dari konfigurasi `min_time`. +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. -::: jangan lakukan hook DEBUG trap dalam Bash +::: warning Do not hook the DEBUG trap in Bash -Jia kamu menjalankan Starship di `bash`, jangan lakukan hook DEBUG trap setelah menjalankan `eval $(starship init $0)`, atau modulnya **akan** rusak. +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -Pengguna Bash yang membutuhkan fungsi seperti preexec dapat menggunakan [kerangka kerja bash_preexec dari rcaloras](https://github.com/rcaloras/bash-preexec). Cukup dengan membuat array `preexec_functions` dan `precmd_functions` sebelum menjalankan `eval $(starship init $0)`, lalu lanjutkan seperti biasa. +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### Opsi @@ -586,7 +588,7 @@ Pengguna Bash yang membutuhkan fungsi seperti preexec dapat menggunakan [kerangk | duration | `16m40s` | Waktu yang dibutuhkan untuk menyelesaikan perintah | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -602,9 +604,9 @@ 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. -::: saran +::: tip -Hal ini tidak menahan pengubah (modifier) prompt dari conda sendiri, kamu mungkin bisa menjalankan `conda config --set changeps1 False`. +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. ::: @@ -627,7 +629,7 @@ Hal ini tidak menahan pengubah (modifier) prompt dari conda sendiri, kamu mungki | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -659,7 +661,7 @@ The `container` module displays a symbol and container name, if inside a contain | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -672,7 +674,7 @@ format = "[$symbol \\[$name\\]]($style) " ## Crystal -Modul `crystal` menampilkan versi terkini dari [Crystal](https://crystal-lang.org/) yang terpasang. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: +The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: - Direktori terkini yang berisikan sebuah file `shard.yml` - Direktori terkini yang berisikan sebuah file `.cr` @@ -698,7 +700,7 @@ Modul `crystal` menampilkan versi terkini dari [Crystal](https://crystal-lang.or | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -711,7 +713,7 @@ format = "via [✨ $version](bold blue) " ## Dart -Modul `dart` menampilkan versi terkini dari [Dart](https://dart.dev/) yang terpasang. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: +The `dart` module shows the currently installed version of [Dart](https://dart.dev/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: - Direktori terkini yang berisikan sebuah file berekstensi `.dart` - Direktori terkini yang berisikan sebuah direktori `dart_tool` @@ -738,7 +740,7 @@ Modul `dart` menampilkan versi terkini dari [Dart](https://dart.dev/) yang terpa | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -751,7 +753,7 @@ format = "via [🔰 $version](bold red) " ## Deno -Modul `deno` menampilkan versi terkini dari [Deno](https://deno.land/) yang terpasang. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: +The `deno` module shows you your currently installed version of [Deno](https://deno.land/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file @@ -787,30 +789,31 @@ format = "via [🦕 $version](green bold) " ## Direktori -Modul `directory` menampilkan arah ke direkori terkinimu, disingkat ke tiga folder induk. Direkrotimu juga akan disingkat ke root dari git repo di tempatmu berada saat ini. +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. -Ketika kamu menggunakan penataan pwd option fish, alih-alih menyembunyikan jalur yang disingkat, kamu akan melihat nama yang disingkat untuk tiap-tiap direktori berdasarkan dari jumlah nomor yang kamu aktifkan untuk opsi tersebut. +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. -Sebagai contoh, untuk `~/Dev/Nix/nixpkgs/pkgs` dimana `nixpkgs` merupakan root repo-nya, dan lalu opsinya diset menjadi `1`. Kamu akan melihat `~/D/N/nixpkgs/pkgs`, sedangkan sebelumnya direktori tersebut harusnya `nixpkgs/pkgs`. +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. ### Opsi -| Opsi | Bawaan | Deskripsi | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | Jumlah dari folder induk yang harusnya disingkat oleh direktori saat ini. | -| `truncate_to_repo` | `true` | Apakah harus menyingkat root dari git repo tempatmu berada saat ini. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Format dari modul. | -| `style` | `"bold cyan"` | Gaya penataan untuk modul. | -| `disabled` | `false` | Menonaktifkan modul `directory`. | -| `read_only` | `"🔒"` | Simbol yang mengindikasikan direktori saat ini bersifat read only. | -| `read_only_style` | `"red"` | Corak gaya untuk simbol read only. | -| `truncation_symbol` | `""` | Simbol untuk awalan jalur yang disingkat. misalnya: ".../" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | Simbol yang mengindikasikan direktori home. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Opsi | Bawaan | Deskripsi | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | Jumlah dari folder induk yang harusnya disingkat oleh direktori saat ini. | +| `truncate_to_repo` | `true` | Apakah harus menyingkat root dari git repo tempatmu berada saat ini. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Format dari modul. | +| `style` | `"bold cyan"` | Gaya penataan untuk modul. | +| `disabled` | `false` | Menonaktifkan modul `directory`. | +| `read_only` | `"🔒"` | Simbol yang mengindikasikan direktori saat ini bersifat read only. | +| `read_only_style` | `"red"` | Corak gaya untuk simbol read only. | +| `truncation_symbol` | `""` | Simbol untuk awalan jalur yang disingkat. misalnya: ".../" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
-Modul ini memilki beberapa opsi konfigurasi lanjutan yang mengontrol bagaimana direktori ditampilkan. +This module has a few advanced configuration options that control how the directory is displayed. | Advanced Option | Bawaan | Deskripsi | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -837,7 +840,22 @@ Sebagai contoh, untuk `~/Dev/Nix/nixpkgs/pkgs` dimana `nixpkgs` merupakan root r | path | `"D:/Projects"` | Direktori terkini | | style\* | `"black bold dimmed"` | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string + +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Variabel | Contoh | Deskripsi | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Menyalin nilai dari opsi `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
### Contoh @@ -855,26 +873,26 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Opsi -| Opsi | Bawaan | Deskripsi | -| ------------------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | Format dari modul. | -| `symbol` | `"🐳 "` | Simbol yang digunakan sebelum menampilkan Docker context. | -| `only_with_files` | `true` | Hanya ditampilkan jika terdapat kecocokan | -| `detect_extensions` | `[]` | Extensions mana yang harusnya memicu modul (butuh `only_with_files` untuk diset true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | filenames mana yang harusnya memicu modul ini (butuh `only_with_files` untuk diset true). | -| `detect_folders` | `[]` | Folder mana yang harusnya memicu modul (butuh `only_with_files` untuk diset true). | -| `style` | `"blue bold"` | Gaya penataan untuk modul. | -| `disabled` | `false` | Menonaktifkan module `docket_context`. | +| Opsi | Bawaan | Deskripsi | +| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | Format dari modul. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `only_with_files` | `true` | Only show when there's a match | +| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | +| `style` | `"blue bold"` | Gaya penataan untuk modul. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variabel | Variabel | Contoh | Deskripsi | | --------- | -------------- | --------------------------------- | -| context | `test_context` | Docker context terkini | +| context | `test_context` | The current docker context | | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -887,9 +905,9 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -Modul `dotnet` menampilkan informasi terkait versi dari [.NET Core SDK](https://dotnet.microsoft.com/) pada direktori terkini. Apabila SDK telah disematkan pada direktori terkni, maka veri yang telah disematkan tersebutlah yang ditampilkan. Jika tidak, maka modul akan menampilkan versi SDK terkini. +The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. -Secara bawaan, modul ini hanya akan ditampilkan ke prompt kamu ketika teradapat satu atau lebih file berikut di dalam direktorimu saat ini: +By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: - `global.json` - `project.json` @@ -900,11 +918,11 @@ Secara bawaan, modul ini hanya akan ditampilkan ke prompt kamu ketika teradapat - `*.fsproj` - `*.xproj` -Kamu juga perlu memasang .NET Core SDK untuk menggunakannya dengan baik. +You'll also need the .NET Core SDK installed in order to use it correctly. -Secara internal, modul ini menggunakan mekenasimenya sendiri untuk melakukan pendeteksian versi. Biasanya, hal ini dua kali lebih cepat seperti untuk menjalankan `dotnet --version`, tetapi ada kemungkinan hal ini akan menampilkan versi yang salah jika proyek .NET milikmu memiliki tata letak direktori yang tidak biasa. Jika menurutmu akurasi lebih penting dari kecepatan, kamu dapat menonaktifkan mekanisme tersebut dengan mengatur `heuristic = false` di dalam opsi modul. +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. -Modul ini juga akan menampilkan Target Framework Moniker () ketika terdapat sebuah file csproj di dalam direktori terkini. +The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. ### Opsi @@ -912,24 +930,24 @@ Modul ini juga akan menampilkan Target Framework Moniker ([\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,12 +1848,12 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` ## Line Break @@ -1876,6 +1875,39 @@ The `line_break` module separates the prompt into two lines. disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Opsi + +| Opsi | Bawaan | Deskripsi | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | Format dari modul. | +| `style` | `"bold yellow"` | Gaya penataan untuk modul. | +| `disabled` | `true` | Disables the `localip` module. | + +### Variabel + +| Variabel | Contoh | Deskripsi | +| --------- | ------------ | --------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Menyalin nilai dari opsi `style` | + +*: This variable can only be used as a part of a style string + +### Contoh + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: @@ -1906,7 +1938,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -1923,7 +1955,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. -::: saran +::: tip This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -1987,7 +2019,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2013,7 +2045,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Format dari modul | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module | | `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | | `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | | `detect_extensions` | `["nim", "nims", "nimble"]` | Ekstensi mana yang sebaiknya memicu modul ini. | @@ -2030,7 +2062,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2066,7 +2098,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2113,7 +2145,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2160,7 +2192,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2193,7 +2225,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2248,7 +2280,7 @@ The `package` module is shown when the current directory is the repository for a | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2328,7 +2360,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2343,7 +2375,7 @@ format = "via [🔹 $version](147 bold) " The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version. -::: saran +::: tip By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). @@ -2374,7 +2406,7 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2424,7 +2456,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2469,7 +2501,7 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini | | `disabled` | `false` | Disables the `python` module. | -::: saran +::: tip 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. @@ -2593,7 +2625,7 @@ By default the `red` module shows the currently installed version of [Red](https | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2637,7 +2669,7 @@ Starship gets the current Ruby version by running `ruby -v`. | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2676,7 +2708,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2703,7 +2735,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | | `detect_extensions` | `["sbt", "scala"]` | Ekstensi mana yang sebaiknya memicu modul ini. | | `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | filenames mana yang sebaiknya memicu modul ini. | -| `detect_folders` | `[".metals"]` | Folder mana yang sebaiknya memicul modul ini. | +| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | | `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | | `style` | `"red dimmed"` | Gaya penataan untuk modul. | | `disabled` | `false` | Disables the `scala` module. | @@ -2716,7 +2748,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2731,7 +2763,7 @@ symbol = "🌟 " The `shell` module shows an indicator for currently used shell. -::: saran +::: tip This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -2761,9 +2793,9 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Variabel | Bawaan | Deskripsi | | --------- | ------ | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | -| style\* | | Menyalin nilai dari opsi `style`. | +| style\* | | Mirrors the value of option `style`. | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2801,7 +2833,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2835,7 +2867,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2850,7 +2882,7 @@ format = '[📦 \[$env\]]($style) ' The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer. -::: saran +::: tip This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -2892,7 +2924,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2911,7 +2943,7 @@ disabled = false The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. -::: saran +::: tip This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -2934,7 +2966,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2984,7 +3016,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -2999,7 +3031,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. -::: saran +::: tip By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). @@ -3028,11 +3060,11 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: | Variabel | Contoh | Deskripsi | | --------- | ---------- | --------------------------------- | | version | `v0.12.24` | The version of `terraform` | -| workspace | `bawaan` | The current Terraform workspace | +| workspace | `default` | The current Terraform workspace | | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -3058,7 +3090,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. -::: saran +::: tip This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -3085,7 +3117,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -3109,7 +3141,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 -::: saran +::: tip 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. @@ -3172,7 +3204,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -3240,7 +3272,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | `black bold dimmed` | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -3248,7 +3280,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v # ~/.config/starship.toml [vcsh] -format = "via [✨ $repo](bold blue) " +format = "[🆅 $repo](bold blue) " ``` ## Zig @@ -3278,7 +3310,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string ### Contoh @@ -3301,19 +3333,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) matchs with `os` field if defined. -::: saran +::: tip Multiple custom modules can be defined by using a `.`. ::: -::: saran +::: tip 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. ::: -::: saran +::: tip [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! @@ -3334,7 +3366,7 @@ 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` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `deskripsi` | `""` | The description of the module that is shown when running `starship explain`. | +| `description` | `""` | The description of the module that is shown when running `starship explain`. | | `files` | `[]` | The files that will be searched in the working directory for a match. | | `directories` | `[]` | The directories that will be searched in the working directory for a match. | | `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | @@ -3352,7 +3384,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | symbol | Menyalin nilai dari opsi `symbol` | | style\* | Menyalin nilai dari opsi `style` | -*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string +*: This variable can only be used as a part of a style string #### Custom command shell diff --git a/docs/id-ID/installing/README.md b/docs/id-ID/installing/README.md index 561a7fe9f..a652d3f2c 100644 --- a/docs/id-ID/installing/README.md +++ b/docs/id-ID/installing/README.md @@ -63,7 +63,6 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett { programs.starship = { enable = true; - enableZshIntegration = true; # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/it-IT/config/README.md b/docs/it-IT/config/README.md index 7feea0f2e..27d9f0c2f 100644 --- a/docs/it-IT/config/README.md +++ b/docs/it-IT/config/README.md @@ -261,7 +261,9 @@ format = "$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. 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. @@ -795,19 +797,20 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | -| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | -| `style` | `"bold cyan"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `directory` module. | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Opzione | Default | Descrizione | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
This module has a few advanced configuration options that control how the directory is displayed. @@ -839,6 +842,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an *: This variable can only be used as a part of a style string +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Variable | Esempio | Descrizione | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Mirrors the value of option `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
+ ### Esempio ```toml @@ -1159,13 +1177,14 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud ### Opzioni -| Opzione | Default | Descrizione | -| ---------------- | ---------------------------------------------------------- | --------------------------------------------------------------- | -| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | -| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | -| `style` | `"bold blue"` | Lo stile per il modulo. | -| `disabled` | `false` | Disables the `gcloud` module. | +| Opzione | Default | Descrizione | +| ----------------- | ---------------------------------------------------------- | ---------------------------------------------------------------- | +| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | +| `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. | +| `style` | `"bold blue"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `gcloud` module. | ### Variables @@ -1214,6 +1233,17 @@ us-central1 = "uc1" asia-northeast1 = "an1" ``` +#### Display account and aliased project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' +[gcloud.project_aliases] +very-long-project-name = "vlpn" +``` + ## Git Branch The `git_branch` module shows the active branch of the repo in your current directory. @@ -1711,39 +1741,6 @@ The `julia` module shows the currently installed version of [Julia](https://juli symbol = "∴ " ``` -## localip - -The `localip` module shows the IPv4 address of the primary network interface. - -### Opzioni - -| Opzione | Default | Descrizione | -| ---------- | ------------------------- | ------------------------------------------------------ | -| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | Lo stile per il modulo. | -| `disabled` | `true` | Disables the `localip` module. | - -### Variables - -| Variable | Esempio | Descrizione | -| --------- | ------------ | ----------------------------------- | -| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | -| style\* | | Mirrors the value of option `style` | - -*: This variable can only be used as a part of a style string - -### Esempio - -```toml -# ~/.config/starship.toml - -[localip] -ssh_only = false -format = "@[$localipv4](bold red) " -disabled = false -``` - ## Kotlin The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: @@ -1793,7 +1790,7 @@ kotlin_binary = "kotlinc" ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. 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 @@ -1815,8 +1812,10 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Variable | Esempio | Descrizione | | --------- | -------------------- | ---------------------------------------- | -| context | `starship-cluster` | The current kubernetes context | +| context | `starship-context` | The current kubernetes context name | | namespace | `starship-namespace` | If set, the current kubernetes namespace | +| user | `starship-user` | If set, the current kubernetes user | +| cluster | `starship-cluster` | If set, the current kubernetes cluster | | symbol | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | @@ -1828,12 +1827,12 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [kubernetes] -format = 'on [⛵ $context \($namespace\)](dimmed green) ' +format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false [kubernetes.context_aliases] "dev.local.cluster.k8s" = "dev" ".*/openshift-cluster/.*" = "openshift" -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,12 +1848,12 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` ## Line Break @@ -1876,6 +1875,39 @@ The `line_break` module separates the prompt into two lines. disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Opzioni + +| Opzione | Default | Descrizione | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | Lo stile per il modulo. | +| `disabled` | `true` | Disables the `localip` module. | + +### Variables + +| Variable | Esempio | Descrizione | +| --------- | ------------ | ----------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Esempio + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). By default the module will be shown if any of the following conditions are met: @@ -2237,8 +2269,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. | | `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | | `style` | `"bold 208"` | Lo stile per il modulo. | -| `display_private` | `false` | Abilita la visualizzazione della versione per i pacchetti contrassegnati come privati. | -| `disabled` | `false` | Disabilita il modulo `package`. | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | ### Variables @@ -3082,7 +3114,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | Variable | Esempio | Descrizione | | --------- | ---------- | ----------------------------------- | -| ora | `13:08:10` | The current time. | +| time | `13:08:10` | The current time. | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3196,12 +3228,12 @@ The `vlang` module shows you your currently installed version of [V](https://vla | ------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `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_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Quali nomi di file dovrebbero attivare questo modulo. | | `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | | `style` | `"blu grassetto"` | Lo stile per il modulo. | -| `disabled` | `false` | Disabilita il modulo `vlang`. | +| `disabled` | `false` | Disables the `vlang` module. | ### Variables @@ -3334,7 +3366,7 @@ 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` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `descrizione` | `""` | The description of the module that is shown when running `starship explain`. | +| `description` | `""` | The description of the module that is shown when running `starship explain`. | | `files` | `[]` | The files that will be searched in the working directory for a match. | | `directories` | `[]` | The directories that will be searched in the working directory for a match. | | `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 9670e8b67..647084048 100644 --- a/docs/it-IT/guide/README.md +++ b/docs/it-IT/guide/README.md @@ -79,7 +79,7 @@ >Bahasa Indonesia   Android @@ -260,9 +260,9 @@ Install Starship using any of the following package managers:
-### Step 2. Setup your shell to use Starship +### Fase 2. Imposta la tua shell a utilizzare Starship -Configure your shell to initialize starship. Select yours from the list below: +Configura la shell a inizializzare Starship. Seleziona la tua dalla lista qui sotto:
Bash @@ -381,15 +381,15 @@ eval "$(starship init zsh)"
-### Step 3. Configure Starship +### Fase 3. Configura Starship -Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! +Inizia una nuova istanza del shell, e dovresti vedere il tuo bellissimo nuovo shell prompt. Se sei soddisfatto dei valori predefiniti, ottimo! -If you're looking to further customize Starship: +Se stai cercando di personalizzare ulteriormente Starship: -- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking +- **[Configurazione](https://starship.rs/config/)** – impara come configurare Starship per modificare il tuo prompt a tuo piacimento -- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others +- **[Preset](https://starship.rs/presets/)** – ispirati dalla configurazione precostituita da altri ## 🤝 Contribuire @@ -403,11 +403,11 @@ Se sei interessato ad aiutare a contribuire a Starship, dai un'occhiata alla nos Ti invito di controllare questi lavori precedenti che hanno contribuito a ispirare la creazione di Starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – Un prompt ZSH per astronauti. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Multi-shell a tema robbyrussell scritto in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +- **[reujab/silver](https://github.com/reujab/silver)** – Un prompt multi-shell personalizzabile come powerline con icone.


diff --git a/docs/it-IT/installing/README.md b/docs/it-IT/installing/README.md index 27f86c0e3..30135c548 100644 --- a/docs/it-IT/installing/README.md +++ b/docs/it-IT/installing/README.md @@ -63,7 +63,6 @@ Abilita il modulo `programs.starship` nel tuo file `home.nix` e aggiungi le tue { programs.starship = { enable = true; - enableZshIntegration = true; # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/ja-JP/config/README.md b/docs/ja-JP/config/README.md index ef449848e..1605c7ab4 100644 --- a/docs/ja-JP/config/README.md +++ b/docs/ja-JP/config/README.md @@ -262,11 +262,13 @@ format = "$all$directory$character" ## AWS -`aws` モジュールは現在のAWSプロファイルが表示されます。 これは `~/.aws/config` に記述されている `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` 環境変数に基づいています。 This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. これは `~/.aws/config` に記述されている `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` 環境変数に基づいています。 This module also shows an expiration timer when using temporary credentials. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. 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. -[awsu](https://github.com/kreuzwerker/awsu) を使う場合、そのプロファイルは環境変数 `AWSU_PROFILE` から読まれます。 +When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. @@ -291,7 +293,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -361,7 +363,7 @@ style = "blue bold" ## バッテリー -`battery`モジュールは、デバイスのバッテリー残量と現在の充電状態を示します。 モジュールは、デバイスのバッテリー残量が10%未満の場合にのみ表示されます。 +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%. ### オプション @@ -389,7 +391,7 @@ discharging_symbol = "💀 " ### バッテリーの表示 -`display`オプションを使用して、バッテリーインジケーターを表示するタイミング(threshold)、どのシンボルが使われるか(symbol) と外観(style)を定義します。 `display` が提供されない場合、 デフォルトは次のとおりです。 +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. デフォルトは次のとおりです。 ```toml [[battery.display]] @@ -397,11 +399,11 @@ threshold = 10 style = "bold red" ``` -`charging_symbol`と`discharging_symbol`オプションのデフォルト値はそれぞれ`battery`の `charging_symbol`と`discharging_symbol`になります。 +The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. #### オプション -`display`オプションは、次の表の通りです。 +The `display` option is an array of the following table. | オプション | デフォルト | 説明 | | -------------------- | ---------- | -------------------------------------------------------------------------------------- | @@ -427,14 +429,14 @@ discharging_symbol = "💦" ## Character -`character`モジュールは、端末でテキストが入力される場所の横に文字(通常は矢印)を表示します。 +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -文字は、最後のコマンドが成功したかどうかを示します。 表し方は下記の2つです。 +The character will tell you whether the last command was successful or not. It can do this in two ways: - 色の変更 (`赤`/`緑`) - プロンプトの表示の変更 (`❯`/`✖`) -デフォルトでは、色だけが変更されます。 形も変えてみたい場合は[このサンプル](#with-custom-error-shape)も参考にしてください。 +By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). ::: warning @@ -497,7 +499,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -`cmake`モジュールは、現在インストールされている[Cmake](https://cmake.org/)のバージョンを表示します。 デフォルトでは次のいずれかの条件が満たされると、モジュールがアクティブになります。 +The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: - カレントディレクトリに `CMakeLists.txt` ファイルが含まれている - カレントディレクトリに `CMakeCache.txt` ファイルが含まれている @@ -523,11 +525,11 @@ vicmd_symbol = "[V](bold green) " | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL -`COBOL` モジュールは、現在インストールされているCOBOLのバージョンを表示します。 By default, the module will be shown if any of the following conditions are met: +The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met: - The current directory contains any files ending in `.cob` or `.COB` - The current directory contains any files ending in `.cbl` or `.CBL` @@ -553,19 +555,19 @@ vicmd_symbol = "[V](bold green) " | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ## Command Duration -`cmd_duration`モジュールは、最後のコマンドの実行にかかった時間を示します。 モジュールが表示されるのは、コマンドが2秒以上かかった場合、または`min_time`値が存在する場合のみです。 +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. -::: warning BashでDEBUGトラップをhookしない +::: warning Do not hook the DEBUG trap in Bash -`bash`でStarshipを実行している場合、 `eval $(starship init $0)`実行した後に`DEBUG`トラップをフックしないでください。そうしないと、このモジュールが**おそらくですが**壊れます。 +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -preexecのような機能を必要とするBashユーザーは、 [rcalorasのbash_preexecフレームワーク](https://github.com/rcaloras/bash-preexec)を使用できます。 `eval $(starship init $0)` を実行する前に、`preexec_functions`、および`precmd_functions`定義するだけで、通常どおり続行します。 +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### オプション @@ -587,7 +589,7 @@ preexecのような機能を必要とするBashユーザーは、 [rcalorasのba | duration | `16m40s` | コマンドの実行時間 | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -605,7 +607,7 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e ::: tip -Note: これはconda自身の プロンプト修飾子 を抑制しません。`conda config --set changeps1 False` で実行することができます。 +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. ::: @@ -628,7 +630,7 @@ Note: これはconda自身の プロンプト修飾子 を抑制しません。` | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -660,7 +662,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 ### 設定例 @@ -673,7 +675,7 @@ format = "[$symbol \\[$name\\]]($style) " ## Crystal -`crystal`モジュールは、現在インストールされている[Crystal](https://crystal-lang.org/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 +The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 - カレントディレクトリに`shard.yml`ファイルが含まれている - カレントディレクトリに`.cr`の拡張子のファイルが含まれている @@ -699,7 +701,7 @@ format = "[$symbol \\[$name\\]]($style) " | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -712,7 +714,7 @@ format = "via [✨ $version](bold blue) " ## Dart -`dart`モジュールは、現在インストールされている[Dart](https://dart.dev/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 +The `dart` module shows the currently installed version of [Dart](https://dart.dev/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 - カレントディレクトリに`.dart`の拡張子のファイルが含まれている - カレントディレクトリに`.dart_tool`ディレクトリが含まれている @@ -739,7 +741,7 @@ format = "via [✨ $version](bold blue) " | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -752,7 +754,7 @@ format = "via [🔰 $version](bold red) " ## Deno -`deno`モジュールは、現在インストールされている[Deno](https://deno.land/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 +The `deno` module shows you your currently installed version of [Deno](https://deno.land/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 - The current directory contains a `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file @@ -788,30 +790,31 @@ format = "via [🦕 $version](green bold) " ## Directory -`directory`モジュールには、現在のディレクトリへのパスが表示され、3つの親フォルダは切り捨てられます。 ディレクトリは、現在のgitリポジトリであるとルートとなります。 +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. -fishスタイルのpwdオプションを使用すると、切り捨てられたパスを非表示にする代わりに、オプションで有効にした番号に基づいて各ディレクトリの短縮名が表示されます。 +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. -例として、`~/Dev/Nix/nixpkgs/pkgs`で、`nixpkgs`がリポジトリルートであり、オプションが`1`に設定されている場合を挙げます。 以前は`nixpkgs/pkgs`でしたが、`~/D/N/nixpkgs/pkgs`が表示されます。 +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | 現在のディレクトリを切り捨てる親フォルダーの数です。 | -| `truncate_to_repo` | `true` | 現在いるgitリポジトリのルートに切り捨てるかどうかです。 | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | moduleのフォーマットです。 | -| `style` | `"bold cyan"` | モジュールのスタイルです。 | -| `disabled` | `false` | `directory`モジュールを無効にします。 | -| `read_only` | `"🔒"` | このシンボルが表示されている時、現在のディレクトリは読み取り専用です。 | -| `read_only_style` | `"red"` | 読み取り専用シンボルのスタイルです。 | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. 例: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | ホームディレクトリを示すシンボルです。 | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| オプション | デフォルト | 説明 | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | 現在のディレクトリを切り捨てる親フォルダーの数です。 | +| `truncate_to_repo` | `true` | 現在いるgitリポジトリのルートに切り捨てるかどうかです。 | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | moduleのフォーマットです。 | +| `style` | `"bold cyan"` | モジュールのスタイルです。 | +| `disabled` | `false` | `directory`モジュールを無効にします。 | +| `read_only` | `"🔒"` | このシンボルが表示されている時、現在のディレクトリは読み取り専用です。 | +| `read_only_style` | `"red"` | 読み取り専用シンボルのスタイルです。 | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. 例: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |

-このモジュールは、どのようにディレクトリを表示するかについての高度なオプションをいくつか持っています。 +This module has a few advanced configuration options that control how the directory is displayed. | Advanced Option | デフォルト | 説明 | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -838,7 +841,22 @@ fishスタイルのpwdオプションを使用すると、切り捨てられた | path | `"D:/Projects"` | カレントディレクトリのパス | | style\* | `"black bold dimmed"` | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string + +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| 変数 | 設定例 | 説明 | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | オプション `style` の値をミラーする | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
### 設定例 @@ -856,26 +874,26 @@ The `docker_context` module shows the currently active [Docker context](https:// ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | ---------------------------------- | -------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | moduleのフォーマットです。 | -| `symbol` | `"🐳 "` | Dockerコンテキストを表示する前に使用される記号です。 | -| `only_with_files` | `true` | ファイルに一致する場合にのみ表示 | -| `detect_extensions` | `[]` | どの拡張子がこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 | -| `detect_files` | `The format for the module.` | どんなファイル名がこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 | -| `detect_folders` | `[]` | どんなフォルダがこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 | -| `style` | `"blue bold"` | モジュールのスタイルです。 | -| `disabled` | `false` | `docker_context`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | moduleのフォーマットです。 | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `only_with_files` | `true` | Only show when there's a match | +| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | +| `style` | `"blue bold"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `docker_context` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------------- | ---------------------- | -| context | `test_context` | 現在の Docker コンテキスト | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------------- | -------------------------- | +| context | `test_context` | The current docker context | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -888,9 +906,9 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -`dotnet`モジュールはカレントディレクトリに関係する[.NET Core SDK](https://dotnet.microsoft.com/)のバージョンを表示します。 もし SDKは現在のディレクトリに固定されているのであれば、その固定されたバージョンが表示されます。 それ以外の場合、モジュール SDKの最新のインストールバージョンを示します。 +The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. -デフォルトでは、このモジュールは現在のディレクトリに以下のファイルが 存在する場合にのみプロンプトで表示されます: +By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: - `global.json` - `project.json` @@ -903,34 +921,34 @@ format = "via [🐋 $context](blue bold)" You'll also need the .NET Core SDK installed in order to use it correctly. -内部的に、このモジュールは自身のバージョン検知のメカニズムを利用します。 `dotnet --version` を実行するより2倍速く実行できますが、.NET project一般的でないディレクトリlayoutの場合は間違ったバージョンが示されてしまうことがあります。 速度よりも精度が重要な場合は、次の方法でメカニズムを無効にできます。 モジュールオプションで`heuristic = false `を設定します。 +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | moduleのフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `".NET "` | dotnetのバージョンを表示する前に使用される記号です。 | -| `heuristic` | `true` | より高速なバージョン検出を使用して、starshipの動作を維持します。 | -| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `disabled` | `false` | `dotnet`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | +| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | moduleのフォーマットです。 | +| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | +| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `dotnet` module. | ### 変数 | 変数 | 設定例 | 説明 | | --------- | ---------------- | ------------------------------------------------------------------ | -| version | `v3.1.201` | `dotnet sdk` のバージョンです | +| version | `v3.1.201` | The version of `dotnet` sdk | | tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -958,7 +976,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el | `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["mix.exs"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | +| `detect_folders` | `[]` | Which folders should trigger this modules. | | `style` | `"bold purple"` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `elixir` module. | @@ -971,7 +989,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -1001,9 +1019,9 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang | `symbol` | `"🌳 "` | A format string representing the symbol of Elm. | | `detect_extensions` | `["elm"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["elm.json", "elm-package.json", ".elm-version"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `["elm-stuff"]` | どのフォルダーがこのモジュールをアクティブにするか | +| `detect_folders` | `["elm-stuff"]` | Which folders should trigger this modules. | | `style` | `"cyan bold"` | モジュールのスタイルです。 | -| `disabled` | `false` | `elm`モジュールを無効にします。 | +| `disabled` | `false` | Disables the `elm` module. | ### 変数 @@ -1013,7 +1031,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -1026,7 +1044,7 @@ format = "via [ $version](cyan bold) " ## Environment Variable -The `env_var` module displays the current value of a selected environment variables. 次の条件のいずれかが満たされると、モジュールが表示されます。 +The `env_var` module displays the current value of a selected environment variables. The module will be shown only if any of the following conditions are met: - `variable`オプションが、既存の環境変数と一致する - `variable`オプションが定義されておらず、`default`オプションが定義されている @@ -1046,13 +1064,13 @@ default = "unknown user" ### オプション -| オプション | デフォルト | 説明 | -| ---------- | ------------------------------ | ------------------------------------- | -| `symbol` | `""` | 環境変数を表示する前に使用される記号です。 | -| `variable` | | 表示される環境変数です。 | -| `default` | | 上のvariableが定義されていない場合に表示されるデフォルトの値です。 | -| `format` | `"with [$env_value]($style) "` | moduleのフォーマットです。 | -| `disabled` | `false` | `env_var`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ---------- | ------------------------------ | ---------------------------------------------------------------------------- | +| `symbol` | `""` | The symbol used before displaying the variable value. | +| `variable` | | The environment variable to be displayed. | +| `default` | | The default value to be displayed when the selected variable is not defined. | +| `format` | `"with [$env_value]($style) "` | moduleのフォーマットです。 | +| `disabled` | `false` | Disables the `env_var` module. | ### 変数 @@ -1062,7 +1080,7 @@ default = "unknown user" | symbol | | オプション `記号` の値をミラーする | | style\* | `black bold dimmed` | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -1103,18 +1121,18 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https: | `style` | `"bold red"` | モジュールのスタイルです。 | | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["rebar.config", "elang.mk"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `disabled` | `false` | `erlang`モジュールを無効にします。 | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `disabled` | `false` | Disables the `erlang` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------- | ---------------------- | -| version | `v22.1.3` | `erlang` のバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --------- | ----------------------- | +| version | `v22.1.3` | The version of `erlang` | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -1127,7 +1145,7 @@ format = "via [e $version](bold red) " ## Fill -`fill` モジュールは行の余分なスペースを記号で埋めます。 一行に複数の`fill`モジュールが存在する場合、それらはスペースを均等に分割します。 これは、他のモジュールの位置合わせに便利です。 +The `fill` module fills any extra space on the line with a symbol. If multiple `fill` modules are present in a line they will split the space evenly between them. This is useful for aligning other modules. ### オプション @@ -1156,31 +1174,32 @@ AA -------------------------------------------- BB ----------------------------- ## Google Cloud (`gcloud`) -`gcloud` モジュールは、 [`gcloud`](https://cloud.google.com/sdk/gcloud) CLIの現在の設定が表示されます。 これは `~/.config/gcloud/active_config` ファイルと `~/.config/gcloud/configurations/config_{CONFIG NAME}` ファイルと `CLOUDSDK_CONFIG` 環境変数に基づきます。 +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. ### オプション -| オプション | デフォルト | 説明 | -| ---------------- | ---------------------------------------------------------- | ----------------------------- | -| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | moduleのフォーマットです。 | -| `symbol` | `"☁️ "` | 現在のGCPプロファイルを表示する前に表示される記号です。 | -| `region_aliases` | | GCP名に加えて表示するリージョンのエイリアスです。 | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `disabled` | `false` | `gcloud`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ----------------- | ---------------------------------------------------------- | ---------------------------------------------------------------- | +| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | moduleのフォーマットです。 | +| `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. | +| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `gcloud` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | ------------- | ----------------------------------------------- | -| region | `us-central1` | 現在のGCPリージョン | -| account | `foo` | 現在のGCPプロファイル | -| domain | `example.com` | The current GCP profile domain | -| project | | 現在のGCPプロジェクト | -| active | `default` | `~/.config/gcloud/active_config` に書かれたアクティブな設定名 | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | ------------- | ------------------------------------------------------------------ | +| region | `us-central1` | The current GCP region | +| account | `foo` | The current GCP profile | +| domain | `example.com` | The current GCP profile domain | +| project | | The current GCP project | +| active | `default` | The active config name written in `~/.config/gcloud/active_config` | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -1215,22 +1234,33 @@ us-central1 = "uc1" asia-northeast1 = "an1" ``` +#### Display account and aliased project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' +[gcloud.project_aliases] +very-long-project-name = "vlpn" +``` + ## Git Branch -`git_branch`モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを表示します。 +The `git_branch` module shows the active branch of the repo in your current directory. ### オプション -| オプション | デフォルト | 説明 | -| -------------------- | -------------------------------- | ------------------------------------------------------------------------------------ | -| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. | -| `format` | `"on [$symbol$branch]($style) "` | moduleのフォーマットです。 Use `"$branch"` to refer to the current branch name. | -| `symbol` | `" "` | A format string representing the symbol of git branch. | -| `style` | `"bold purple"` | モジュールのスタイルです。 | -| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` graphemes. | -| `truncation_symbol` | `"…"` | ブランチ名切り捨てられていることを示すための記号です。 You can use `""` for no symbol. | -| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. | -| `disabled` | `false` | `git_branch`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | +| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. | +| `format` | `"on [$symbol$branch]($style) "` | moduleのフォーマットです。 Use `"$branch"` to refer to the current branch name. | +| `symbol` | `" "` | A format string representing the symbol of git branch. | +| `style` | `"bold purple"` | モジュールのスタイルです。 | +| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` graphemes. | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. | +| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. | +| `disabled` | `false` | Disables the `git_branch` module. | ### 変数 @@ -1242,7 +1272,7 @@ asia-northeast1 = "an1" | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -1257,28 +1287,28 @@ truncation_symbol = "" ## Git Commit -`git_commit` モジュールは、カレントディレクトリのリポジトリの現在のコミットハッシュとタグ (もしあれば) を表示します。 +The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory. ### オプション -| オプション | デフォルト | 説明 | -| -------------------- | ---------------------------------- | ----------------------------------------- | -| `commit_hash_length` | `7` | 表示されるgitコミットハッシュの長さです。 | -| `format` | `"[\\($hash$tag\\)]($style) "` | moduleのフォーマットです。 | -| `style` | `"bold green"` | モジュールのスタイルです。 | -| `only_detached` | `true` | detached `HEAD` 状態のときのみ git コミットハッシュを表示する | -| `tag_disabled` | `true` | `git_commit` モジュールのタグ情報の表示を無効にする。 | -| `tag_symbol` | `" 🏷 "` | 表示される情報の前に追加されるタグシンボル | -| `disabled` | `false` | `git_commit`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| -------------------- | ---------------------------------- | ------------------------------------------------------- | +| `commit_hash_length` | `7` | The length of the displayed git commit hash. | +| `format` | `"[\\($hash$tag\\)]($style) "` | moduleのフォーマットです。 | +| `style` | `"bold green"` | モジュールのスタイルです。 | +| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state | +| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. | +| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown | +| `disabled` | `false` | Disables the `git_commit` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------- | ---------------------- | -| hash | `b703eb3` | 現在の git コミットハッシュ | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --------- | --------------------------- | +| hash | `b703eb3` | The current git commit hash | +| style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -1292,7 +1322,7 @@ tag_symbol = "🔖 " ## Git State -`git_state`モジュールはgitディレクトリの進行状態を表します。 (例: _REBASING_, _BISECTING_, その他) 進捗情報がある場合(例: REBASING 3/10)はその情報も表示されます。 +The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too. ### オプション @@ -1307,7 +1337,7 @@ tag_symbol = "🔖 " | `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. | | `style` | `"bold yellow"` | モジュールのスタイルです。 | | `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | moduleのフォーマットです。 | -| `disabled` | `false` | `git_state`モジュールを無効にします。 | +| `disabled` | `false` | Disables the `git_state` module. | ### 変数 @@ -1318,7 +1348,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 ### 設定例 @@ -1336,7 +1366,7 @@ The `git_metrics` module will show the number of added and deleted lines in the ::: tip -このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -1359,7 +1389,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 ### 設定例 @@ -1373,31 +1403,31 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' ## Git Status -`git_status`モジュールは、現在のディレクトリのリポジトリの状態を表すシンボルを表示します。 +The `git_status` module shows symbols representing the state of the repo in your current directory. ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | ----------------------------------------------- | ----------------------------- | -| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | `git_status` のデフォルトフォーマット | -| `conflicted` | `"="` | このブランチにはマージの競合があります。 | -| `ahead` | `"⇡"` | `ahead`のフォーマット | -| `behind` | `"⇣"` | `behind`のフォーマット | -| `diverged` | `"⇕"` | `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`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ------------------- | ----------------------------------------------- | ----------------------------------- | +| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | +| `conflicted` | `"="` | This branch has merge conflicts. | +| `ahead` | `"⇡"` | The format of `ahead` | +| `behind` | `"⇣"` | The format of `behind` | +| `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` | Disables the `git_status` module. | ### 変数 -` format` 内では以下の変数が利用できます。 +The following variables can be used in `format`: | 変数 | 説明 | | -------------- | ------------------------------------------------------------------------------------------------------------- | @@ -1412,7 +1442,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' | `deleted` | Displays `deleted` when a file's deletion has been added to 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`: @@ -1423,9 +1453,9 @@ The following variables can be used in `diverged`: The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`: -| 変数 | 説明 | -| ------- | ------------- | -| `count` | ファイルの数を表示します。 | +| 変数 | 説明 | +| ------- | ------------------------ | +| `count` | Show the number of files | ### 設定例 @@ -1481,7 +1511,7 @@ The `golang` module shows the currently installed version of [Go](https://golang | `detect_files` | `["go.mod", "go.sum", "glide.yaml", "Gopkg.yml", "Gopkg.lock", ".go-version"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `["Godeps"]` | どのフォルダーがこのモジュールをアクティブにするか | | `style` | `"bold cyan"` | モジュールのスタイルです。 | -| `disabled` | `false` | `golang`モジュールを無効にします。 | +| `disabled` | `false` | Disables the `golang` module. | ### 変数 @@ -1491,7 +1521,7 @@ The `golang` module shows the currently installed version of [Go](https://golang | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -1517,7 +1547,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["helmfile.yaml", "Chart.yaml"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | +| `detect_folders` | `[]` | Which folders should trigger this modules. | | `symbol` | `"⎈ "` | A format string representing the symbol of Helm. | | `style` | `"bold white"` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `helm` module. | @@ -1530,7 +1560,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 ### 設定例 @@ -1543,26 +1573,26 @@ format = "via [⎈ $version](bold white) " ## Hostname -`hostname`モジュールには、システムのホスト名が表示されます。 +The `hostname` module shows the system hostname. ### オプション -| オプション | デフォルト | 説明 | -| ---------- | --------------------------- | --------------------------------------------------------------------------- | -| `ssh_only` | `true` | SSHセッションに接続されている場合にのみホスト名を表示します。 | -| `trim_at` | `"."` | この文字が最初にマッチするまでをホスト名と認識します。 `"."`は最初の. までをホスト名として認識します。 `""`を指定した場合トリムしません。 | -| `format` | `"[$hostname]($style) in "` | moduleのフォーマットです。 | -| `style` | `"bold dimmed green"` | モジュールのスタイルです。 | -| `disabled` | `false` | `hostname`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | +| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation | +| `format` | `"[$hostname]($style) in "` | moduleのフォーマットです。 | +| `style` | `"bold dimmed green"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `hostname` module. | ### 変数 | 変数 | 設定例 | 説明 | | --------- | ---------- | ---------------------------- | -| ホスト名 | `computer` | The hostname of the computer | +| hostname | `computer` | The hostname of the computer | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -1591,10 +1621,10 @@ The `java` module shows the currently installed version of [Java](https://www.or | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | | `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | +| `detect_folders` | `[]` | Which folders should trigger this modules. | | `symbol` | `"☕ "` | A format string representing the symbol of Java | | `style` | `"red dimmed"` | モジュールのスタイルです。 | -| `disabled` | `false` | `Java`モジュールを無効にします。 | +| `disabled` | `false` | Disables the `java` module. | ### 変数 @@ -1604,7 +1634,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 ### 設定例 @@ -1617,7 +1647,7 @@ symbol = "🌟 " ## ジョブ -`jobs`モジュールには、実行中のジョブの現在の数が表示されます。 このモジュールは、実行中のバックグラウンドジョブがある場合にのみ表示されます。 The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running. +The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running. The default functionality is: @@ -1641,13 +1671,13 @@ The `threshold` option is deprecated, but if you want to use it, the module will | オプション | デフォルト | 説明 | | ------------------ | ----------------------------- | ------------------------------------------------------------------------ | -| `threshold`* | `1` | 超過した場合、ジョブの数を表示します。 | +| `threshold`* | `1` | Show number of jobs if exceeded. | | `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | | `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | | `format` | `"[$symbol$number]($style) "` | moduleのフォーマットです。 | | `symbol` | `"✦"` | The string used to represent the `symbol` variable. | | `style` | `"bold blue"` | モジュールのスタイルです。 | -| `disabled` | `false` | `jobs`モジュールを無効にします。 | +| `disabled` | `false` | Disables the `jobs` module. | *: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead. @@ -1655,11 +1685,11 @@ The `threshold` option is deprecated, but if you want to use it, the module will | 変数 | 設定例 | 説明 | | --------- | --- | ---------------------- | -| number | `1` | ジョブの数 | +| number | `1` | The number of jobs | | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -1688,20 +1718,20 @@ The `julia` module shows the currently installed version of [Julia](https://juli | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | | `detect_extensions` | `["jl"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["Project.toml", "Manifest.toml"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `symbol` | `"ஃ "` | Juliaのシンボルを表すフォーマット文字列 | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | | `style` | `"bold purple"` | モジュールのスタイルです。 | -| `disabled` | `false` | `julia`モジュールを無効にします。 | +| `disabled` | `false` | Disables the `julia` module. | ### 変数 | 変数 | 設定例 | 説明 | | --------- | -------- | ---------------------- | -| version | `v1.4.0` | `julia`のバージョン | +| version | `v1.4.0` | The version of `julia` | | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -1712,7 +1742,141 @@ The `julia` module shows the currently installed version of [Julia](https://juli symbol = "∴ " ``` -## localip +## Kotlin + +The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 + +- カレントディレクトリに`.kt`もしくは`.kts`ファイルが含まれている + +### オプション + +| オプション | デフォルト | 説明 | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | +| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `detect_extensions` | `["kt", "kts"]` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | +| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `kotlin` module. | + +### 変数 + +| 変数 | 設定例 | 説明 | +| --------- | --------- | ----------------------- | +| version | `v1.4.21` | The version of `kotlin` | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | + +*: This variable can only be used as a part of a style string + +### 設定例 + +```toml +# ~/.config/starship.toml + +[kotlin] +symbol = "🅺 " +``` + +```toml +# ~/.config/starship.toml + +[kotlin] +# Uses the Kotlin Compiler binary to get the installed version +kotlin_binary = "kotlinc" +``` + +## Kubernetes + +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace, user and cluster from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-context --namespace astronaut`. Similarly the user and cluster can be set with `kubectl config set-context starship-context --user starship-user` and `kubectl config set-context starship-context --cluster starship-cluster`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### オプション + +| オプション | デフォルト | 説明 | +| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | +| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | moduleのフォーマットです。 | +| `style` | `"cyan bold"` | モジュールのスタイルです。 | +| `context_aliases` | | Table of context aliases to display. | +| `disabled` | `true` | Disables the `kubernetes` module. | + +### 変数 + +| 変数 | 設定例 | 説明 | +| --------- | -------------------- | ---------------------------------------- | +| context | `starship-context` | The current kubernetes context name | +| namespace | `starship-namespace` | If set, the current kubernetes namespace | +| user | `starship-user` | If set, the current kubernetes user | +| cluster | `starship-cluster` | If set, the current kubernetes cluster | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | + +*: This variable can only be used as a part of a style string + +### 設定例 + +```toml +# ~/.config/starship.toml + +[kubernetes] +format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' +disabled = false +[kubernetes.context_aliases] +"dev.local.cluster.k8s" = "dev" +".*/openshift-cluster/.*" = "openshift" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +``` + +#### Regex Matching + +Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions. + +The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. + +Long and automatically generated cluster names can be identified and shortened using regular expressions: + +```toml +[kubernetes.context_aliases] +# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: +".*/openshift-cluster/.*" = "openshift" +# Or better, to rename every OpenShift cluster at once: +".*/(?P[\\w-]+)/.*" = "$var_cluster" + +# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. +# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) +# and renames every matching kube context into a more readable format (`gke-cluster-name`): +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" +``` + +## Line Break + +The `line_break` module separates the prompt into two lines. + +### オプション + +| オプション | デフォルト | 説明 | +| ---------- | ------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | + +### 設定例 + +```toml +# ~/.config/starship.toml + +[line_break] +disabled = true +``` + +## Local IP The `localip` module shows the IPv4 address of the primary network interface. @@ -1732,7 +1896,7 @@ The `localip` module shows the IPv4 address of the primary network interface. | 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 ### 設定例 @@ -1745,138 +1909,6 @@ format = "@[$localipv4](bold red) " disabled = false ``` -## Kotlin - -`kotlin`モジュールは、現在インストールされている[Kotlin](https://kotlinlang.org/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 - -- カレントディレクトリに`.kt`もしくは`.kts`ファイルが含まれている - -### オプション - -| オプション | デフォルト | 説明 | -| ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `detect_extensions` | `["kt", "kts"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `symbol` | `"🅺 "` | Kotlinのシンボルを表すフォーマット文字列 | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `kotlin_binary` | `"kotlin"` | Starshipがバージョンを取得するときに実行するkotlinバイナリを設定します。 | -| `disabled` | `false` | `kotlin`モジュールを無効にします。 | - -### 変数 - -| 変数 | 設定例 | 説明 | -| --------- | --------- | ---------------------- | -| version | `v1.4.21` | `kotlin`のバージョン | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | - -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 - -### 設定例 - -```toml -# ~/.config/starship.toml - -[kotlin] -symbol = "🅺 " -``` - -```toml -# ~/.config/starship.toml - -[kotlin] -# Kotlinコンパイラバイナリを使用してバージョンを確認する -kotlin_binary = "kotlinc" -``` - -## Kubernetes - -現在の[Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context)名を表示します。 kubeconfigファイルに設定されている場合は、namespaceも表示します。 namespace は kubconfigで設定する必要があります。設定は、`kubectl config set-context starship-cluster --namespace astronaut` といったコマンド行えます。 `$KUBECONFIG` 環境変数が設定されている場合、このモジュールは環境変数を優先して使用し、`~/.kube/config` は使用しません。 - -::: tip - -このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 - -::: - -### オプション - -| オプション | デフォルト | 説明 | -| ----------------- | ---------------------------------------------------- | ------------------------------- | -| `symbol` | `"☸ "` | クラスター名の前に表示されるシンボルを表すフォーマット文字列。 | -| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | moduleのフォーマットです。 | -| `style` | `"cyan bold"` | モジュールのスタイルです。 | -| `context_aliases` | | コンテキストの表示エイリアスを定義するテーブル。 | -| `disabled` | `true` | `kubernetes` モジュールを無効にする。 | - -### 変数 - -| 変数 | 設定例 | 説明 | -| --------- | -------------------- | -------------------------------------- | -| context | `starship-cluster` | 現在の Kubernetes のコンテキスト | -| namespace | `starship-namespace` | 設定されている場合、現在の Kubernetes の namespace 名 | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | - -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 - -### 設定例 - -```toml -# ~/.config/starship.toml - -[kubernetes] -format = 'on [⛵ $context \($namespace\)](dimmed green) ' -disabled = false -[kubernetes.context_aliases] -"dev.local.cluster.k8s" = "dev" -".*/openshift-cluster/.*" = "openshift" -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" -``` - -#### Regex Matching - -Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions. - -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. - -Long and automatically generated cluster names can be identified and shortened using regular expressions: - -```toml -[kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: -".*/openshift-cluster/.*" = "openshift" -# Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" - -# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. -# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) -# and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" -``` - -## Line Break - -`line_break`モジュールは、プロンプトを2行に分割します。 - -### オプション - -| オプション | デフォルト | 説明 | -| ---------- | ------- | ------------------------------------- | -| `disabled` | `false` | `line_break`モジュールを無効にして、プロンプトを1行にします。 | - -### 設定例 - -```toml -# ~/.config/starship.toml - -[line_break] -disabled = true -``` - ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 @@ -1903,11 +1935,11 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | 変数 | 設定例 | 説明 | | --------- | -------- | ---------------------- | -| version | `v5.4.0` | `lua` のバージョン | +| version | `v5.4.0` | The version of `lua` | | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -1920,25 +1952,25 @@ format = "via [🌕 $version](bold blue) " ## メモリ使用量 -`memory_usage` モジュールは、現在のシステムメモリとスワップ使用量を示します。 +The `memory_usage` module shows current system memory and swap usage. -デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。 +By default the swap usage is displayed if the total system swap is non-zero. ::: tip -このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### オプション -| オプション | デフォルト | 説明 | -| ----------- | ----------------------------------------------- | --------------------------- | -| `threshold` | `75` | この閾値を超えない限り、メモリ使用率は表示されません。 | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | moduleのフォーマットです。 | -| `symbol` | `"🐏"` | メモリ使用率を表示する前に使用される記号です。 | -| `style` | `"bold dimmed white"` | モジュールのスタイルです。 | -| `disabled` | `true` | `memory_usage`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ----------- | ----------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | moduleのフォーマットです。 | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | モジュールのスタイルです。 | +| `disabled` | `true` | Disables the `memory_usage` module. | ### 変数 @@ -1967,7 +1999,7 @@ style = "bold dimmed green" ## Mercurial Branch -` hg_branch `モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを示します。 +The `hg_branch` module shows the active branch of the repo in your current directory. ### オプション @@ -1977,7 +2009,7 @@ style = "bold dimmed green" | `style` | `"bold purple"` | モジュールのスタイルです。 | | `format` | `"on [$symbol$branch]($style) "` | moduleのフォーマットです。 | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | ブランチ名切り捨てられていることを示すための記号です。 | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | | `disabled` | `true` | Disables the `hg_branch` module. | ### 変数 @@ -1988,7 +2020,7 @@ style = "bold dimmed green" | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -2031,7 +2063,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 ### 設定例 @@ -2045,7 +2077,7 @@ symbol = "🎣 " ## Nix-shell -The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. このモジュールは、nixシェル環境内にあるときに表示されます。 +The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. ### オプション @@ -2056,7 +2088,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | `style` | `"bold blue"` | モジュールのスタイルです。 | | `impure_msg` | `"impure"` | A format string shown when the shell is impure. | | `pure_msg` | `"pure"` | A format string shown when the shell is pure. | -| `disabled` | `false` | `nix_shell`モジュールを無効にします。 | +| `disabled` | `false` | Disables the `nix_shell` module. | ### 変数 @@ -2067,7 +2099,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 ### 設定例 @@ -2103,7 +2135,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_files` | `["package.json", ".node-version"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `["node_modules"]` | どのフォルダーがこのモジュールをアクティブにするか | | `style` | `"bold green"` | モジュールのスタイルです。 | -| `disabled` | `false` | `nodejs`モジュールを無効にします。 | +| `disabled` | `false` | Disables the `nodejs` module. | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | ### 変数 @@ -2114,7 +2146,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -2140,7 +2172,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | オプション | デフォルト | 説明 | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | モジュールのフォーマット文字列。 | +| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | | `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | | `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | @@ -2161,7 +2193,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 ### 設定例 @@ -2194,7 +2226,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 ### 設定例 @@ -2209,7 +2241,7 @@ symbol = "☁️ " ## パッケージのバージョン -`package`モジュールは、現在のディレクトリがパッケージのリポジトリである場合に表示され、現在のバージョンが表示されます。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2232,14 +2264,14 @@ symbol = "☁️ " ### オプション -| オプション | デフォルト | 説明 | -| ----------------- | --------------------------------- | --------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | moduleのフォーマットです。 | -| `symbol` | `"📦 "` | パッケージのバージョンを表示する前に使用される記号です。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `style` | `"bold 208"` | モジュールのスタイルです。 | -| `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | `package`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ----------------- | --------------------------------- | ---------------------------------------------------------- | +| `format` | `"is [$symbol$version]($style) "` | moduleのフォーマットです。 | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `style` | `"bold 208"` | モジュールのスタイルです。 | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | ### 変数 @@ -2249,7 +2281,7 @@ symbol = "☁️ " | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -2274,7 +2306,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | オプション | デフォルト | 説明 | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | モジュールのフォーマット文字列。 | +| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | | `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | | `detect_extensions` | `["pl", "pm", "pod"]` | どの拡張子がこのモジュールをアクティブにするか | @@ -2314,12 +2346,12 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | ------------------- | ------------------------------------ | ------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🐘 "` | PHPのバージョンを表示する前に使用される記号です。 | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | | `detect_extensions` | `["php"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["composer.json", ".php-version"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | | `style` | `"147 bold"` | モジュールのスタイルです。 | -| `disabled` | `false` | `php`モジュールを無効にします。 | +| `disabled` | `false` | Disables the `php` module. | ### 変数 @@ -2329,7 +2361,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 ### 設定例 @@ -2346,7 +2378,7 @@ The `pulumi` module shows the current username, selected [Pulumi Stack](https:// ::: tip -By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). それでも有効にしたい場合は、 [以下の例に従ってください](#with-pulumi-version). +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). ::: @@ -2359,7 +2391,7 @@ By default the Pulumi version is not shown, since it takes an order of magnitude | オプション | デフォルト | 説明 | | ---------------- | -------------------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol($username@)$stack]($style) "` | モジュールのフォーマット文字列。 | +| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | | `symbol` | `" "` | A format string shown before the Pulumi stack. | | `style` | `"bold 5"` | モジュールのスタイルです。 | @@ -2371,11 +2403,11 @@ By default the Pulumi version is not shown, since it takes an order of magnitude | --------- | ---------- | --------------------------- | | version | `v0.12.24` | The version of `pulumi` | | stack | `dev` | The current Pulumi stack | -| ユーザ名 | `alice` | The current Pulumi username | +| username | `alice` | The current Pulumi username | | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -2425,7 +2457,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 ### 設定例 @@ -2440,7 +2472,7 @@ format = "via [$symbol$version](bold white)" The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated. -`pyenvversionname` が `true` に設定されている場合 、pyenv でのバージョン名が表示されます 。 そうでなければ、`python --version` を元にバージョン番号を表示します。 +If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 @@ -2462,13 +2494,13 @@ The `python` module shows the currently installed version of [Python](https://ww | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | | `symbol` | `"🐍 "` | A format string representing the symbol of Python | | `style` | `"yellow bold"` | モジュールのスタイルです。 | -| `pyenv_version_name` | `false` | pyenvを使用してPythonバージョンを取得します | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | | `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `["py"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `disabled` | `false` | `python`モジュールを無効にします。 | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2569,7 +2601,7 @@ format = "with [📐 $version](blue bold) " ## Red -By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 次の条件のいずれかが満たされると、モジュールが表示されます: +By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met: - The current directory contains a file with `.red` or `.reds` extension @@ -2594,7 +2626,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 ### 設定例 @@ -2607,7 +2639,7 @@ symbol = "🔴 " ## Ruby -デフォルトでは`ruby`モジュールは現在インストールされている[Ruby](https://www.ruby-lang.org/)のバージョンを表示します。 次の条件のいずれかが満たされると、モジュールが表示されます: +By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met: - カレントディレクトリに`Gemfile`ファイルが含まれている - カレントディレクトリに `.ruby-version` ファイルが含まれている @@ -2622,13 +2654,13 @@ Starship gets the current Ruby version by running `ruby -v`. | ------------------- | ------------------------------------ | ------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"💎 "` | Rubyのシンボルを表すフォーマット文字列. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | | `detect_extensions` | `["rb"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["Gemfile", ".ruby-version"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | | `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | | `style` | `"bold red"` | モジュールのスタイルです。 | -| `disabled` | `false` | `ruby`モジュールを無効にします。 | +| `disabled` | `false` | Disables the `ruby` module. | ### 変数 @@ -2638,7 +2670,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 ### 設定例 @@ -2651,7 +2683,7 @@ symbol = "🔺 " ## Rust -デフォルトでは`rust`モジュールは現在インストールされている[Rust](https://www.rust-lang.org/)のバージョンを表示します。 次の条件のいずれかが満たされると、モジュールが表示されます: +By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met: - カレントディレクトリに`Cargo.toml`ファイルが含まれている - カレントディレクトリに`.rs`の拡張子のファイルが含まれている @@ -2662,22 +2694,22 @@ symbol = "🔺 " | ------------------- | ------------------------------------ | ------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🦀 "` | Rustのシンボルを表すフォーマット文字列 | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | | `detect_extensions` | `["rs"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["Cargo.toml"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | | `style` | `"bold red"` | モジュールのスタイルです。 | -| `disabled` | `false` | `rust`モジュールを無効にします。 | +| `disabled` | `false` | Disables the `rust` module. | ### 変数 | 変数 | 設定例 | 説明 | | --------- | ----------------- | ---------------------- | -| version | `v1.43.0-nightly` | `rustc`のバージョン | +| version | `v1.43.0-nightly` | The version of `rustc` | | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -2704,7 +2736,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | | `detect_extensions` | `["sbt", "scala"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[".metals"]` | どのフォルダーがこのモジュールをアクティブにするか | +| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | | `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | | `style` | `"red dimmed"` | モジュールのスタイルです。 | | `disabled` | `false` | Disables the `scala` module. | @@ -2717,7 +2749,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 ### 設定例 @@ -2734,7 +2766,7 @@ The `shell` module shows an indicator for currently used shell. ::: tip -このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2762,9 +2794,9 @@ The `shell` module shows an indicator for currently used shell. | 変数 | デフォルト | 説明 | | --------- | ----- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | -| style\* | | オプション `style` の値をミラーする. | +| style\* | | Mirrors the value of option `style`. | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -2802,7 +2834,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 ### 設定例 @@ -2836,7 +2868,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 ### 設定例 @@ -2853,7 +2885,7 @@ The `status` module displays the exit code of the previous command. The module w ::: tip -このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2893,7 +2925,7 @@ The `status` module displays the exit code of the previous command. The module w | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -2914,7 +2946,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module ::: tip -このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2935,7 +2967,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -2959,7 +2991,7 @@ disabled = false ## Swift -By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 次の条件のいずれかが満たされると、モジュールが表示されます: +By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met: - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -2985,7 +3017,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 ### 設定例 @@ -2998,11 +3030,11 @@ format = "via [🏎 $version](red bold)" ## Terraform -`terraform` モジュールは、現在選択されている[Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) とバージョンを表示します。 +The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. ::: tip -Terraformのバージョンはデフォルトでは表示されません。多くのプラグインが使用されている場合、現在のTerraformのバージョンでは遅くなるからです。 それでも有効にしたい場合は、 [以下の例に従ってください](#with-terraform-version). +By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). ::: @@ -3015,29 +3047,29 @@ Terraformのバージョンはデフォルトでは表示されません。多 | オプション | デフォルト | 説明 | | ------------------- | ------------------------------------ | ------------------------------------------------------ | -| `format` | `"via [$symbol$workspace]($style) "` | モジュールのフォーマット文字列。 | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"💠"` | ワークスペースの前に表示されるフォーマット文字列。 | +| `symbol` | `"💠"` | A format string shown before the terraform workspace. | | `detect_extensions` | `["tf", "tfplan", "tfstate"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[".terraform"]` | どのフォルダーがこのモジュールをアクティブにするか | | `style` | `"bold 105"` | モジュールのスタイルです。 | -| `disabled` | `false` | `terraform`モジュールを無効にします。 | +| `disabled` | `false` | Disables the `terraform` module. | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | ---------- | ---------------------- | -| version | `v0.12.24` | `terraform` のバージョン | -| workspace | `default` | 現在のTerraformワークスペース | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | ---------- | ------------------------------- | +| version | `v0.12.24` | The version of `terraform` | +| workspace | `default` | The current Terraform workspace | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 -#### Terraform バージョン表示あり +#### With Terraform Version ```toml # ~/.config/starship.toml @@ -3046,7 +3078,7 @@ Terraformのバージョンはデフォルトでは表示されません。多 format = "[🏎💨 $version$workspace]($style) " ``` -#### Terraform バージョン表示なし +#### Without Terraform version ```toml # ~/.config/starship.toml @@ -3057,36 +3089,36 @@ 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)をご覧ください。 +The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. ::: tip -このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### オプション -| オプション | デフォルト | 説明 | -| ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | モジュールのフォーマット文字列。 | -| `use_12hr` | `false` | 12時間のフォーマットを有効にします。 | -| `time_format` | この表の下を参照してください | 時刻のフォーマットに使用される[クロノフォーマット文字列](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) です。 | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | -| `utc_time_offset` | `"local"` | 使用するUTCオフセットを設定します。 Range from -24 < x < 24. フロートが30/45分のタイムゾーンオフセットに対応できるようにします。 | -| `disabled` | `true` | `time`モジュールを無効にします。 | -| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | +| オプション | デフォルト | 説明 | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. それ以外の場合、デフォルトは`"%T"`です。 Manually setting `time_format` will override the `use_12hr` setting. +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. ### 変数 | 変数 | 設定例 | 説明 | | --------- | ---------- | ---------------------- | -| 時刻 | `13:08:10` | The current time. | +| time | `13:08:10` | The current time. | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -3103,7 +3135,7 @@ time_range = "10:00:00-14:00:00" ## ユーザー名 -`username`モジュールには、アクティブなユーザーのユーザー名が表示されます。 次の条件のいずれかが満たされると、モジュールが表示されます: +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: - カレントユーザーがroot - カレントユーザーが、ログインしているユーザーとは異なる @@ -3118,13 +3150,13 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` ### オプション -| オプション | デフォルト | 説明 | -| ------------- | ----------------------- | ------------------------- | -| `style_root` | `"bold red"` | ユーザーがrootのときに使用されるスタイルです。 | -| `style_user` | `"bold yellow"` | 非rootユーザーに使用されるスタイルです。 | -| `format` | `"[$user]($style) in "` | moduleのフォーマットです。 | -| `show_always` | `false` | `username`モジュールを常に表示します。 | -| `disabled` | `false` | `username`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ------------- | ----------------------- | ------------------------------------- | +| `style_root` | `"bold red"` | The style used when the user is root. | +| `style_user` | `"bold yellow"` | The style used for non-root users. | +| `format` | `"[$user]($style) in "` | moduleのフォーマットです。 | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | ### 変数 @@ -3173,7 +3205,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 ### 設定例 @@ -3241,7 +3273,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 ### 設定例 @@ -3254,7 +3286,7 @@ format = "[🆅 $repo](bold blue) " ## Zig -By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 次の条件のいずれかが満たされると、モジュールが表示されます: +By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met: - The current directory contains a `.zig` file @@ -3279,7 +3311,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string ### 設定例 @@ -3334,8 +3366,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` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. | -| `shell` | | [この表の下を参照してください](#custom-command-shell) | -| `説明` | `""` | The description of the module that is shown when running `starship explain`. | +| `shell` | | [See below](#custom-command-shell) | +| `description` | `""` | The description of the module that is shown when running `starship explain`. | | `files` | `[]` | The files that will be searched in the working directory for a match. | | `directories` | `[]` | The directories that will be searched in the working directory for a match. | | `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | @@ -3353,7 +3385,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | symbol | オプション `記号` の値をミラーする | | style\* | オプション `style` の値をミラーする | -*: この変数は、スタイル文字列の一部としてのみ使用することができます。 +*: This variable can only be used as a part of a style string #### Custom command shell diff --git a/docs/ja-JP/installing/README.md b/docs/ja-JP/installing/README.md index fb0b86875..fa0e736af 100644 --- a/docs/ja-JP/installing/README.md +++ b/docs/ja-JP/installing/README.md @@ -63,8 +63,7 @@ nix-env -iA nixos.starship { programs.starship = { enable = true; - enableZshIntegration = true; - # ~/.config/starship.toml に書き込まれる設定 + # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/ko-KR/config/README.md b/docs/ko-KR/config/README.md index 9c4407f49..76666094f 100644 --- a/docs/ko-KR/config/README.md +++ b/docs/ko-KR/config/README.md @@ -261,7 +261,9 @@ format = "$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. 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. @@ -795,19 +797,20 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Options -| Option | Default | Description | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | -| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | -| `style` | `"bold cyan"` | The style for the module. | -| `disabled` | `false` | Disables the `directory` module. | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
This module has a few advanced configuration options that control how the directory is displayed. @@ -839,6 +842,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an *: This variable can only be used as a part of a style string +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Variable | Example | Description | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Mirrors the value of option `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
+ ### Example ```toml @@ -1159,13 +1177,14 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud ### Options -| Option | Default | Description | -| ---------------- | ---------------------------------------------------------- | --------------------------------------------------------------- | -| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | -| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `gcloud` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------------------------------- | ---------------------------------------------------------------- | +| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | +| `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. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `gcloud` module. | ### Variables @@ -1214,6 +1233,17 @@ us-central1 = "uc1" asia-northeast1 = "an1" ``` +#### Display account and aliased project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' +[gcloud.project_aliases] +very-long-project-name = "vlpn" +``` + ## Git Branch The `git_branch` module shows the active branch of the repo in your current directory. @@ -1711,39 +1741,6 @@ The `julia` module shows the currently installed version of [Julia](https://juli symbol = "∴ " ``` -## localip - -The `localip` module shows the IPv4 address of the primary network interface. - -### Options - -| Option | Default | Description | -| ---------- | ------------------------- | ------------------------------------------------------ | -| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `true` | Disables the `localip` module. | - -### Variables - -| Variable | Example | Description | -| --------- | ------------ | ----------------------------------- | -| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | -| style\* | | Mirrors the value of option `style` | - -*: This variable can only be used as a part of a style string - -### Example - -```toml -# ~/.config/starship.toml - -[localip] -ssh_only = false -format = "@[$localipv4](bold red) " -disabled = false -``` - ## Kotlin The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: @@ -1793,7 +1790,7 @@ kotlin_binary = "kotlinc" ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. 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 @@ -1815,8 +1812,10 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Variable | Example | Description | | --------- | -------------------- | ---------------------------------------- | -| context | `starship-cluster` | The current kubernetes context | +| context | `starship-context` | The current kubernetes context name | | namespace | `starship-namespace` | If set, the current kubernetes namespace | +| user | `starship-user` | If set, the current kubernetes user | +| cluster | `starship-cluster` | If set, the current kubernetes cluster | | symbol | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | @@ -1828,12 +1827,12 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [kubernetes] -format = 'on [⛵ $context \($namespace\)](dimmed green) ' +format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false [kubernetes.context_aliases] "dev.local.cluster.k8s" = "dev" ".*/openshift-cluster/.*" = "openshift" -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,12 +1848,12 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` ## Line Break @@ -1876,6 +1875,39 @@ The `line_break` module separates the prompt into two lines. disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Options + +| Option | Default | Description | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `localip` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ----------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). By default the module will be shown if any of the following conditions are met: diff --git a/docs/ko-KR/installing/README.md b/docs/ko-KR/installing/README.md index 83f46ec68..c69ab5e71 100644 --- a/docs/ko-KR/installing/README.md +++ b/docs/ko-KR/installing/README.md @@ -63,7 +63,6 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett { programs.starship = { enable = true; - enableZshIntegration = true; # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/nl-NL/config/README.md b/docs/nl-NL/config/README.md index 9c4407f49..76666094f 100644 --- a/docs/nl-NL/config/README.md +++ b/docs/nl-NL/config/README.md @@ -261,7 +261,9 @@ format = "$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. 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. @@ -795,19 +797,20 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Options -| Option | Default | Description | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | -| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | -| `style` | `"bold cyan"` | The style for the module. | -| `disabled` | `false` | Disables the `directory` module. | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
This module has a few advanced configuration options that control how the directory is displayed. @@ -839,6 +842,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an *: This variable can only be used as a part of a style string +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Variable | Example | Description | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Mirrors the value of option `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
+ ### Example ```toml @@ -1159,13 +1177,14 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud ### Options -| Option | Default | Description | -| ---------------- | ---------------------------------------------------------- | --------------------------------------------------------------- | -| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | -| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `gcloud` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------------------------------- | ---------------------------------------------------------------- | +| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | +| `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. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `gcloud` module. | ### Variables @@ -1214,6 +1233,17 @@ us-central1 = "uc1" asia-northeast1 = "an1" ``` +#### Display account and aliased project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' +[gcloud.project_aliases] +very-long-project-name = "vlpn" +``` + ## Git Branch The `git_branch` module shows the active branch of the repo in your current directory. @@ -1711,39 +1741,6 @@ The `julia` module shows the currently installed version of [Julia](https://juli symbol = "∴ " ``` -## localip - -The `localip` module shows the IPv4 address of the primary network interface. - -### Options - -| Option | Default | Description | -| ---------- | ------------------------- | ------------------------------------------------------ | -| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `true` | Disables the `localip` module. | - -### Variables - -| Variable | Example | Description | -| --------- | ------------ | ----------------------------------- | -| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | -| style\* | | Mirrors the value of option `style` | - -*: This variable can only be used as a part of a style string - -### Example - -```toml -# ~/.config/starship.toml - -[localip] -ssh_only = false -format = "@[$localipv4](bold red) " -disabled = false -``` - ## Kotlin The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: @@ -1793,7 +1790,7 @@ kotlin_binary = "kotlinc" ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. 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 @@ -1815,8 +1812,10 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Variable | Example | Description | | --------- | -------------------- | ---------------------------------------- | -| context | `starship-cluster` | The current kubernetes context | +| context | `starship-context` | The current kubernetes context name | | namespace | `starship-namespace` | If set, the current kubernetes namespace | +| user | `starship-user` | If set, the current kubernetes user | +| cluster | `starship-cluster` | If set, the current kubernetes cluster | | symbol | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | @@ -1828,12 +1827,12 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [kubernetes] -format = 'on [⛵ $context \($namespace\)](dimmed green) ' +format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false [kubernetes.context_aliases] "dev.local.cluster.k8s" = "dev" ".*/openshift-cluster/.*" = "openshift" -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,12 +1848,12 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` ## Line Break @@ -1876,6 +1875,39 @@ The `line_break` module separates the prompt into two lines. disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Options + +| Option | Default | Description | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `localip` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ----------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). By default the module will be shown if any of the following conditions are met: diff --git a/docs/nl-NL/installing/README.md b/docs/nl-NL/installing/README.md index 85e28ac32..cc75ef908 100644 --- a/docs/nl-NL/installing/README.md +++ b/docs/nl-NL/installing/README.md @@ -63,7 +63,6 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett { programs.starship = { enable = true; - enableZshIntegration = true; # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/pl-PL/config/README.md b/docs/pl-PL/config/README.md index d12500440..153a835fb 100644 --- a/docs/pl-PL/config/README.md +++ b/docs/pl-PL/config/README.md @@ -261,7 +261,9 @@ format = "$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. 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. @@ -795,19 +797,20 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Options -| Option | Default | Description | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | -| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | -| `style` | `"bold cyan"` | The style for the module. | -| `disabled` | `false` | Disables the `directory` module. | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
This module has a few advanced configuration options that control how the directory is displayed. @@ -839,6 +842,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an *: This variable can only be used as a part of a style string +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Zmienne | Example | Description | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Mirrors the value of option `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
+ ### Example ```toml @@ -1048,7 +1066,7 @@ default = "unknown user" | Option | Default | Description | | ---------- | ------------------------------ | ---------------------------------------------------------------------------- | | `symbol` | `""` | The symbol used before displaying the variable value. | -| `zmienne` | | The environment variable to be displayed. | +| `variable` | | The environment variable to be displayed. | | `default` | | The default value to be displayed when the selected variable is not defined. | | `format` | `"with [$env_value]($style) "` | The format for the module. | | `disabled` | `false` | Disables the `env_var` module. | @@ -1159,13 +1177,14 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud ### Options -| Option | Default | Description | -| ---------------- | ---------------------------------------------------------- | --------------------------------------------------------------- | -| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | -| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `gcloud` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------------------------------- | ---------------------------------------------------------------- | +| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | +| `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. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `gcloud` module. | ### Variables @@ -1214,6 +1233,17 @@ us-central1 = "uc1" asia-northeast1 = "an1" ``` +#### Display account and aliased project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' +[gcloud.project_aliases] +very-long-project-name = "vlpn" +``` + ## Git Branch The `git_branch` module shows the active branch of the repo in your current directory. @@ -1711,39 +1741,6 @@ The `julia` module shows the currently installed version of [Julia](https://juli symbol = "∴ " ``` -## localip - -The `localip` module shows the IPv4 address of the primary network interface. - -### Options - -| Option | Default | Description | -| ---------- | ------------------------- | ------------------------------------------------------ | -| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `true` | Disables the `localip` module. | - -### Variables - -| Zmienne | Example | Description | -| --------- | ------------ | ----------------------------------- | -| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | -| style\* | | Mirrors the value of option `style` | - -*: This variable can only be used as a part of a style string - -### Example - -```toml -# ~/.config/starship.toml - -[localip] -ssh_only = false -format = "@[$localipv4](bold red) " -disabled = false -``` - ## Kotlin The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: @@ -1793,7 +1790,7 @@ kotlin_binary = "kotlinc" ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. 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 @@ -1815,8 +1812,10 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Zmienne | Example | Description | | --------- | -------------------- | ---------------------------------------- | -| context | `starship-cluster` | The current kubernetes context | +| context | `starship-context` | The current kubernetes context name | | namespace | `starship-namespace` | If set, the current kubernetes namespace | +| user | `starship-user` | If set, the current kubernetes user | +| cluster | `starship-cluster` | If set, the current kubernetes cluster | | symbol | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | @@ -1828,12 +1827,12 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [kubernetes] -format = 'on [⛵ $context \($namespace\)](dimmed green) ' +format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false [kubernetes.context_aliases] "dev.local.cluster.k8s" = "dev" ".*/openshift-cluster/.*" = "openshift" -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,12 +1848,12 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` ## Line Break @@ -1876,6 +1875,39 @@ The `line_break` module separates the prompt into two lines. disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Options + +| Option | Default | Description | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `localip` module. | + +### Variables + +| Zmienne | Example | Description | +| --------- | ------------ | ----------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). By default the module will be shown if any of the following conditions are met: diff --git a/docs/pl-PL/installing/README.md b/docs/pl-PL/installing/README.md index 1ba11e283..c27f1e1e7 100644 --- a/docs/pl-PL/installing/README.md +++ b/docs/pl-PL/installing/README.md @@ -63,7 +63,6 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett { programs.starship = { enable = true; - enableZshIntegration = true; # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/pt-BR/config/README.md b/docs/pt-BR/config/README.md index db695672d..19c1faad1 100644 --- a/docs/pt-BR/config/README.md +++ b/docs/pt-BR/config/README.md @@ -261,13 +261,15 @@ format = "$all$directory$character" ## AWS -O módulo `aws` exibi a região e perfil atual do AWS. Isto é baseado nas variáveis de env `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` contidas no arquivo `~/.aws/config`. Este modulo exibi também tempo de expiração de credenciais temporarias. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. Isto é baseado nas variáveis de env `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` contidas no arquivo `~/.aws/config`. Este modulo exibi também tempo de expiração de credenciais temporarias. -Quando usar [aws-vault](https://github.com/99designs/aws-vault) o perfil é lido da variável `AWS_VAULT` e o tempo de expiração de credenciais é lida da variável de env `AWS_SESSION_EXPIRATION`. +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. -Quando usar [awsu](https://github.com/kreuzwerker/awsu) o perfil é lido da varável de env `AWSU_PROFILE`. +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. -Quando usar [AWSume](https://awsu.me) o perfil é lido da variável `AWSUME_PROFILE` e o tempo de expiração de credenciais é lida da variável de env `AWSUME_EXPIRATION`. +When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. + +When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. ### Opções @@ -290,7 +292,7 @@ Quando usar [AWSume](https://awsu.me) o perfil é lido da variável `AWSUME_PROF | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplos @@ -335,7 +337,7 @@ symbol = "🅰 " ## Azure -O módulo `azure` exibe a assinatura Azure atual. Isto é baseado na exibição do nome da assinatura padrão, como definido no arquivo em `~/.azure/azureProfile.json`. +The `azure` module shows the current Azure Subscription. This is based on showing the name of the default subscription, as defined in the `~/.azure/azureProfile.json` file. ### Opções @@ -360,7 +362,7 @@ style = "blue bold" ## 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%. +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%. ### Opções @@ -388,7 +390,7 @@ discharging_symbol = "💀 " ### Indicador de bateria -A configuração `display` é usada para definir quando o indicador de bateria deve ser exibido (threshold), qual deve ser o simbolo(symbol) e como você gostaria de exibir (style). Se nenhum `display` for fornecido. O padrão é como mostrado: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. O padrão é como mostrado: ```toml [[battery.display]] @@ -396,11 +398,11 @@ threshold = 10 style = "bold red" ``` -O valor padrão das opções `charging_symbol` e `discharging_symbol`é respectivamente o valor das opções `battery`'s `charging_symbol` e `discharging_symbol`. +The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. #### Opções -A opção `display` é um array da seguinte tabela. +The `display` option is an array of the following table. | Opções | Padrão | Descrição | | -------------------- | ---------- | -------------------------------------------------------------------------------------------------- | @@ -426,18 +428,18 @@ discharging_symbol = "💦" ## Caractere -O módulo `character` exibe um caracter (normalmente uma seta) ao lado de onde o texto começa a ser inserido no terminal. +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -O caractere vai te dizer se o ultimo comando foi bem sucedido ou não. Você pode fazer isto de duas maneiras: +The character will tell you whether the last command was successful or not. It can do this in two ways: - alterando a cor (`red`/`green`) - alterando a forma (`❯`/`✖`) -Por padrão ele apenas muda de cor. Se você deseja alterar o formato de uma olhada [neste exemplo](#with-custom-error-shape). +By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). ::: atenção -`error_symbol` não é suportado pelo nu shell. +`error_symbol` is not supported on nu shell. ::: @@ -496,7 +498,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -O módulo `cmake` exibe a versão instalada do [CMake](https://cmake.org/). Por padrão o módulo será ativo se qualquer das condições a seguir for atendida: +The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: - O diretorio atual cotem um arquivo `CMakeLists.txt` - O diretorio atual tem um arquivo `CMakeCache.txt` @@ -522,11 +524,11 @@ O módulo `cmake` exibe a versão instalada do [CMake](https://cmake.org/). Por | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL -O módulo `cobol` exibe a versão instalada atual do COBOL. Por padrão, o módulo será exibido se qualquer das seguintes condições for atendida: +The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met: - O diretório atual tem qualquer arquivo com extensão `.cob` or `.COB` - O diretório atual tenham qualquer arquivo com extensão `.cbl` or `.CBL` @@ -552,19 +554,19 @@ O módulo `cobol` exibe a versão instalada atual do COBOL. Por padrão, o módu | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ## Tempo de execução do comando -O módulo `cmd_duration` exibi o tempo que o ultimo comando levou para executar. O módulo vai exibir somente se o comando levar mais de dois segundos, ou o valor de configuração `min_time` existir. +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. -::: warning Não utilize o DEBUG-trap no Bash +::: warning Do not hook the DEBUG trap in Bash -Se você esta rodando o Starship no `bash`, você não deve ativar a armadilha `DEBUG` após rodar `eval $(starship init $0)`, ou este módulo **vai** quebrar. +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -Usuários do bash que precisam de funções pre-executadas podem usar [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simplesmente defina os arrays `preexec_functions` e `precmd_functions` antes de rodar `eval $(starship init $0)`, e depois pode proceder normalmente. +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### Opções @@ -586,7 +588,7 @@ Usuários do bash que precisam de funções pre-executadas podem usar [rcaloras' | duration | `16m40s` | O tempo que levou para executar o comando | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -600,11 +602,11 @@ format = "levou [$duration](bold yellow)" ## Conda -O módulo `conda` exibe o ambiente atual do [Conda](https://docs.conda.io/en/latest/), se o `$CONDA_DEFAULT_ENV` estiver definido. +The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. -::: dica +::: tip -Isso não suprime o modificador de prompt do conda, você pode executar `conda config --set changeps1 False`. +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. ::: @@ -627,7 +629,7 @@ Isso não suprime o modificador de prompt do conda, você pode executar `conda c | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -659,7 +661,7 @@ The `container` module displays a symbol and container name, if inside a contain | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -672,7 +674,7 @@ format = "[$symbol \\[$name\\]]($style) " ## Crystal -O módulo `crystal` exibe a versão instalada atual do [Crystal](https://crystal-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `shard.yml` - O diretório atual contem um arquivo `.cr` @@ -698,7 +700,7 @@ O módulo `crystal` exibe a versão instalada atual do [Crystal](https://crystal | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -711,7 +713,7 @@ format = "via [✨ $version](bold blue) " ## Dart -O módulo `dart` exibe a versão atual instalada do [Dart](https://dart.dev/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `dart` module shows the currently installed version of [Dart](https://dart.dev/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem algum arquivo com extensão `.dart` - O diretório atual contem um diretório `.dart_tool` @@ -738,7 +740,7 @@ O módulo `dart` exibe a versão atual instalada do [Dart](https://dart.dev/). P | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -751,7 +753,7 @@ format = "via [🔰 $version](bold red) " ## Deno -O módulo `deno` exibe a versão instalada atual do [Deno](https://deno.land/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `deno` module shows you your currently installed version of [Deno](https://deno.land/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual tenha um arquivo `deno.json`, `deno.jsonc`, `mod.ts`, `mod.js`, `deps.ts` or `deps.js` @@ -787,30 +789,31 @@ format = "via [🦕 $version](green bold) " ## Diretório -O módulo `directory` exibe o caminho do diretório atual, truncando as três pastas pai. Seu diretório será truncando na raiz do repositório git que você estiver atualmente. +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. -Quando usar a opção de estilo fish pwd, ao invés de esconder o caminho que é truncado, você vai ver um nome encurtado de cada diretório baseado no número que você habilitar para a opção. +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. -Por exemplo, dado `~/Dev/Nix/nixpkgs/pkgs` onde `nixpkgs` é o repositório raiz e a opção esta definida para `1`. Você verá `~/D/N/nixpkgs/pkgs`, enquanto antes seria `nixpkgs/pkgs`. +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. ### Opções -| Opções | Padrão | Descrição | -| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | O número de pastas pais do diretório atual que serão truncadas. | -| `truncate_to_repo` | `true` | Seu diretório será truncado ou não para a raiz do repositório git atual. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | O formato do módulo. | -| `style` | `"bold cyan"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `directory`. | -| `read_only` | `"🔒"` | O simbolo que indica que o diretório atual é somente leitura. | -| `read_only_style` | `"red"` | O estilo para o simbolo de somente leitura. | -| `truncation_symbol` | `""` | O simbolo para prefixo de caminhos truncados. ex: "…/" | -| `repo_root_style` | `None` | O estilo para o repositório git root quando `truncate_to_repo` estiver definido como false. | -| `home_symbol` | `"~"` | O simbolo para indicar o diretório home. | -| `use_os_path_sep` | `true` | Use o separador especifico do SO em vez de sempre usar `/` (ex: `\` no Windows) | +| Opções | Padrão | Descrição | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | O número de pastas pais do diretório atual que serão truncadas. | +| `truncate_to_repo` | `true` | Seu diretório será truncado ou não para a raiz do repositório git atual. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | O formato do módulo. | +| `style` | `"bold cyan"` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `directory`. | +| `read_only` | `"🔒"` | O simbolo que indica que o diretório atual é somente leitura. | +| `read_only_style` | `"red"` | O estilo para o simbolo de somente leitura. | +| `truncation_symbol` | `""` | O simbolo para prefixo de caminhos truncados. ex: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
-Este módulo tem algumas configurações avançadas que controlam como o diretório é exibido. +This module has a few advanced configuration options that control how the directory is displayed. | Opções Avançadas | Padrão | Descrição | | --------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -818,7 +821,7 @@ Por exemplo, dado `~/Dev/Nix/nixpkgs/pkgs` onde `nixpkgs` é o repositório raiz | `fish_style_pwd_dir_length` | `0` | O número de caracteres para usar quando aplicado no path logico do fish shell pwd. | | `use_logical_path` | `true` | Se `true` exibe um caminho lógico originado do shell via `PWD` ou`--logical-path`. Se `false` em vez disso, exibe o caminho do filesystem com os symlinks resolvidos. | -`substitutions` aceita você definir substituições arbitrarias para strings literais que ocorra no path, por exemplo prefixos de rede longos ou diretórios de desenvolvimento (ex:. Java). Note isto irá desabilita o estilo PWD do fish. +`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories (i.e. Java). Note that this will disable the fish style PWD. ```toml [directory.substitutions] @@ -826,7 +829,7 @@ Por exemplo, dado `~/Dev/Nix/nixpkgs/pkgs` onde `nixpkgs` é o repositório raiz "src/com/long/java/path" = "mypath" ``` -`fish_style_pwd_dir_length` interage com as opções de truncação padrão de uma forma que pode suprimir no começo: se não for zero, os componentes do path que normalmente seriam truncados são exibidos com todos caracteres. Por exemplo, o caminho `/built/this/city/on/rock/and/roll`, que normalmente seria exibido como`rock/and/roll`, seria exibido como `/b/t/c/o/rock/and/roll` com`fish_style_pwd_dir_length = 1`--os componentes de path que normalmente seriam removidos são exibidos com um único caractere. Para `fish_style_pwd_dir_length = 2`, seria `/bu/th/ci/on/rock/and/roll`. +`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
@@ -837,7 +840,22 @@ Por exemplo, dado `~/Dev/Nix/nixpkgs/pkgs` onde `nixpkgs` é o repositório raiz | path | `"D:/Projetos"` | O caminho do diretório atual | | style\* | `"black bold dimmed"` | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string + +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Variável | Exemplo | Descrição | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Espelha o valor da opção `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
### Exemplo @@ -851,30 +869,30 @@ truncation_symbol = "…/" ## Docker Context -O módulo `docker_context` exibe o [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) ativo atualmente se não estiver definido como `default` ou se as variáveis de ambiente `DOCKER_MACHINE_NAME`, `DOCKER_HOST` ou `DOCKER_CONTEXT` estiverem definidas (iram sobrescrever o contexto atual). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol$context]($style) "` | O formato do módulo. | -| `symbol` | `"🐳 "` | O simbolo usado antes de exibir a versão do contexto docker. | -| `only_with_files` | `true` | Exibe somente quando houver um arquivo | -| `detect_extensions` | `[]` | Quais extensões devem acionar este módulo (precisa que `only_with_files` seja true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Quais arquivos devem acionar este módulo (precisa que `only_with_files` seja true). | -| `detect_folders` | `[]` | Quais pastas devem acionar este módulo (precisa que `only_with_files` seja true). | -| `style` | `"blue bold"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `docker_context`. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | O formato do módulo. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `only_with_files` | `true` | Only show when there's a match | +| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | +| `style` | `"blue bold"` | O estilo do módulo. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------------- | ---------------------------------- | -| context | `test_context` | O contexto atual do docker | +| context | `test_context` | The current docker context | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -887,9 +905,9 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -O módulo `dotnet` exibe a versão relevante do [.NET Core SDK](https://dotnet.microsoft.com/) para a pasta atual. Se o SDK foi fixado na pasta atual, a versão será exibida. Caso contrario será exibida a ultima versão instalada do SDK. +The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. -Por padrão o módulo vai apenas exibir no seu prompt quando um ou mais dos seguintes arquivos estiverem presente no diretório: +By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: - `global.json` - `project.json` @@ -900,11 +918,11 @@ Por padrão o módulo vai apenas exibir no seu prompt quando um ou mais dos segu - `*.fsproj` - `*.xproj` -Você também precisa do .NET Core SDK instalado para usá-lo corretamente. +You'll also need the .NET Core SDK installed in order to use it correctly. -Internamente, este módulo usa seu próprio mecanismo de detecção de versão. Normalmente é duas vezes mais rápido que executar `dotnet --version`, mas pode exibir uma versão errado se o projeto .NET tiver o layout de diretório incomum. Se a precisão é mais importante que velocidade, você pode desabilitar o mecanismo definindo `heuristic = false` nas opções do modulo. +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. -O módulo também vai exibir o Target Framework Moniker () quando o diretório atual tiver o arquivo csproj. +The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. ### Opções @@ -912,24 +930,24 @@ O módulo também vai exibir o Target Framework Moniker ( Nada é exibido. - 1 job -> `symbol` é exibido. @@ -1626,39 +1656,39 @@ A funcionalidade padrão é: ::: atenção -Este módulo não é suportado em tcsh e nu. +This module is not supported on tcsh and nu. ::: ::: atenção -A opção `threshold` está obsoleta, mas se você quiser usa-la, o módulo vai exibir o numero de jobs rodando se for maior que 1 ou maior que o valor configurado na `threshold`, se ele existir. Se o valor `threshold` for definido como 0, então o módulo vai exibir quando tiver 0 jobs rodando. +The `threshold` option is deprecated, but if you want to use it, the module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running. ::: ### Opções -| Opções | Padrão | Descrição | -| ------------------ | ----------------------------- | ------------------------------------------------------------------------- | -| `threshold`* | `1` | Exibe o número de jobs se excedido. | -| `symbol_threshold` | `1` | Exibe `symbol` se o número de jobs for ao menos `symbol_threshold`. | -| `number_threshold` | `2` | Exibe o número de jobs se o número de jobs é ao menos `number_threshold`. | -| `format` | `"[$symbol$number]($style) "` | O formato do módulo. | -| `symbol` | `"✦"` | A string usada para representar a variável `symbol`. | -| `style` | `"bold blue"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `jobs`. | +| Opções | Padrão | Descrição | +| ------------------ | ----------------------------- | ------------------------------------------------------------------------ | +| `threshold`* | `1` | Show number of jobs if exceeded. | +| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | +| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | +| `format` | `"[$symbol$number]($style) "` | O formato do módulo. | +| `symbol` | `"✦"` | The string used to represent the `symbol` variable. | +| `style` | `"bold blue"` | O estilo do módulo. | +| `disabled` | `false` | Disables the `jobs` module. | -*: Esta opção está obsoleta, por favor use o `number_threshold` e `symbol_threshold` em vez disso. +*: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead. ### Variáveis | Variável | Exemplo | Descrição | | --------- | ------- | ---------------------------------- | -| number | `1` | O número de jobs | +| number | `1` | The number of jobs | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -1673,7 +1703,7 @@ symbol_threshold = 0 ## Julia -O módulo `julia` exibe a versão atual instalada do [Julia](https://julialang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `julia` module shows the currently installed version of [Julia](https://julialang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `Project.toml` - O diretório atual contem um arquivo `Manifest.toml` @@ -1687,20 +1717,20 @@ O módulo `julia` exibe a versão atual instalada do [Julia](https://julialang.o | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | | `detect_extensions` | `["jl"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["Project.toml", "Manifest.toml"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `symbol` | `"ஃ "` | O formato de string que representa o simbolo do Julia. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | | `style` | `"bold purple"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `julia`. | +| `disabled` | `false` | Disables the `julia` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------- | ---------------------------------- | -| version | `v1.4.0` | A versão do `julia` | +| version | `v1.4.0` | The version of `julia` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -1711,42 +1741,9 @@ O módulo `julia` exibe a versão atual instalada do [Julia](https://julialang.o symbol = "∴ " ``` -## localip - -The `localip` module shows the IPv4 address of the primary network interface. - -### Opções - -| Opções | Padrão | Descrição | -| ---------- | ------------------------- | ------------------------------------------------------ | -| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | O formato do módulo. | -| `style` | `"bold yellow"` | O estilo do módulo. | -| `disabled` | `true` | Desabilita o módulo `localip`. | - -### Variáveis - -| Variável | Exemplo | Descrição | -| --------- | ------------ | --------------------------------- | -| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | -| 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 - -[localip] -ssh_only = false -format = "@[$localipv4](bold red) " -disabled = false -``` - ## Kotlin -O módulo `kotlin` exibie a versão atual instalada do [Kotlin](https://kotlinlang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `.kt` ou um arquivo `.kts` @@ -1758,21 +1755,21 @@ O módulo `kotlin` exibie a versão atual instalada do [Kotlin](https://kotlinla | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | | `detect_extensions` | `["kt", "kts"]` | 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. | -| `symbol` | `"🅺 "` | O formato de string que representa o simbolo do Kotlin. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | | `style` | `"bold blue"` | O estilo do módulo. | -| `kotlin_binary` | `"kotlin"` | Configura o binário do kotlin que o Starship executa para obter a versão. | -| `disabled` | `false` | Desabilita o módulo `kotlin`. | +| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `kotlin` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | --------- | ---------------------------------- | -| version | `v1.4.21` | A versão do `kotlin` | +| version | `v1.4.21` | The version of `kotlin` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -1787,40 +1784,42 @@ symbol = "🅺 " # ~/.config/starship.toml [kotlin] -# Usa o binário do compilador Kotlin para obter a versão instalada +# Uses the Kotlin Compiler binary to get the installed version kotlin_binary = "kotlinc" ``` ## Kubernetes -Exibe o [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) nome e, se definido, o namespace do arquivo kubeconfig. O namespace precisa estar definido no arquivo kubeconfig, isto pode ser feito via `kubectl config set-context starship-cluster --namespace astronaut`. Se a env var `$KUBECONFIG` estiver definida o módulo vai usa-la ao invés de usar o `~/.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`. -::: dica +::: tip -Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para `false` no seu arquivo de configuração. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Opções -| Opções | Padrão | Descrição | -| ----------------- | ---------------------------------------------------- | ------------------------------------------------------------- | -| `symbol` | `"☸ "` | Uma string que representa o simbolo exibido antes do Cluster. | -| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | O formato do módulo. | -| `style` | `"cyan bold"` | O estilo do módulo. | -| `context_aliases` | | Tabela de aliases de contexto para exibir. | -| `disabled` | `true` | Desabilita o módulo `kubernetes`. | +| Opções | Padrão | Descrição | +| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | +| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | O formato do módulo. | +| `style` | `"cyan bold"` | O estilo do módulo. | +| `context_aliases` | | Table of context aliases to display. | +| `disabled` | `true` | Disables the `kubernetes` module. | ### Variáveis -| Variável | Exemplo | Descrição | -| --------- | -------------------- | ------------------------------------------- | -| context | `starship-cluster` | O contexto atual do kubernetes | -| namespace | `starship-namespace` | Se definido o namespace atual do kubernetes | -| symbol | | Espelha o valor da opção `símbolo` | -| style\* | | Espelha o valor da opção `style` | +| Variável | Exemplo | Descrição | +| --------- | -------------------- | ---------------------------------------- | +| context | `starship-context` | The current kubernetes context name | +| namespace | `starship-namespace` | If set, the current kubernetes namespace | +| user | `starship-user` | If set, the current kubernetes user | +| cluster | `starship-cluster` | If set, the current kubernetes cluster | +| symbol | | Espelha o valor da opção `símbolo` | +| style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -1828,44 +1827,44 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para # ~/.config/starship.toml [kubernetes] -format = 'em [⛵ $context \($namespace\)](dimmed green) ' +format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false [kubernetes.context_aliases] "dev.local.cluster.k8s" = "dev" ".*/openshift-cluster/.*" = "openshift" -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` -#### Correspondência Regex +#### Regex Matching -Adicional para aliasing simples, `context_aliases` também suporta correspondência estendida e renomeação usando expressão regular. +Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions. -A expressão regular deve coincidir com todo o contexto kube, Grupos de captura podem ser referenciados usando `$name` e `$N` na substituição. Isto esta mais explicado na documentação do [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace). +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. -Nomes longos de clusters gerados automaticamente podem ser encurtados usando expressão regular: +Long and automatically generated cluster names can be identified and shortened using regular expressions: ```toml [kubernetes.context_aliases] -# Os contextos OpenShift carregam o namespace e o usuário no contexto kube: `namespace/name/user`: +# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" -# Ou melhor, renomear todos os clusters do OpenShift de uma só vez: -".*/(?P[\\w-]+)/.*" = "$cluster" +# Or better, to rename every OpenShift cluster at once: +".*/(?P[\\w-]+)/.*" = "$var_cluster" -# Contextos do GKE, AWS e outros provedores de nuvem geralmente carregam informações adicionais, como a região/zona. -# A entrada a seguir corresponde ao formato do GKE (`gke_projectname_zone_cluster-name`) -# e renomeia cada contexto kube correspondente em um formato mais legível (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. +# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) +# and renames every matching kube context into a more readable format (`gke-cluster-name`): +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` -## Quebra de Linha +## Line Break -O módulo `line_break` separa o prompt em duas linhas. +The `line_break` module separates the prompt into two lines. ### Opções -| Opções | Padrão | Descrição | -| ---------- | ------- | ----------------------------------------------------------------------------------- | -| `disabled` | `false` | Desabilita o módulo `line_break`, fazendo com que o prompt seja em uma única linha. | +| Opções | Padrão | Descrição | +| ---------- | ------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | ### Exemplo @@ -1876,9 +1875,42 @@ O módulo `line_break` separa o prompt em duas linhas. disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Opções + +| Opções | Padrão | Descrição | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | O formato do módulo. | +| `style` | `"bold yellow"` | O estilo do módulo. | +| `disabled` | `true` | Disables the `localip` module. | + +### Variáveis + +| Variável | Exemplo | Descrição | +| --------- | ------------ | --------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Espelha o valor da opção `style` | + +*: This variable can only be used as a part of a style string + +### Exemplo + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua -O módulo `lua` exibe a versão atual instalada do [Lua](http://www.lua.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contém um arquivo `.lua-version` - O diretório atual contém um diretório `lua` @@ -1890,23 +1922,23 @@ O módulo `lua` exibe a versão atual instalada do [Lua](http://www.lua.org/). P | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | Uma string que representa o simbolo do Lua. | +| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | | `detect_extensions` | `["lua"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `[".lua-version"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `["lua"]` | Quais pastas devem ativar este módulo. | | `style` | `"bold blue"` | O estilo do módulo. | -| `lua_binary` | `"lua"` | Configura o binário lua que o Starship executa para pegar a versão. | -| `disabled` | `false` | Desabilita o módulo `lua`. | +| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `lua` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------- | ---------------------------------- | -| version | `v5.4.0` | A versão do `lua` | +| version | `v5.4.0` | The version of `lua` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -1919,38 +1951,38 @@ format = "via [🌕 $version](bold blue) " ## Uso de Memória -O módulo `memory_usage` mostra a memória atual do sistema e o uso de troca. +The `memory_usage` module shows current system memory and swap usage. -Por padrão o uso do swap é exibido se o total de swap do sistema é diferente de zero. +By default the swap usage is displayed if the total system swap is non-zero. -::: dica +::: tip -Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para `false` no seu arquivo de configuração. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Opções -| Opções | Padrão | Descrição | -| ----------- | ----------------------------------------------- | ------------------------------------------------------------- | -| `threshold` | `75` | Esconde o uso de memoria a menos que exceda esta porcentagem. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | O formato do módulo. | -| `symbol` | `"🐏"` | O simbolo usado antes de exibir o uso de memoria. | -| `style` | `"bold dimmed white"` | O estilo do módulo. | -| `disabled` | `true` | Desabilita o módulo `memory_usage`. | +| Opções | Padrão | Descrição | +| ----------- | ----------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | O formato do módulo. | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | O estilo do módulo. | +| `disabled` | `true` | Disables the `memory_usage` module. | ### Variáveis -| Variável | Exemplo | Descrição | -| ---------------- | ------------- | ------------------------------------------------- | -| ram | `31GiB/65GiB` | O uso/total de memoria RAM atual do sistema. | -| ram_pct | `48%` | A porcentagem de uso atual da memoria do sistema. | -| swap\*\* | `1GiB/4GiB` | O tamanho atual do swap do sistema. | -| swap_pct\*\* | `77%` | A porcentagem atual de uso do swap. | -| symbol | `🐏` | Espelha o valor da opção `símbolo` | -| style\* | | Espelha o valor da opção `style` | +| Variável | Exemplo | Descrição | +| ---------------- | ------------- | ------------------------------------------------------------------ | +| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | +| ram_pct | `48%` | The percentage of the current system memory. | +| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. | +| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. | +| symbol | `🐏` | Espelha o valor da opção `símbolo` | +| style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo *\*: As informações do arquivo SWAP são exibidas apenas se detectadas no sistema atual +*: This variable can only be used as a part of a style string *\*: The SWAP file information is only displayed if detected on the current system ### Exemplo @@ -1966,28 +1998,28 @@ style = "bold dimmed green" ## Mercurial Branch -O módulo `hg_branch` exibe o braço atual do repositório no diretório atual. +The `hg_branch` module shows the active branch of the repo in your current directory. ### Opções -| Opções | Padrão | Descrição | -| ------------------- | -------------------------------- | --------------------------------------------------------------------------------------- | -| `symbol` | `" "` | O simbolo usado ante do marcador hg ou nome do braço do repositório no diretório atual. | -| `style` | `"bold purple"` | O estilo do módulo. | -| `format` | `"on [$symbol$branch]($style) "` | O formato do módulo. | -| `truncation_length` | `2^63 - 1` | Trunca o nome do braço hg para `N` caracteres | -| `truncation_symbol` | `"…"` | O simbolo usado para indicar que o nome braço foi truncado. | -| `disabled` | `true` | Desabilita o módulo `hg_branch`. | +| Opções | Padrão | Descrição | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `"bold purple"` | O estilo do módulo. | +| `format` | `"on [$symbol$branch]($style) "` | O formato do módulo. | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------- | ---------------------------------- | -| branch | `master` | O braço mercurial ativo | +| branch | `master` | The active mercurial branch | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -1995,14 +2027,14 @@ O módulo `hg_branch` exibe o braço atual do repositório no diretório atual. # ~/.config/starship.toml [hg_branch] -format = "em [🌱 $branch](bold purple)" +format = "on [🌱 $branch](bold purple)" truncation_length = 4 truncation_symbol = "" ``` ## Nim -O módulo `nim` exibe a versão atual instalada do [Nim](https://nim-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `nim.cfg` - O diretório atual tenha um arquivo com a extensão `.nim` @@ -2013,24 +2045,24 @@ O módulo `nim` exibe a versão atual instalada do [Nim](https://nim-lang.org/). | Opções | Padrão | Descrição | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | O símbolo usado antes de exibir a versão do Nim. | +| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | | `detect_extensions` | `["nim", "nims", "nimble"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["nim.cfg"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | | `style` | `"bold yellow"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `nim`. | +| `disabled` | `false` | Disables the `nim` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------- | ---------------------------------- | -| version | `v1.2.0` | A versão do `nimc` | +| version | `v1.2.0` | The version of `nimc` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2044,29 +2076,29 @@ symbol = "🎣 " ## Nix-shell -O módulo `nix_shell` exibe o ambiente [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html). O módulo vai exibir quando estiver dentro de um ambiente nix-shell. +The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. ### Opções -| Opções | Padrão | Descrição | -| ------------ | ---------------------------------------------- | ------------------------------------------------- | -| `format` | `'via [$symbol$state( \($name\))]($style) '` | O formato do módulo. | -| `symbol` | `"❄️ "` | Uma string que representa o simbolo do nix-shell. | -| `style` | `"bold blue"` | O estilo do módulo. | -| `impure_msg` | `"impure"` | Uma string que exibe quando o shell é impuro. | -| `pure_msg` | `"pure"` | Uma string que exibe quando o shell é puro. | -| `disabled` | `false` | Desabilita o módulo `nix_shell`. | +| Opções | Padrão | Descrição | +| ------------ | ---------------------------------------------- | ----------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | O formato do módulo. | +| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | +| `style` | `"bold blue"` | O estilo do módulo. | +| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | +| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | +| `disabled` | `false` | Disables the `nix_shell` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | ------- | ---------------------------------- | -| state | `pure` | O estado do nix-shell | -| name | `lorri` | O nome do nix-shell | +| state | `pure` | The state of the nix-shell | +| name | `lorri` | The name of the nix-shell | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2082,7 +2114,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' ## Node.js -O módulo `nodejs` exibe a versão atual instalada do [Node.js](https://nodejs.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem o arquivo `package.json` - O diretório atual tenha um arquivo `.node-version` @@ -2093,27 +2125,27 @@ O módulo `nodejs` exibe a versão atual instalada do [Node.js](https://nodejs.o ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | Uma string que representa o simbolo do Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Quais extensões devem ativar este módulo. | -| `detect_files` | `["package.json", ".node-version"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `["node_modules"]` | Quais pastas devem ativar este módulo. | -| `style` | `"bold green"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `nodejs`. | -| `not_capable_style` | `bold red` | O estilo para o módulo quando a propriedade engine no package.json não coincide com a versão do Node.js. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | +| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string representing the symbol of Node.js. | +| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Quais extensões devem ativar este módulo. | +| `detect_files` | `["package.json", ".node-version"]` | Quais nomes de arquivos devem ativar este módulo. | +| `detect_folders` | `["node_modules"]` | Quais pastas devem ativar este módulo. | +| `style` | `"bold green"` | O estilo do módulo. | +| `disabled` | `false` | Disables the `nodejs` module. | +| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | ---------- | ---------------------------------- | -| version | `v13.12.0` | A versão do `node` | +| version | `v13.12.0` | The version of `node` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2126,7 +2158,7 @@ format = "via [🤖 $version](bold green) " ## OCaml -O módulo `ocaml` exibe a versão atual instalada do [OCaml](https://ocaml.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `ocaml` module shows the currently installed version of [OCaml](https://ocaml.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contenha um arquivo com a extensão`.opam` ou um diretório `_opam` - O diretório atual tenha um diretório `esy.lock` @@ -2139,28 +2171,28 @@ O módulo `ocaml` exibe a versão atual instalada do [OCaml](https://ocaml.org/) | Opções | Padrão | Descrição | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | A string de formato do módulo. | +| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | O símbolo usado antes de exibir a versão do OCaml. | -| `global_switch_indicator` | `""` | A string usada para representar a mudança global OPAM. | -| `local_switch_indicator` | `"*"` | A string usada para representar as mudanças locais do OPAM. | +| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | +| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | +| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | | `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `["_opam", "esy.lock"]` | Quais pastas devem ativar este módulo. | | `style` | `"bold yellow"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `ocaml`. | +| `disabled` | `false` | Disables the `ocaml` module. | ### Variáveis -| Variável | Exemplo | Descrição | -| ---------------- | ------------ | ---------------------------------------------------------------- | -| version | `v4.10.0` | A versão do `ocaml` | -| switch_name | `my-project` | O switch OPAM ativo | -| switch_indicator | | Espelha o valor do `indicator` para o switch ativo atual do OPAM | -| symbol | | Espelha o valor da opção `símbolo` | -| style\* | | Espelha o valor da opção `style` | +| Variável | Exemplo | Descrição | +| ---------------- | ------------ | ----------------------------------------------------------------- | +| version | `v4.10.0` | The version of `ocaml` | +| switch_name | `my-project` | The active OPAM switch | +| switch_indicator | | Mirrors the value of `indicator` for currently active OPAM switch | +| symbol | | Espelha o valor da opção `símbolo` | +| style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2173,27 +2205,27 @@ format = "via [🐪 $version]($style) " ## OpenStack -O módulo `openstack` exibe o OpenStack cloud e projeto atual. O módulo apenas ativa quando a env var `OS_CLOUD` esta definida, neste caso ele vai ler o arquivo `clouds.yaml` de qualquer um dos [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). para buscar o projeto atual em uso. +The `openstack` module shows the current OpenStack cloud and project. The module only active when the `OS_CLOUD` env var is set, in which case it will read `clouds.yaml` file from any of the [default locations](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). to fetch the current project in use. ### Opções -| Opções | Padrão | Descrição | -| ---------- | --------------------------------------------------- | ---------------------------------------------------- | -| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | O formato do módulo. | -| `symbol` | `"☁️ "` | O simbolo usado para exibir o OpenStack cloud atual. | -| `style` | `"bold yellow"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `openstack`. | +| Opções | Padrão | Descrição | +| ---------- | --------------------------------------------------- | -------------------------------------------------------------- | +| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | O formato do módulo. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `"bold yellow"` | O estilo do módulo. | +| `disabled` | `false` | Disables the `openstack` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | ------- | ---------------------------------- | -| cloud | `corp` | O OpenStack cloud atual | -| project | `dev` | O projeto OpenStack atual | +| cloud | `corp` | The current OpenStack cloud | +| project | `dev` | The current OpenStack project | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2201,14 +2233,14 @@ O módulo `openstack` exibe o OpenStack cloud e projeto atual. O módulo apenas # ~/.config/starship.toml [openstack] -format = "em [$symbol$cloud(\\($project\\))]($style) " +format = "on [$symbol$cloud(\\($project\\))]($style) " style = "bold yellow" symbol = "☁️ " ``` ## Versionamento de Pacotes -O módulo `package` é mostrado quando o diretório atual é o repositório de um pacote e mostra sua versão atual. O módulo atualmente suporta pacotes `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart`. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – O versionamento de pacotes `npm` é extraído do `package.json` presente no diretório atual - [**Cargo**](https://doc.rust-lang.org/cargo/) – O versionamento de pacotes `cargo`é extraído do arquivo `Cargo.toml` presente no diretório atual @@ -2234,21 +2266,21 @@ O módulo `package` é mostrado quando o diretório atual é o repositório de u | Opções | Padrão | Descrição | | ----------------- | --------------------------------- | ------------------------------------------------------------------------------------ | | `format` | `"is [$symbol$version]($style) "` | O formato do módulo. | -| `symbol` | `"📦 "` | O símbolo usado antes de exibir a versão do pacote. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | | `style` | `"bold 208"` | O estilo do módulo. | -| `display_private` | `false` | Habilita a exibição da versão para os pacotes marcados como privado. | -| `disabled` | `false` | Desabilita o módulo `package`. | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------- | ---------------------------------- | -| version | `v1.0.0` | A versão do seu pacote | +| version | `v1.0.0` | The version of your package | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2261,7 +2293,7 @@ format = "via [🎁 $version](208 bold) " ## Perl -O módulo `perl` exibe a versão atual instalada do [Perl](https://www.perl.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `perl` module shows the currently installed version of [Perl](https://www.perl.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual tanha um aquivo `Makefile.PL` ou `Build.PL` - O diretório atual tenha um arquivo `cpanfile` ou `cpanfile.snapshot` @@ -2273,20 +2305,20 @@ O módulo `perl` exibe a versão atual instalada do [Perl](https://www.perl.org/ | Opções | Padrão | Descrição | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | A string de formato do módulo. | +| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | O símbolo usado antes de exibir a versão do Perl. | +| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | | `detect_extensions` | `["pl", "pm", "pod"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | | `style` | `"bold 149"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `perl`. | +| `disabled` | `false` | Disables the `perl` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | --------- | ---------------------------------- | -| version | `v5.26.1` | A versão do `perl` | +| version | `v5.26.1` | The version of `perl` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | @@ -2301,7 +2333,7 @@ format = "via [🦪 $version]($style) " ## PHP -O módulo `php` mostra a versão atualmente instalada do [PHP](https://www.php.net/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `php` module shows the currently installed version of [PHP](https://www.php.net/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `composer.json` - O diretório atual tenha um arquivo `.php-version` @@ -2318,17 +2350,17 @@ O módulo `php` mostra a versão atualmente instalada do [PHP](https://www.php.n | `detect_files` | `["composer.json", ".php-version"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | | `style` | `"147 bold"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `php`. | +| `disabled` | `false` | Disables the `php` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------- | ---------------------------------- | -| version | `v7.3.8` | A versão do `php` | +| version | `v7.3.8` | The version of `php` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2343,9 +2375,9 @@ format = "via [🔹 $version](147 bold) " The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version. -::: dica +::: tip -Por padrão a versão do Pulumi não é exibida, pois leva um tempo maior para ser carregada. Em média a maioria dos plugins leva (~70ms). Se você ainda deseja ativa-la, [siga o exemplo abaixo](#with-pulumi-version). +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). ::: @@ -2358,27 +2390,27 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: | Opções | Padrão | Descrição | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($username@)$stack]($style) "` | A string de formato do módulo. | +| `format` | `"via [$symbol($username@)$stack]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | Uma string que é exibida antes do Pulumi stack. | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | | `style` | `"bold 5"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `pulumi`. | +| `disabled` | `false` | Disables the `pulumi` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | ---------- | ---------------------------------- | -| version | `v0.12.24` | A versão do `pulumi` | -| stack | `dev` | A stack Pulumi atual | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | | username | `alice` | The current Pulumi username | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo -#### Com a versão do Pulumi +#### With Pulumi Version ```toml # ~/.config/starship.toml @@ -2387,7 +2419,7 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: format = "[🛥 ($version )$stack]($style) " ``` -#### Sem a versão do Pulumi +#### Without Pulumi version ```toml # ~/.config/starship.toml @@ -2398,7 +2430,7 @@ format = "[$symbol$stack]($style) " ## PureScript -O módulo `purescript` exibe a versão atual instalada do [PureScript](https://www.purescript.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `spago.dhall` - O diretório atual tenha um arquivo com a extensão `.purs` @@ -2409,22 +2441,22 @@ O módulo `purescript` exibe a versão atual instalada do [PureScript](https://w | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | O símbolo usado antes de exibir a versão do PureScript. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | | `detect_extensions` | `["purs"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["spago.dhall"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | | `style` | `"bold white"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `purescript`. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------- | ---------------------------------- | -| version | `0.13.5` | A versão do `purescript` | +| version | `0.13.5` | The version of `purescript` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2437,9 +2469,9 @@ format = "via [$symbol$version](bold white)" ## Python -O módulo `python` exibe a versão atual instalada do [Python](https://www.python.org/) e o [Python virtual environment](https://docs.python.org/tutorial/venv.html) se algum estiver ativo. +The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated. -Se o `pyenv_version_name` estiver definido como `true`, será exibido o nome da versão do pyenv. Caso contrario, ele exibirá o número da versão do `python --version`. +If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. Por padrão o módulo vai exibir se uma das condições a seguir for atendida: @@ -2455,37 +2487,37 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: ### Opções -| Opções | Padrão | Descrição | -| -------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | O formato do módulo. | -| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | Uma string que representa o simbolo do Python | -| `style` | `"yellow bold"` | O estilo do módulo. | -| `pyenv_version_name` | `false` | Usa pyenv para pegar a versão do Python | -| `pyenv_prefix` | `pyenv` | Prefixo antes da versão do pyenv, apenas usado se pyenv for usado | -| `python_binary` | `["python", "python3", "python2"]` | Configura o binário python que o Starship vai executar para obter a versão. | -| `detect_extensions` | `["py"]` | Quais extensões devem acionar este módulo | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | [] | -| `detect_folders` | `[]` | Quais pastas devem ativar este módulo | -| `disabled` | `false` | Desabilita o módulo `python`. | +| Opções | Padrão | Descrição | +| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | O formato do módulo. | +| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | O estilo do módulo. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `["py"]` | Quais extensões devem acionar este módulo | +| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | [] | +| `detect_folders` | `[]` | Quais pastas devem ativar este módulo | +| `disabled` | `false` | Disables the `python` module. | -::: dica +::: tip -A variável `python_binary` aceita uma string ou uma lista de strings. O Starship vai tentar executar cada binário até obter um resultado. Note que você pode apenas alterar o binário em que o Starship executa para pegar a versão do Python não os argumentos que são utilizados. +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. -O valor padrão e a ordem para o `python_binary` foram escolhidos para identificar primeiro uma versão do Python em um ambiente virtualenv/conda (que atualmente adiciona um `python`, não importa se ele aponta pro `python3` ou `python2`). Este tem efeito de lado, se você tenha um sistema com Python 2 instalado, pode ser usado antes de qualquer Python 3 (pelo menos nas Distros Linux que sempre fazem um symlink `/usr/bin/python` para Python 2). Se você não trabalha mais com Python 2, mas não pode remover do sistema o Python 2, alterando este para `"python3"` vai esconder qualquer versão de Python 2, veja o exemplo abaixo. +The default values and order for `python_binary` was chosen to first identify the Python version in a virtualenv/conda environments (which currently still add a `python`, no matter if it points to `python3` or `python2`). This has the side effect that if you still have a system Python 2 installed, it may be picked up before any Python 3 (at least on Linux Distros that always symlink `/usr/bin/python` to Python 2). If you do not work with Python 2 anymore but cannot remove the system Python 2, changing this to `"python3"` will hide any Python version 2, see example below. ::: ### Variáveis -| Variável | Exemplo | Descrição | -| ------------ | --------------- | --------------------------------------- | -| version | `"v3.8.1"` | A versão do `python` | -| symbol | `"🐍 "` | Espelha o valor da opção `símbolo` | -| style | `"yellow bold"` | Espelha o valor da opção `style` | -| pyenv_prefix | `"pyenv "` | Espelha o valor da opção `pyenv_prefix` | -| virtualenv | `"venv"` | O nome atual do `virtualenv` | +| Variável | Exemplo | Descrição | +| ------------ | --------------- | ------------------------------------------ | +| version | `"v3.8.1"` | The version of `python` | +| symbol | `"🐍 "` | Espelha o valor da opção `símbolo` | +| style | `"yellow bold"` | Espelha o valor da opção `style` | +| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `"venv"` | The current `virtualenv` name | ### Exemplo @@ -2501,7 +2533,7 @@ pyenv_version_name = true # ~/.config/starship.toml [python] -# Use apenas o binário `python3` para obter a versão. +# Only use the `python3` binary to get the version. python_binary = "python3" ``` @@ -2509,7 +2541,7 @@ python_binary = "python3" # ~/.config/starship.toml [python] -# Não acione para arquivos com a extensão py +# Don't trigger for files with the py extension detect_extensions = [] ``` @@ -2517,16 +2549,16 @@ detect_extensions = [] # ~/.config/starship.toml [python] -# Exibe a versão do python de dentro de um venv local. +# Display the version of python from inside a local venv. # -# Note que isso só funcionará quando o venv estiver dentro do projeto e só -# funcionará apenas no diretório que contém o diretório venv, mas talvez isso seja ok? +# Note this will only work when the venv is inside the project and it will only +# work in the directory that contains the venv dir but maybe this is ok? python_binary = ["./venv/bin/python", "python", "python3", "python2"] ``` ## R -O módulo `rlang` mostra a versão atualmente instalada do [R](https://www.r-project.org/). O módulo será mostrado se qualquer uma das seguintes condições for atendida: +The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if any of the following conditions are met: - O diretório atual tenha um arquivo com a extensão `.R`. - O diretório atual tenha um arquivo com a extensão `.Rd`. @@ -2542,18 +2574,18 @@ O módulo `rlang` mostra a versão atualmente instalada do [R](https://www.r-pro | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | Uma string que representa o simbolo do R. | +| `symbol` | `"📐"` | A format string representing the symbol of R. | | `style` | `"blue bold"` | O estilo do módulo. | | `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Quais extensões devem acionar este módulo | | `detect_files` | `[".Rprofile"]` | [] | | `detect_folders` | `[".Rproj.user"]` | Quais pastas devem ativar este módulo | -| `disabled` | `false` | Desabilita o módulo `r`. | +| `disabled` | `false` | Disables the `r` module. | ### Variáveis | Variável | Exemplo | Descrição | | -------- | ------------- | ---------------------------------- | -| version | `v4.0.5` | A versão do `R` | +| version | `v4.0.5` | The version of `R` | | symbol | | Espelha o valor da opção `símbolo` | | style | `"blue bold"` | Espelha o valor da opção `style` | @@ -2563,12 +2595,12 @@ O módulo `rlang` mostra a versão atualmente instalada do [R](https://www.r-pro # ~/.config/starship.toml [rlang] -format = "com [📐 $version](blue bold) " +format = "with [📐 $version](blue bold) " ``` ## Red -Por padrão o módulo `red` exibe a versão atual instalada do [Red](https://www.red-lang.org/). O módulo vai exibir se algumas das condições a seguir for atendida: +By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met: - O diretório atual contenha um arquivo com a extensão `.red` or `.reds` @@ -2578,22 +2610,22 @@ Por padrão o módulo `red` exibe a versão atual instalada do [Red](https://www | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | Uma string que representa o simbolo do Red. | +| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | | `detect_extensions` | `["red"]` | 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` | `"red bold"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `red`. | +| `disabled` | `false` | Disables the `red` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------- | ---------------------------------- | -| version | `v2.5.1` | A versão do `red` | +| version | `v2.5.1` | The version of `red` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2606,14 +2638,14 @@ symbol = "🔴 " ## Ruby -Por padrão o módulo `ruby` vai exibir a versão atual instalada do [Ruby](https://www.ruby-lang.org/). O módulo vai exibir se algumas das condições a seguir for atendida: +By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met: - O diretório atual tenha um arquivo `Gemfile` - O diretório atual contém um arquivo `.ruby-version` - O diretório atual contem um arquivo `.rb` - As variáveis de ambiente `RUBY_VERSION` ou `RBENV_VERSION` estão definidas -O Starship pega a versão atual do Ruby rodando `ruby -v`. +Starship gets the current Ruby version by running `ruby -v`. ### Opções @@ -2621,23 +2653,23 @@ O Starship pega a versão atual do Ruby rodando `ruby -v`. | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | Uma string que representa o simbolo do Ruby. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | | `detect_extensions` | `["rb"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["Gemfile", ".ruby-version"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Quais variáveis de ambiente devem ativar este módulo. | +| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | | `style` | `"bold red"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `ruby`. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------- | ---------------------------------- | -| version | `v2.5.1` | A versão do `ruby` | +| version | `v2.5.1` | The version of `ruby` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2650,7 +2682,7 @@ symbol = "🔺 " ## Rust -Por padrão o módulo `rust` vai exibir a versão atual instalada do [Rust](https://www.rust-lang.org/). O módulo vai exibir se algumas das condições a seguir for atendida: +By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met: - O diretório atual contem um arquivo `Cargo.toml` - O diretório atual tenha um arquivo com a extensão `.rs` @@ -2661,22 +2693,22 @@ Por padrão o módulo `rust` vai exibir a versão atual instalada do [Rust](http | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | Uma string que representa o simbolo do Rust | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | | `detect_extensions` | `["rs"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["Cargo.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` | Desabilita o módulo `rust`. | +| `disabled` | `false` | Disables the `rust` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | ----------------- | ---------------------------------- | -| version | `v1.43.0-nightly` | A versão do `rustc` | +| version | `v1.43.0-nightly` | The version of `rustc` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2689,7 +2721,7 @@ format = "via [⚙️ $version](red bold)" ## Scala -O módulo `scala` exibe a versão atual instalada do [Scala](https://www.scala-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `scala` module shows the currently installed version of [Scala](https://www.scala-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `build.sbt`, `.scalaenv` ou `.sbtenv` - O diretório atual tenha um arquivo com a extensão `.scala` ou `.sbt` @@ -2703,20 +2735,20 @@ O módulo `scala` exibe a versão atual instalada do [Scala](https://www.scala-l | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | | `detect_extensions` | `["sbt", "scala"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Quais nomes de arquivos devem ativar este módulo. | -| `detect_folders` | `[".metals"]` | Quais pastas devem ativar este módulo. | -| `symbol` | `"🆂 "` | Uma string que representa o simbolo do Scala. | +| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | +| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | | `style` | `"red dimmed"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `scala`. | +| `disabled` | `false` | Disables the `scala` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------- | ---------------------------------- | -| version | `2.13.5` | A versão do `scala` | +| version | `2.13.5` | The version of `scala` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2729,41 +2761,41 @@ symbol = "🌟 " ## Shell -O módulo de `shell` exibe um indicador para o shell que esta sendo usado. +The `shell` module shows an indicator for currently used shell. -::: dica +::: tip -Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para `false` no seu arquivo de configuração. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Opções -| Opções | Padrão | Descrição | -| ---------------------- | ------------------------- | ------------------------------------------------------- | -| `bash_indicator` | `bsh` | Uma string para representar o bash. | -| `fish_indicator` | `fsh` | Uma string usada para representar o fish. | -| `zsh_indicator` | `zsh` | Uma string usada para representar o zsh. | -| `powershell_indicator` | `psh` | Uma string usada para representar o powershell. | -| `ion_indicator` | `ion` | Uma string usada para representar o ion. | -| `elvish_indicator` | `esh` | Uma string usada para representar o elvish. | -| `tcsh_indicator` | `tsh` | Uma string usada para representar o tcsh. | -| `xonsh_indicator` | `xsh` | Uma string usada para representar o xonsh. | -| `cmd_indicator` | `cmd` | A format string used to represent cmd. | -| `nu_indicator` | `nu` | Uma string usada para representar o nu. | -| `unknown_indicator` | | Valor padrão para exibir quando o shell é desconhecido. | -| `format` | `"[$indicator]($style) "` | O formato do módulo. | -| `style` | `"white bold"` | O estilo do módulo. | -| `disabled` | `true` | Desabilita o módulo `shell`. | +| Opções | Padrão | Descrição | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `cmd_indicator` | `cmd` | A format string used to represent cmd. | +| `nu_indicator` | `nu` | A format string used to represent nu. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | O formato do módulo. | +| `style` | `"white bold"` | O estilo do módulo. | +| `disabled` | `true` | Disables the `shell` module. | ### Variáveis -| Variável | Padrão | Descrição | -| --------- | ------ | ------------------------------------------------------------- | -| indicator | | Espelha o valor do `indicator` para o shell usado atualmente. | -| style\* | | Espelha o valor da opção `style`. | +| Variável | Padrão | Descrição | +| --------- | ------ | ---------------------------------------------------------- | +| indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplos @@ -2780,28 +2812,28 @@ disabled = false ## SHLVL -O módulo `shlvl` exibe o atual [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") variável de ambiente, se estiver definido um número e coincidir ou exceder o limite especificado. +The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. ### Opções -| Opções | Padrão | Descrição | -| ----------- | ---------------------------- | ----------------------------------------------------------------- | -| `threshold` | `2` | Limite de exibição. | -| `format` | `"[$symbol$shlvl]($style) "` | O formato do módulo. | -| `symbol` | `"↕️ "` | O simbolo usado para representar o `SHLVL`. | -| `repeat` | `false` | Caso o `symbol` deva se repetir de acordo com o total do `SHLVL`. | -| `style` | `"bold yellow"` | O estilo do módulo. | -| `disabled` | `true` | Desabilita o módulo `shlvl`. | +| Opções | Padrão | Descrição | +| ----------- | ---------------------------- | ------------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | O formato do módulo. | +| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. | +| `style` | `"bold yellow"` | O estilo do módulo. | +| `disabled` | `true` | Disables the `shlvl` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | ------- | ---------------------------------- | -| shlvl | `3` | O valor atual do `SHLVL` | +| shlvl | `3` | The current value of `SHLVL` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2816,26 +2848,26 @@ threshold = 3 ## Singularidade -O módulo `singularity` exibe a imagem atual do [Singularity](https://sylabs.io/singularity/), se dentro de um contêiner e definido `$SINGULARITY_NAME`. +The `singularity` module shows the current [Singularity](https://sylabs.io/singularity/) image, if inside a container and `$SINGULARITY_NAME` is set. ### Opções -| Opções | Padrão | Descrição | -| ---------- | -------------------------------- | ------------------------------------------- | -| `format` | `'[$symbol\[$env\]]($style) '` | O formato do módulo. | -| `symbol` | `""` | Uma string exibida antes do nome da imagem. | -| `style` | `"bold dimmed blue"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `singularity`. | +| Opções | Padrão | Descrição | +| ---------- | -------------------------------- | ------------------------------------------------ | +| `format` | `'[$symbol\[$env\]]($style) '` | O formato do módulo. | +| `symbol` | `""` | A format string displayed before the image name. | +| `style` | `"bold dimmed blue"` | O estilo do módulo. | +| `disabled` | `false` | Disables the `singularity` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | ------------ | ---------------------------------- | -| env | `centos.img` | A imagem atual do Singularity | +| env | `centos.img` | The current Singularity image | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2848,51 +2880,51 @@ format = '[📦 \[$env\]]($style) ' ## Status -O módulo `status` exibe o código de saída do comando anterior. O módulo será exibido apenas se o código de saída não for `0`. The status code will cast to a signed 32-bit integer. +The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer. -::: dica +::: tip -Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para `false` no seu arquivo de configuração. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: -::: warning Este módulo não é suportado pelo nu shell. ::: +::: warning This module is not supported on nu shell. ::: ### Opções | Opções | Padrão | Descrição | | ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | O formato do módulo | -| `symbol` | `"✖"` | O simbolo exibido no erro de programa | -| `success_symbol` | `"✔️"` | O simbolo exibido no sucesso de programa | -| `not_executable_symbol` | `"🚫"` | O simbolo exibido quando o arquivo não é executável | -| `not_found_symbol` | `"🔍"` | O simbolo exibido quando o comando não é encontrado | -| `sigint_symbol` | `"🧱"` | O simbolo exibido no SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | O simbolo exibido em qualquer sinal | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `success_symbol` | `"✔️"` | The symbol displayed on program success | +| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | +| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | +| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | | `style` | `"bold red"` | O estilo do módulo. | -| `recognize_signal_code` | `true` | Habilita o mapeamento de sinais para códigos de saída | -| `map_symbol` | `false` | Habilita o mapeamento de símbolos para códigos de saída | -| `pipestatus` | `false` | Habilita o relatório de pipestatus | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `pipestatus` | `false` | Enable pipestatus reporting | | `pipestatus_separator` | `|` | | -| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | O formato do módulo quando o comando é um pipeline | -| `disabled` | `true` | Desabilita o módulo `status`. | +| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | +| `disabled` | `true` | Disables the `status` module. | ### Variáveis -| Variável | Exemplo | Descrição | -| -------------- | ------- | -------------------------------------------------------------------------------------------------------- | -| status | `127` | O codígo de saída do último comando | -| hex_status | `0x7F` | O codígo de saída do último comando em hex | -| int | `127` | O codígo de saída do último comando | -| common_meaning | `ERROR` | Significa que o código não é um sinal | -| signal_number | `9` | Número do sinal correspondente ao código de saída, apenas se sinalizado | -| signal_name | `KILL` | Nome do sinal correspondente ao código de saída, apenas se for sinalizado | -| maybe_int | `7` | Contém o código de saída quando nenhum significado for encontrado | -| pipestatus | | Exibição do pipeline de programas com os códigos de saída, este é apenas disponível no pipestatus_format | -| symbol | | Espelha o valor da opção `símbolo` | -| style\* | | Espelha o valor da opção `style` | +| Variável | Exemplo | Descrição | +| -------------- | ------- | ------------------------------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| hex_status | `0x7F` | The exit code of the last command in hex | +| int | `127` | The exit code of the last command | +| common_meaning | `ERROR` | Meaning of the code if not a signal | +| signal_number | `9` | Signal number corresponding to the exit code, only if signalled | +| signal_name | `KILL` | Name of the signal corresponding to the exit code, only if signalled | +| maybe_int | `7` | Contains the exit code number when no meaning has been found | +| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format | +| symbol | | Espelha o valor da opção `símbolo` | +| style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2909,23 +2941,23 @@ disabled = false ## Sudo -O módulo `sudo` é exibido se uma credencial sudo estiver em cache. O módulo vai ser exibido somente se as credenciais estiverem em cache. +The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. -::: dica +::: tip -Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para `false` no seu arquivo de configuração. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Opções -| Opções | Padrão | Descrição | -| --------------- | ----------------------- | -------------------------------------------------------------------------- | -| `format` | `[as $symbol]($style)"` | O formato do módulo | -| `symbol` | `"🧙 "` | O simbolo exibido quando as credenciais estão em cache | -| `style` | `"bold blue"` | O estilo do módulo. | -| `allow_windows` | `false` | Desde que o Windows não tem um padrão sudo, o valor padrão é desabilitado. | -| `disabled` | `true` | Desabilita o módulo `sudo`. | +| Opções | Padrão | Descrição | +| --------------- | ----------------------- | ------------------------------------------------------- | +| `format` | `[as $symbol]($style)"` | The format of the module | +| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached | +| `style` | `"bold blue"` | O estilo do módulo. | +| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | +| `disabled` | `true` | Disables the `sudo` module. | ### Variáveis @@ -2934,7 +2966,7 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2948,7 +2980,7 @@ disabled = false ``` ```toml -# No windows +# On windows # $HOME\.starship\config.toml [sudo] @@ -2958,7 +2990,7 @@ disabled = false ## Swift -Por padrão o módulo `swift` vai exibir a versão atual instalada do [Swift](https://swift.org/). O módulo vai exibir se algumas das condições a seguir for atendida: +By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met: - O diretório atual tenha um arquivo `Package.swift` - O diretório atual tenha um arquivo com a extensão `.swift` @@ -2969,22 +3001,22 @@ Por padrão o módulo `swift` vai exibir a versão atual instalada do [Swift](ht | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | Uma string que representa o simbolo do Swift | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | | `detect_extensions` | `["swift"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["Package.swift"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | | `style` | `"bold 202"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `swift`. | +| `disabled` | `false` | Disables the `swift` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------- | ---------------------------------- | -| version | `v5.2.4` | A versão do `swift` | +| version | `v5.2.4` | The version of `swift` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -2997,11 +3029,11 @@ format = "via [🏎 $version](red bold)" ## Terraform -O módulo `terraform` exibe o [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) selecionado e sua versão. +The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. -::: dica +::: tip -Por padrão a versão do Terraform não é exibida, desde que é lento recuperar a versão atual quando muitos plugins estão em uso. Se você deseja habilitar,, [Siga o exemplo abaixo](#with-terraform-version). +By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). ::: @@ -3014,29 +3046,29 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: | Opções | Padrão | Descrição | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol$workspace]($style) "` | A string de formato do módulo. | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | Uma string que é exibida antes do workspace terraform. | +| `symbol` | `"💠"` | A format string shown before the terraform workspace. | | `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[".terraform"]` | Quais pastas devem ativar este módulo. | | `style` | `"bold 105"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `terraform`. | +| `disabled` | `false` | Disables the `terraform` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | ---------- | ---------------------------------- | -| version | `v0.12.24` | A versão do `terraform` | -| workspace | `default` | O workspace atual do Terraform | +| version | `v0.12.24` | The version of `terraform` | +| workspace | `default` | The current Terraform workspace | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo -#### Com a versão do Terraform +#### With Terraform Version ```toml # ~/.config/starship.toml @@ -3045,7 +3077,7 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: format = "[🏎💨 $version$workspace]($style) " ``` -#### Sem a versão do Terraform +#### Without Terraform version ```toml # ~/.config/starship.toml @@ -3056,36 +3088,36 @@ format = "[🏎💨 $workspace]($style) " ## Horário -O módulo `time` exibe a hora **local** atual. A configuração de `format` é usada pelo [`chrono`](https://crates.io/crates/chrono) para controlar qual hora é exibida. Dê uma olhada na [documentação do chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) para ver quais opções estão disponíveis. +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. -::: dica +::: tip -Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para `false` no seu arquivo de configuração. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Opções -| Opções | Padrão | Descrição | -| ----------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | A string de formato do módulo. | -| `use_12hr` | `false` | Habilita a formatação de 12 horas | -| `time_format` | veja abaixo | A string [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) usada para formatar a hora. | -| `style` | `"bold yellow"` | O estilo do módulo time | -| `utc_time_offset` | `"local"` | Define o UTC a ser usado. Intervalo de -24 < x < 24. Aceita floats para acomodar timezones 30/45. | -| `disabled` | `true` | Desabilita o módulo `time`. | -| `time_range` | `"-"` | Define o intervalo de tempo o qual o módulo será exibido. O horário deve ser especificado no formato de 24-hours | +| Opções | Padrão | Descrição | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -Se `use_12hr` é `true`, então `time_format` tem o padrão `"%r"`. Caso contrário, o padrão é `"%T"`. Ajustes manuais no `time_format` irão sobrescrever a configuração `use_12hr`. +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. ### Variáveis | Variável | Exemplo | Descrição | | --------- | ---------- | -------------------------------- | -| time | `13:08:10` | A hora atual. | +| time | `13:08:10` | The current time. | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -3102,35 +3134,35 @@ time_range = "10:00:00-14:00:00" ## Nome do usuário -O módulo `username` mostra o nome de usuário do usuário ativo. O módulo será mostrado se alguma das seguintes condições for atendida: +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: - O usuário atual é root - O usuário atual não é o mesmo que está logado - O usuário atual esta conectado em uma sessão SSH - A variável `show_always` esta definida como true -::: dica +::: tip -Conexões SSH são detectadas checando as variáveis de ambiente `SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. Se seu host SSH não tem estas variáveis configuradas, uma alternativa é definir uma delas com valor burro. +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. ::: ### Opções -| Opções | Padrão | Descrição | -| ------------- | ----------------------- | --------------------------------------- | -| `style_root` | `"bold red"` | O estilo usado quando o usuário é root. | -| `style_user` | `"bold yellow"` | O estilo usado para usuários não root. | -| `format` | `"[$user]($style) in "` | O formato do módulo. | -| `show_always` | `false` | Sempre exibe o módulo `username`. | -| `disabled` | `false` | Desabilita o módulo `username`. | +| Opções | Padrão | Descrição | +| ------------- | ----------------------- | ------------------------------------- | +| `style_root` | `"bold red"` | The style used when the user is root. | +| `style_user` | `"bold yellow"` | The style used for non-root users. | +| `format` | `"[$user]($style) in "` | O formato do módulo. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | ### Variáveis -| Variável | Exemplo | Descrição | -| -------- | ------------ | -------------------------------------------------------------------------------------- | -| `style` | `"red bold"` | Espelha o valor da opção `style_root` quando o root esta logado e `style_user` se não. | -| `user` | `"fulano"` | O ID do usuário logado atualmente. | +| Variável | Exemplo | Descrição | +| -------- | ------------ | ------------------------------------------------------------------------------------------- | +| `style` | `"red bold"` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | +| `user` | `"matchai"` | The currently logged-in user ID. | ### Exemplo @@ -3147,7 +3179,7 @@ show_always = true ## Vagrant -O módulo `vagrant` exibe a versão atual instalada do [Vagrant](https://www.vagrantup.com/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `vagrant` module shows the currently installed version of [Vagrant](https://www.vagrantup.com/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual contem um arquivo `Vagrantfile` @@ -3157,22 +3189,22 @@ O módulo `vagrant` exibe a versão atual instalada do [Vagrant](https://www.vag | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | Um formato de string que representa o simbolo do Vagrant. | +| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["Vagrantfile"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | | `style` | `"cyan bold"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `vagrant`. | +| `disabled` | `false` | Disables the `vagrant` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | ---------------- | ---------------------------------- | -| version | `Vagrant 2.2.10` | A versão do `Vagrant` | +| version | `Vagrant 2.2.10` | The version of `Vagrant` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -3185,7 +3217,7 @@ format = "via [⍱ $version](bold white) " ## V -O módulo `vlang` exibe a versão atual instalada do [V](https://vlang.io/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +The `vlang` module shows you your currently installed version of [V](https://vlang.io/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - O diretório atual cotem qualquer arquivo com a extensão `.v` - O diretório atual contem um arquivo `v.mod`, `vpkg.json` ou `.vpkg-lock.json` @@ -3196,18 +3228,18 @@ O módulo `vlang` exibe a versão atual instalada do [V](https://vlang.io/). Por | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | Um formato de string que representa o simbolo do V | +| `symbol` | `"V "` | A format string representing the symbol of V | | `detect_extensions` | `["v"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | | `style` | `"blue bold"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `vlang`. | +| `disabled` | `false` | Disables the `vlang` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | ------- | ---------------------------------- | -| version | `v0.2` | A versão do `v` | +| version | `v0.2` | The version of `v` | | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | @@ -3221,26 +3253,26 @@ format = "via [V $version](blue bold) " ## VCSH -O módulo `vcsh` exibe o repositório [VCSH](https://github.com/RichiH/vcsh) atual ativo. O módulo vai ser exibido apenas se um repositório estiver em uso. +The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use. ### Opções | Opções | Padrão | Descrição | | ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | O simbolo usado antes de exibir o nome do repositório. | +| `symbol` | | The symbol used before displaying the repository name. | | `style` | `"bold yellow"` | O estilo do módulo. | | `format` | `"vcsh [$symbol$repo]($style) "` | O formato do módulo. | -| `disabled` | `false` | Desabilita o módulo `vcsh`. | +| `disabled` | `false` | Disables the `vcsh` module. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | ------------------------------------------- | ---------------------------------- | -| repo | `dotfiles` if in a VCSH repo named dotfiles | O nome do repositório ativo | +| repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name | | symbol | | Espelha o valor da opção `símbolo` | | style\* | `black bold dimmed` | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -3253,7 +3285,7 @@ format = "[🆅 $repo](bold blue) " ## Zig -Por padrão, o módulo `zig` mostra a versão atualmente instalada do [Zig](https://ziglang.org/). O módulo será mostrado se alguma das seguintes condições for atendida: +By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met: - O diretório atual contém arquivo com a extensão `.zig` @@ -3263,22 +3295,22 @@ Por padrão, o módulo `zig` mostra a versão atualmente instalada do [Zig](http | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | O símbolo usado antes de exibir a versão do Zig. | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | | `style` | `"bold yellow"` | O estilo do módulo. | -| `disabled` | `false` | Desabilita o módulo `zig`. | +| `disabled` | `false` | Disables the `zig` module. | | `detect_extensions` | `["zig"]` | 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. | ### Variáveis -| Variável | Exemplo | Descrição | -| --------- | -------- | --------------------------------- | -| version | `v0.6.0` | A versão do `zig` | -| symbol | | Espelha o valor da opção `symbol` | -| style\* | | Espelha o valor da opção `style` | +| Variável | Exemplo | Descrição | +| --------- | -------- | ---------------------------------- | +| version | `v0.6.0` | The version of `zig` | +| symbol | | Espelha o valor da opção `símbolo` | +| style\* | | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string ### Exemplo @@ -3291,9 +3323,9 @@ symbol = "⚡️ " ## Comandos Personalizados -Os módulos `custom` mostram a saída de alguns comandos arbitrários. +The `custom` modules show the output of some arbitrary commands. -Esses módulos serão mostrados se alguma das seguintes condições for atendida: +These modules will be shown if any of the following conditions are met: - O diretório atual tenha um arquivo cujo o nome esta em `files` - O diretório atual tenha um diretório cujo o nome esta em `directories` @@ -3301,85 +3333,85 @@ Esses módulos serão mostrados se alguma das seguintes condições for atendida - O comando `when` retorna 0 - O sistema operacional (std::env::consts::OS) corresponde com o `os` se definido. -::: dica +::: tip -Vários módulos personalizados podem ser definidos usando um `.`. +Multiple custom modules can be defined by using a `.`. ::: -::: dica +::: tip -A ordem na qual os módulos personalizados são mostrados pode ser definida individualmente incluindo `${custom.foo}` no `format` de nível superior (como inclui um ponto, você precisa usar `${...}`). Por padrão, o módulo `custom` mostrará todos os módulos personalizados na ordem em que eles foram definidos. +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. ::: -::: dica +::: tip -A [Issue #1252](https://github.com/starship/starship/discussions/1252) contém exemplos de módulos personalizados. Se você tem um exemplo interessante que não esta coberto lá, sinta-se livre para compartilha-lo! +[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! ::: -::: warning A saída do comando é exibido unescaped no prompt +::: warning Command output is printed unescaped to the prompt -Seja qual for a saída o comando irá gerar uma saída sem modificações no prompt. Isto siguinifica que a saída tenha sequencias especiais estas serão interpretadas pelo seu shell, elas serão expandidas quando exibidas. Estas sequencias especiais são especificas da shell, ex: você pode escrever um módulo de comando que escreve uma sequencia de bash, ex:. `\h`, mas este módulo não irá funcionar no shell fish ou zsh. +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. -Strings de formatação também podem conter sequencias de prompt especificas de shell, ex: [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). ::: ### Opções -| Opções | Padrão | Descrição | -| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | `""` | O comando cuja a saída deve ser exibida. O comando será passado no stdin para o shell. | -| `when` | | Um comando de shell usado como condição para exibir o módulo. O módulo será exibido se o comando retornar `0` como código de status. | -| `shell` | | [Veja abaixo](#custom-command-shell) | -| `description` | `""` | A descrição do módulo, isto será exibido quando executar `starship explain`. | -| `files` | `[]` | Os arquivos que serão buscados por correspondência no diretório atual. | -| `directories` | `[]` | Os diretórios que serão buscados por correspondência no diretório atual. | -| `extensions` | `[]` | As extensões que serão buscadas por correspondência no diretório atual. | -| `symbol` | `""` | O simbolo usado antes de exibir a saída do comando. | -| `style` | `"bold green"` | O estilo do módulo. | -| `format` | `"[$symbol($output )]($style)"` | O formato do módulo. | -| `disabled` | `false` | Desabilita este módulo `custom`. | -| `os` | | Nome do sistema operacional onde módulo sera exibido (unix, linux, macos, windows, ... ) [Veja os possíveis valores](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | +| Opções | Padrão | Descrição | +| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `command` | `""` | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. | +| `shell` | | [See below](#custom-command-shell) | +| `description` | `""` | The description of the module that is shown when running `starship explain`. | +| `files` | `[]` | The files that will be searched in the working directory for a match. | +| `directories` | `[]` | The directories that will be searched in the working directory for a match. | +| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | +| `symbol` | `""` | The symbol used before displaying the command output. | +| `style` | `"bold green"` | O estilo do módulo. | +| `format` | `"[$symbol($output )]($style)"` | O formato do módulo. | +| `disabled` | `false` | Disables this `custom` module. | +| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | ### Variáveis -| Variável | Descrição | -| --------- | ---------------------------------- | -| output | A saída do comando no `shell` | -| symbol | Espelha o valor da opção `símbolo` | -| style\* | Espelha o valor da opção `style` | +| Variável | Descrição | +| --------- | -------------------------------------- | +| output | The output of shell command in `shell` | +| symbol | Espelha o valor da opção `símbolo` | +| style\* | Espelha o valor da opção `style` | -*: Esta variável só pode ser usada como parte de uma string de estilo +*: This variable can only be used as a part of a style string -#### Comandos personalizados de shell +#### Custom command shell -`shell` aceita uma lista não vazia de string, onde: +`shell` accepts a non-empty list of strings, where: - A primeira string é o caminho para o shell que executará o comando. - Outros argumentos que serão passados para o shell. -Se não definido, ele retornará para o STARSHIP_SHELl e então para o "sh" no Linux e "cmd/C" no Windows. +If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows. -O `command` será passado no stdin. +The `command` will be passed in on stdin. -Se o `shell` não for dado ou apenas conter um elemento e o Starship detectar PowerShell ele será usado, os seguintes argumentos serão automaticamente adicionados: `-NoProfile -Command -`. Este comportamento pode ser evitado passando explicitamente argumento para o shell, ex. +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 -`. This behavior can be avoided by explicitly passing arguments to the shell, e.g. ```toml shell = ["pwsh", "-Command", "-"] ``` -::: warning Tenha certeza que tenha uma configuração de shell +::: warning Make sure your custom shell configuration exits gracefully -Se você definir um comando personalizado, tenha certeza que o shell padrão usado pelo starship execute este comando com uma saída graciosa (via the `shell` option). +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). -Por exemplo, PowerShell requer o parâmetro `-Command` para executar um liner. Omitindo este parâmetro pode ser que o starship entre em um loop recursivo, onde o shell tente carrega um ambiente completo de perfil com o próprio starship novamente e portanto execute novamente o comando, entrando em um loop sem fim. +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. -Parâmetros similares ao `-NoProfile` no PowerShell são recomendados para outras shells, bem como para evitar um tempo de carregamento maior toda vez que o starship for chamado. +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. -Detecção automática de shell e adição de parâmetros estão sendo implementados atualmente, mas é possível que nem todas as shells sejam cobertas. [Por favor abra uma issue](https://github.com/starship/starship/issues/new/choose) com detalhes do shell e configurações do starship se você acertar algum cenário. +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. ::: diff --git a/docs/pt-BR/installing/README.md b/docs/pt-BR/installing/README.md index 10f63d155..8edb6a3f6 100644 --- a/docs/pt-BR/installing/README.md +++ b/docs/pt-BR/installing/README.md @@ -63,7 +63,6 @@ Ative o modulo `programs.starship` em seu arquivo `home.nix`, e adicione suas co { programs.starship = { enable = true; - enableZshIntegration = true; # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/pt-PT/config/README.md b/docs/pt-PT/config/README.md index 9c4407f49..76666094f 100644 --- a/docs/pt-PT/config/README.md +++ b/docs/pt-PT/config/README.md @@ -261,7 +261,9 @@ format = "$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. 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. @@ -795,19 +797,20 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Options -| Option | Default | Description | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | -| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | -| `style` | `"bold cyan"` | The style for the module. | -| `disabled` | `false` | Disables the `directory` module. | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
This module has a few advanced configuration options that control how the directory is displayed. @@ -839,6 +842,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an *: This variable can only be used as a part of a style string +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Variable | Example | Description | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Mirrors the value of option `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
+ ### Example ```toml @@ -1159,13 +1177,14 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud ### Options -| Option | Default | Description | -| ---------------- | ---------------------------------------------------------- | --------------------------------------------------------------- | -| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | -| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `gcloud` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------------------------------- | ---------------------------------------------------------------- | +| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | +| `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. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `gcloud` module. | ### Variables @@ -1214,6 +1233,17 @@ us-central1 = "uc1" asia-northeast1 = "an1" ``` +#### Display account and aliased project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' +[gcloud.project_aliases] +very-long-project-name = "vlpn" +``` + ## Git Branch The `git_branch` module shows the active branch of the repo in your current directory. @@ -1711,39 +1741,6 @@ The `julia` module shows the currently installed version of [Julia](https://juli symbol = "∴ " ``` -## localip - -The `localip` module shows the IPv4 address of the primary network interface. - -### Options - -| Option | Default | Description | -| ---------- | ------------------------- | ------------------------------------------------------ | -| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `true` | Disables the `localip` module. | - -### Variables - -| Variable | Example | Description | -| --------- | ------------ | ----------------------------------- | -| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | -| style\* | | Mirrors the value of option `style` | - -*: This variable can only be used as a part of a style string - -### Example - -```toml -# ~/.config/starship.toml - -[localip] -ssh_only = false -format = "@[$localipv4](bold red) " -disabled = false -``` - ## Kotlin The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: @@ -1793,7 +1790,7 @@ kotlin_binary = "kotlinc" ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. 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 @@ -1815,8 +1812,10 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Variable | Example | Description | | --------- | -------------------- | ---------------------------------------- | -| context | `starship-cluster` | The current kubernetes context | +| context | `starship-context` | The current kubernetes context name | | namespace | `starship-namespace` | If set, the current kubernetes namespace | +| user | `starship-user` | If set, the current kubernetes user | +| cluster | `starship-cluster` | If set, the current kubernetes cluster | | symbol | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | @@ -1828,12 +1827,12 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [kubernetes] -format = 'on [⛵ $context \($namespace\)](dimmed green) ' +format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false [kubernetes.context_aliases] "dev.local.cluster.k8s" = "dev" ".*/openshift-cluster/.*" = "openshift" -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,12 +1848,12 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` ## Line Break @@ -1876,6 +1875,39 @@ The `line_break` module separates the prompt into two lines. disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Options + +| Option | Default | Description | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `localip` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ----------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). By default the module will be shown if any of the following conditions are met: diff --git a/docs/pt-PT/installing/README.md b/docs/pt-PT/installing/README.md index 305af749d..85a4f4467 100644 --- a/docs/pt-PT/installing/README.md +++ b/docs/pt-PT/installing/README.md @@ -63,7 +63,6 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett { programs.starship = { enable = true; - enableZshIntegration = true; # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/ru-RU/config/README.md b/docs/ru-RU/config/README.md index 9ce3bd235..d893358fb 100644 --- a/docs/ru-RU/config/README.md +++ b/docs/ru-RU/config/README.md @@ -261,7 +261,9 @@ format = "$all$directory$character" ## AWS -Модуль `aws` показывает текущий регион и профиль AWS. Основано на `AWS_REGION`, `AWS_DEFAULT_REGION`, и `AWS_PROFILE` переменных окружения и файле`~/.aws/config`. This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. Основано на `AWS_REGION`, `AWS_DEFAULT_REGION`, и `AWS_PROFILE` переменных окружения и файле`~/.aws/config`. This module also shows an expiration timer when using temporary credentials. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. 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. @@ -290,7 +292,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Примеры @@ -360,7 +362,7 @@ style = "blue bold" ## Батарея -Модуль `battery` показывает насколько заряжена батарея девайса и статус зарядки на данный момент. Модуль виден только, если заряд батареи устройства меньше 10%. +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%. ### Опции @@ -388,7 +390,7 @@ discharging_symbol = "💀 " ### Отображение батареи -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). Если `display` не предоставлено. Значение по умолчанию: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. Значение по умолчанию: ```toml [[battery.display]] @@ -400,7 +402,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### Опции -Опция `display` представляет собой массив следующей таблицы. +The `display` option is an array of the following table. | Параметр | По умолчанию | Описание | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | @@ -426,9 +428,9 @@ discharging_symbol = "💦" ## Символ -Модуль `character` показывает символ (обычно, стрелка) рядом с вводимым текстом в терминале. +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -Символ показывает, была ли последняя команда успешной или нет. It can do this in two ways: +The character will tell you whether the last command was successful or not. It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -522,7 +524,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL @@ -552,19 +554,19 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ## Длительность команды -Модуль `cmd_duration` показывает время исполнения последней команды. Модуль будет показан только, если команда заняла более двух секунд, или если задан параметр `min_time`. +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. -::: предупреждение Не подключайте ловушку DEBUG к Bash +::: warning Do not hook the DEBUG trap in Bash -Если вы испоьзуете Starship в `bash`, не подключайте ловушку `DEBUG` после запуска `eval $(starship init $0)`, иначе этот модуль сломается. +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -Пользователи Bash, которым нужна функциональность, подобная preexec, могут использовать [фреймворк bash_preexec от rcaloras](https://github.com/rcaloras/bash-preexec). Просто определите массивы `preexec_functions` и `precmd_functions` перед запуском `eval $(starship init $0)`, а затем продолжайте нормально. +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### Опции @@ -586,7 +588,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | duration | `16m40s` | The time it took to execute the command | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -602,9 +604,9 @@ 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 Подсказка +::: tip -Это не подавляет модификатор командной строки самой conda. Возможно, вы захотите запустить `conda config --set changeps1 False`. +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. ::: @@ -627,7 +629,7 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -659,7 +661,7 @@ The `container` module displays a symbol and container name, if inside a contain | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -698,7 +700,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -738,7 +740,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -787,30 +789,31 @@ format = "via [🦕 $version](green bold) " ## Каталог -Модуль `directory` показывает путь к вашей текущей директории, усеченной до трех родительских папок. Ваш каталог также будет отсечен до корня git репозитория, в котором вы находитесь. +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. -При использовании стиля оболочки fish, вместо скрытия усеченного каталога, вы увидите укороченное имя каталога, зависимое от числа символов вы установите для этой опции. +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. -Например, возьмем `~/Dev/Nix/nixpkgs/pkgs` где `nixpkgs` является корневым репозиторием, и в опции установлено `1`. Вы увидите `~/D/N/nixpkgs/pkgs`, а до этого было бы `nixpkgs/pkgs`. +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. ### Опции -| Параметр | По умолчанию | Описание | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | Количество родительских папок, к которым должен быть усечен текущий каталог. | -| `truncate_to_repo` | `true` | Следует или нет обрезать до корня репозитория git, в котором вы находитесь. | -| `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. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Параметр | По умолчанию | Описание | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | Количество родительских папок, к которым должен быть усечен текущий каталог. | +| `truncate_to_repo` | `true` | Следует или нет обрезать до корня репозитория git, в котором вы находитесь. | +| `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. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
-Этот модуль имеет несколько расширенных опций конфигурации, которые контролируют отображение каталога. +This module has a few advanced configuration options that control how the directory is displayed. | Advanced Option | По умолчанию | Описание | | --------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -826,7 +829,7 @@ format = "via [🦕 $version](green bold) " "src/com/long/java/path" = "mypath" ``` -`fish_style_pwd_dir_length` взаимодействует со стандартными параметрами усечения, которые могут сначала показаться странными: если он не равен нулю, элементы пути, который обычно усекается, вместо этого отображаются с указанным количеством символов. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`. +`fish_style_pwd_dir_length` interacts with the standard truncation options in a way that can be surprising at first: if it's non-zero, the components of the path that would normally be truncated are instead displayed with that many characters. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
@@ -837,7 +840,22 @@ format = "via [🦕 $version](green bold) " | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string + +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Переменная | Пример | Описание | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Отражает значение параметра `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
### Пример @@ -874,7 +892,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -887,7 +905,7 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. Если SDK был закреплен в текущей директории, будет показана закрепленная версия. В противном случае модуль отображает последнюю установленную версию SDK. +The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: @@ -902,7 +920,7 @@ By default this module will only be shown in your prompt when one or more of the You'll also need the .NET Core SDK installed in order to use it correctly. -Внутренне этот модуль использует свой собственный механизм определения версий. Обычно он в два раза быстрее, чем `dotnet --version`, но он может показывать неправильную версию, если ваш .NET проект имеет необычный формат каталога. Если точность важнее, чем скорость, вы можете отключить механизм опцией `heuristic = false` в настройках модуля. +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. @@ -912,13 +930,13 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,23 +1848,23 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` -## Перевод Строки +## Line Break -Модуль `line_break` разделяет командную строку на две строки. +The `line_break` module separates the prompt into two lines. ### Опции -| Параметр | По умолчанию | Описание | -| ---------- | ------------ | ------------------------------------------------------------------------ | -| `disabled` | `false` | Отключает модуль `line_break`, отображая командную строку в одну строку. | +| Параметр | По умолчанию | Описание | +| ---------- | ------------ | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | ### Пример @@ -1876,6 +1875,39 @@ Long and automatically generated cluster names can be identified and shortened u disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Опции + +| Параметр | По умолчанию | Описание | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | Формат модуля. | +| `style` | `"bold yellow"` | Стиль модуля. | +| `disabled` | `true` | Disables the `localip` module. | + +### Переменные + +| Переменная | Пример | Описание | +| ---------- | ------------ | ----------------------------------- | +| 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 + +### Пример + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). By default the module will be shown if any of the following conditions are met: @@ -1906,7 +1938,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -1919,25 +1951,25 @@ format = "via [🌕 $version](bold blue) " ## Использование памяти -Модуль `memory_usage` отображает текущую системную память и использование подкачки. +The `memory_usage` module shows current system memory and swap usage. -По умолчанию использование подкачки отображается, если общая сумма подкачки системы не равна нулю. +By default the swap usage is displayed if the total system swap is non-zero. -::: tip Подсказка +::: tip -По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Опции -| Параметр | По умолчанию | Описание | -| ----------- | ----------------------------------------------- | ------------------------------------------------------------------ | -| `threshold` | `75` | Скрывать использование памяти, если она не превышает этот процент. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Формат модуля. | -| `symbol` | `"🐏"` | Символ, используемый перед отображением использования памяти. | -| `style` | `"bold dimmed white"` | Стиль модуля. | -| `disabled` | `true` | Отключает модуль `memory_usage`. | +| Параметр | По умолчанию | Описание | +| ----------- | ----------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Формат модуля. | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | Стиль модуля. | +| `disabled` | `true` | Disables the `memory_usage` module. | ### Переменные @@ -1966,18 +1998,18 @@ style = "bold dimmed green" ## Ветка Mercurial -Модуль `hg_branch` показывает активную ветку репозитория в вашем текущем каталоге. +The `hg_branch` module shows the active branch of the repo in your current directory. ### Опции -| Параметр | По умолчанию | Описание | -| ------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | -| `symbol` | `" "` | Символ, используемый перед закладкой hg или именем ветки репозитория в текущем каталоге. | -| `style` | `"bold purple"` | Стиль модуля. | -| `format` | `"on [$symbol$branch]($style) "` | Формат модуля. | -| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | Символ, используемый для обозначения усечения названия ветки. | -| `disabled` | `true` | Отключает модуль `hg_branch`. | +| Параметр | По умолчанию | Описание | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `"bold purple"` | Стиль модуля. | +| `format` | `"on [$symbol$branch]($style) "` | Формат модуля. | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | ### Переменные @@ -1987,7 +2019,7 @@ style = "bold dimmed green" | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2013,7 +2045,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Формат модуля | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | | `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | @@ -2030,7 +2062,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2044,7 +2076,7 @@ symbol = "🎣 " ## Nix-shell -The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. Модуль будет показываться внутри среды nix-shell. +The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. ### Опции @@ -2055,7 +2087,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | `style` | `"bold blue"` | Стиль модуля. | | `impure_msg` | `"impure"` | A format string shown when the shell is impure. | | `pure_msg` | `"pure"` | A format string shown when the shell is pure. | -| `disabled` | `false` | Отключает модуль `nix_shell`. | +| `disabled` | `false` | Disables the `nix_shell` module. | ### Переменные @@ -2066,7 +2098,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2102,7 +2134,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | | `style` | `"bold green"` | Стиль модуля. | -| `disabled` | `false` | Отключает модуль `nodejs`. | +| `disabled` | `false` | Disables the `nodejs` module. | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Переменные @@ -2113,7 +2145,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2160,7 +2192,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2193,7 +2225,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2208,7 +2240,7 @@ symbol = "☁️ " ## Версия пакета -Модуль `package` отображается, когда текущий каталог является репозиторием для пакета и показывает его текущую версию. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2234,11 +2266,11 @@ symbol = "☁️ " | Параметр | По умолчанию | Описание | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | | `format` | `"is [$symbol$version]($style) "` | Формат модуля. | -| `symbol` | `"📦 "` | Символ, используемый перед отображением версии пакета. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `"bold 208"` | Стиль модуля. | | `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | Отключает модуль `package`. | +| `disabled` | `false` | Disables the `package` module. | ### Переменные @@ -2248,7 +2280,7 @@ symbol = "☁️ " | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2313,12 +2345,12 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | Символ, используемый перед отображением версии PHP. | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | | `detect_extensions` | `["php"]` | Which extensions should trigger this module. | | `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `style` | `"147 bold"` | Стиль модуля. | -| `disabled` | `false` | Отключает модуль `php`. | +| `disabled` | `false` | Disables the `php` module. | ### Переменные @@ -2328,7 +2360,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2343,7 +2375,7 @@ format = "via [🔹 $version](147 bold) " The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version. -::: tip Подсказка +::: tip By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). @@ -2366,15 +2398,15 @@ By default the module will be shown if any of the following conditions are met: ### Переменные -| Переменная | Пример | Описание | -| ---------------- | ---------- | ------------------------------------ | -| version | `v0.12.24` | The version of `pulumi` | -| stack | `dev` | The current Pulumi stack | -| имя пользователя | `alice` | The current Pulumi username | -| symbol | | Отражает значение параметра `symbol` | -| style\* | | Отражает значение параметра `style` | +| Переменная | Пример | Описание | +| ---------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| username | `alice` | The current Pulumi username | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2424,7 +2456,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2461,7 +2493,7 @@ By default the module will be shown if any of the following conditions are met: | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"🐍 "` | A format string representing the symbol of Python | | `style` | `"yellow bold"` | Стиль модуля. | -| `pyenv_version_name` | `false` | Использовать pyenv для получения версии Python | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | | `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `["py"]` | Which extensions should trigger this module | @@ -2469,7 +2501,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 Подсказка +::: tip 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. @@ -2568,7 +2600,7 @@ format = "with [📐 $version](blue bold) " ## Red -By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). Модуль будет показан, если любое из следующих условий соблюдено: +By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met: - The current directory contains a file with `.red` or `.reds` extension @@ -2593,7 +2625,7 @@ By default the `red` module shows the currently installed version of [Red](https | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2606,7 +2638,7 @@ symbol = "🔴 " ## Ruby -By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). Модуль будет показан, если любое из следующих условий соблюдено: +By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met: - Текущий каталог содержит файл `Gemfile` - Текущий каталог содержит файл `.ruby-version` @@ -2627,7 +2659,7 @@ Starship gets the current Ruby version by running `ruby -v`. | `detect_folders` | `[]` | Which folders should trigger this module. | | `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | | `style` | `"bold red"` | Стиль модуля. | -| `disabled` | `false` | Отключает модуль `ruby`. | +| `disabled` | `false` | Disables the `ruby` module. | ### Переменные @@ -2637,7 +2669,7 @@ Starship gets the current Ruby version by running `ruby -v`. | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2650,7 +2682,7 @@ symbol = "🔺 " ## Rust -By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). Модуль будет показан, если любое из следующих условий соблюдено: +By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met: - Текущий каталог содержит файл `Cargo.toml` - Текущий каталог содержит файл с расширением `.rs` @@ -2666,7 +2698,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `style` | `"bold red"` | Стиль модуля. | -| `disabled` | `false` | Отключает модуль `rust`. | +| `disabled` | `false` | Disables the `rust` module. | ### Переменные @@ -2676,7 +2708,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2716,7 +2748,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2731,9 +2763,9 @@ symbol = "🌟 " The `shell` module shows an indicator for currently used shell. -::: tip Подсказка +::: tip -По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2761,9 +2793,9 @@ The `shell` module shows an indicator for currently used shell. | Переменная | По умолчанию | Описание | | ---------- | ------------ | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | -| style\* | | Отражает значение параметра `style`. | +| style\* | | Mirrors the value of option `style`. | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Примеры @@ -2801,7 +2833,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2835,7 +2867,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2850,9 +2882,9 @@ format = '[📦 \[$env\]]($style) ' The `status` module displays the exit code of the previous command. 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 Подсказка +::: tip -По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2892,7 +2924,7 @@ The `status` module displays the exit code of the previous command. The module w | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2911,9 +2943,9 @@ disabled = false The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. -::: tip Подсказка +::: tip -По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2934,7 +2966,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2958,7 +2990,7 @@ disabled = false ## Swift -By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). Модуль будет показан, если любое из следующих условий соблюдено: +By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met: - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -2984,7 +3016,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -2999,7 +3031,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 Подсказка +::: tip By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). @@ -3021,7 +3053,7 @@ By default the module will be shown if any of the following conditions are met: | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | | `style` | `"bold 105"` | Стиль модуля. | -| `disabled` | `false` | Отключает модуль `terraform`. | +| `disabled` | `false` | Disables the `terraform` module. | ### Переменные @@ -3032,7 +3064,7 @@ By default the module will be shown if any of the following conditions are met: | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -3056,36 +3088,36 @@ format = "[🏎💨 $workspace]($style) " ## Время -Модуль `time` показывает текущее **локальное** время. Значение конфигурации `format` используется пакетом [`chrono`](https://crates.io/crates/chrono) для контроля того, как отображается время. Ознакомьтесь с [документацией chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), чтобы увидеть доступные параметры. +The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. -::: tip Подсказка +::: tip -По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### Опции -| Параметр | По умолчанию | Описание | -| ----------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | -| `use_12hr` | `false` | Включить 12-часовое форматирование | -| `time_format` | см. ниже | [Строка формата chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html), используемая для форматирования времени. | -| `style` | `"bold yellow"` | Стиль модуля времени | -| `utc_time_offset` | `"local"` | Устанавливает смещение UTC. Range from -24 < x < 24. Разрешает числам с плавающей точкой встраивать 30/45-минутное смещение временной зоны. | -| `disabled` | `true` | Отключает модуль `time`. | -| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | +| Параметр | По умолчанию | Описание | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Иначе по умолчанию используется `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. +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. ### Переменные | Переменная | Пример | Описание | | ---------- | ---------- | ----------------------------------- | -| время | `13:08:10` | The current time. | +| time | `13:08:10` | The current time. | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -3102,14 +3134,14 @@ time_range = "10:00:00-14:00:00" ## Имя пользователя -Модуль `username` показывает имя активного пользователя. Модуль будет показан, если любое из следующих условий соблюдено: +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: - Текущий пользователь - root - Текущий пользователь отличается от залогиненного - Пользователь подключен к SSH-сессии - Переменная `show_always` равна true -::: tip Подсказка +::: tip 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. @@ -3117,13 +3149,13 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` ### Опции -| Параметр | По умолчанию | Описание | -| ------------- | ----------------------- | ------------------------------------------------------- | -| `style_root` | `"bold red"` | Стиль, используемый для пользователя root. | -| `style_user` | `"bold yellow"` | Стиль, используемый для всех пользователей, кроме root. | -| `format` | `"[$user]($style) in "` | Формат модуля. | -| `show_always` | `false` | Всегда показывать модуль `username`. | -| `disabled` | `false` | Отключает модуль `username`. | +| Параметр | По умолчанию | Описание | +| ------------- | ----------------------- | ------------------------------------- | +| `style_root` | `"bold red"` | The style used when the user is root. | +| `style_user` | `"bold yellow"` | The style used for non-root users. | +| `format` | `"[$user]($style) in "` | Формат модуля. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | ### Переменные @@ -3172,7 +3204,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -3240,7 +3272,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Отражает значение параметра `symbol` | | style\* | `black bold dimmed` | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -3253,7 +3285,7 @@ format = "[🆅 $repo](bold blue) " ## Zig -By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). Модуль будет показан, если любое из следующих условий соблюдено: +By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met: - The current directory contains a `.zig` file @@ -3278,7 +3310,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string ### Пример @@ -3301,19 +3333,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) matchs with `os` field if defined. -::: tip Подсказка +::: tip Multiple custom modules can be defined by using a `.`. ::: -::: tip Подсказка +::: tip 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 Подсказка +::: tip [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! @@ -3334,7 +3366,7 @@ 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` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `описание` | `""` | The description of the module that is shown when running `starship explain`. | +| `description` | `""` | The description of the module that is shown when running `starship explain`. | | `files` | `[]` | The files that will be searched in the working directory for a match. | | `directories` | `[]` | The directories that will be searched in the working directory for a match. | | `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | @@ -3352,7 +3384,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | symbol | Отражает значение параметра `symbol` | | style\* | Отражает значение параметра `style` | -*: Эта переменная может использоваться только в качестве части строки style +*: This variable can only be used as a part of a style string #### Custom command shell diff --git a/docs/ru-RU/installing/README.md b/docs/ru-RU/installing/README.md index 545a64636..c81880445 100644 --- a/docs/ru-RU/installing/README.md +++ b/docs/ru-RU/installing/README.md @@ -63,7 +63,6 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett { programs.starship = { enable = true; - enableZshIntegration = true; # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/tr-TR/config/README.md b/docs/tr-TR/config/README.md index 08a426da2..ee95f6505 100644 --- a/docs/tr-TR/config/README.md +++ b/docs/tr-TR/config/README.md @@ -261,7 +261,9 @@ format = "$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. 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. @@ -795,19 +797,20 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Options -| Option | Default | Description | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | -| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | -| `style` | `"bold cyan"` | The style for the module. | -| `disabled` | `false` | Disables the `directory` module. | -| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | -| `read_only_style` | `"red"` | The style for the read only symbol. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Option | Default | Description | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `directory` module. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
This module has a few advanced configuration options that control how the directory is displayed. @@ -839,6 +842,21 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an *: This variable can only be used as a part of a style string +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Variable | Example | Description | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Mirrors the value of option `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
+ ### Example ```toml @@ -1159,13 +1177,14 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud ### Options -| Option | Default | Description | -| ---------------- | ---------------------------------------------------------- | --------------------------------------------------------------- | -| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | -| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `gcloud` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------------------------------- | ---------------------------------------------------------------- | +| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | +| `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. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `gcloud` module. | ### Variables @@ -1214,6 +1233,17 @@ us-central1 = "uc1" asia-northeast1 = "an1" ``` +#### Display account and aliased project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(@$domain)(\($project\))]($style) ' +[gcloud.project_aliases] +very-long-project-name = "vlpn" +``` + ## Git Branch The `git_branch` module shows the active branch of the repo in your current directory. @@ -1711,39 +1741,6 @@ The `julia` module shows the currently installed version of [Julia](https://juli symbol = "∴ " ``` -## localip - -The `localip` module shows the IPv4 address of the primary network interface. - -### Options - -| Option | Default | Description | -| ---------- | ------------------------- | ------------------------------------------------------ | -| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | -| `format` | `"[$localipv4]($style) "` | The format for the module. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `true` | Disables the `localip` module. | - -### Variables - -| Variable | Example | Description | -| --------- | ------------ | ----------------------------------- | -| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | -| style\* | | Mirrors the value of option `style` | - -*: This variable can only be used as a part of a style string - -### Example - -```toml -# ~/.config/starship.toml - -[localip] -ssh_only = false -format = "@[$localipv4](bold red) " -disabled = false -``` - ## Kotlin The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). By default the module will be shown if any of the following conditions are met: @@ -1793,7 +1790,7 @@ kotlin_binary = "kotlinc" ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. 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 @@ -1815,8 +1812,10 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Variable | Example | Description | | --------- | -------------------- | ---------------------------------------- | -| context | `starship-cluster` | The current kubernetes context | +| context | `starship-context` | The current kubernetes context name | | namespace | `starship-namespace` | If set, the current kubernetes namespace | +| user | `starship-user` | If set, the current kubernetes user | +| cluster | `starship-cluster` | If set, the current kubernetes cluster | | symbol | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | @@ -1828,12 +1827,12 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y # ~/.config/starship.toml [kubernetes] -format = 'on [⛵ $context \($namespace\)](dimmed green) ' +format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) ' disabled = false [kubernetes.context_aliases] "dev.local.cluster.k8s" = "dev" ".*/openshift-cluster/.*" = "openshift" -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,12 +1848,12 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` ## Line Break @@ -1876,6 +1875,39 @@ The `line_break` module separates the prompt into two lines. disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Options + +| Option | Default | Description | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `localip` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ----------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). By default the module will be shown if any of the following conditions are met: diff --git a/docs/tr-TR/installing/README.md b/docs/tr-TR/installing/README.md index 897cd98ce..8c28db3f9 100644 --- a/docs/tr-TR/installing/README.md +++ b/docs/tr-TR/installing/README.md @@ -63,7 +63,6 @@ nix-env -iA nixos.starship { programs.starship = { enable = true; - enableZshIntegration = true; # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/vi-VN/config/README.md b/docs/vi-VN/config/README.md index fcc1c63ce..5d1bc3d1d 100644 --- a/docs/vi-VN/config/README.md +++ b/docs/vi-VN/config/README.md @@ -261,7 +261,9 @@ format = "$all$directory$character" ## AWS -`aws` module cho biết region và profile hiện tại của AWS. Cái này dựa trên các biến môi trường `AWS_REGION`, `AWS_DEFAULT_REGION`, và `AWS_PROFILE` với tập tin `~/.aws/config`. This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. Cái này dựa trên các biến môi trường `AWS_REGION`, `AWS_DEFAULT_REGION`, và `AWS_PROFILE` với tập tin `~/.aws/config`. This module also shows an expiration timer when using temporary credentials. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. 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. @@ -290,7 +292,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | 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 +*: This variable can only be used as a part of a style string ### Các vị dụ @@ -360,7 +362,7 @@ style = "blue bold" ## 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%. +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%. ### Các tuỳ chọn @@ -388,7 +390,7 @@ discharging_symbol = "💀 " ### Hiển thị pin -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). Nếu `display` không được cung cấp. Mặc định như sau: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. Mặc định như sau: ```toml [[battery.display]] @@ -400,7 +402,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### Các tuỳ chọn -Tuỳ chọn `display` là một mảng của của bảng sau. +The `display` option is an array of the following table. | Tuỳ chọn | Mặc định | Mô tả | | -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- | @@ -426,14 +428,14 @@ discharging_symbol = "💦" ## Character -Module `character` cho biết một kí tự (thường là một mũi tên) bên cạnh nơi văn bản được nhập trong terminal của bạn. +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -Kí tự sẽ nói cho bạn câu lệnh cuối liệu thành công hay thất bại. Nó có thể làm điều này bằng hai cách: +The character will tell you whether the last command was successful or not. It can do this in two ways: - thay đổi màu(`đỏ`/`xanh lá`) - thay đổi hình dạng (`❯`/`✖`) -Mặc định, nó chỉ thay đổi màu. If you also want to change its shape take a look at [this example](#with-custom-error-shape). +By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). ::: cảnh báo @@ -496,7 +498,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). Mặc định module sẽ được kích hoạt nếu thoả mãn bất kì điều kiện nào dưới đây: +The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: - Đường dẫn hiện tại chứa một tập tin `CmakeLists.txt` - Đường dẫn hiện tại chứa một tập tin `CMakeCache.txt` @@ -522,7 +524,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | 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 +*: This variable can only be used as a part of a style string ## COBOL / GNUCOBOL @@ -552,19 +554,19 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | 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 +*: This variable can only be used as a part of a style string ## Command Duration -Module `cmd_duration`. cho biết câu lệnh cuối cùng thực thi trong bao lâu. Module sẽ được hiện chỉ khi câu lệnh lấy nhiều hơn 2 giây, hoặc giá trị cấu hình `min_time`, nếu nó tồn tại. +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. -::: cảnh báo Không thể hook DEBUG trap trong Bash +::: warning Do not hook the DEBUG trap in Bash -Nếu bạn đang chạy Starship trong `bash`, không thể hook `DEBUG` trap sau khi chạy `eval $(starship init $0)`, hoặc module này **sẽ** ngắt. +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -Người dùng Bash, những người cần chức năng giống preexec có thể sử dụng [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Đơn giản là định nghĩa các mảng `preexec_functions` và `precmd_functions` trước khi chạy `eval $(starship init $0)`, và sau đó thực thi như bình thường. +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### Các tuỳ chọn @@ -586,7 +588,7 @@ Người dùng Bash, những người cần chức năng giống preexec có th | duration | `16m40s` | Thời gian nó lấy để thực thi câu lệnh | | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -602,9 +604,9 @@ 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. -::: thử thuật +::: tip -Cái này không loại bỏ conda's prompt mà nó sở hữu, bạn có thể muốn chạy `conda config --set changeps1 False`. +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. ::: @@ -627,7 +629,7 @@ Cái này không loại bỏ conda's prompt mà nó sở hữu, bạn có thể | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -659,7 +661,7 @@ The `container` module displays a symbol and container name, if inside a contain | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -698,7 +700,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -738,7 +740,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -787,30 +789,31 @@ format = "via [🦕 $version](green bold) " ## Đường dẫn -`directory` module hiển thị đường dẫn thư mục hiện hành của bạn,, cắt ngắn ba thư mục cha. Đường dẫn của bạn cũng sẽ được cắt ngắn tới đường dẫn gốc của git repo hiện tại của bạn. +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. -Khi sử dụng fish style pwd option, thay vì ẩn đường dẫn được rút gọn, bạn sẽ thấy một tên ngắn cho mỗi thư mục dựa trên số bạn cho phép trng tùy chọn. +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. -Cho ví dụ, `~/Dev/Nix/nixpkgs/pkgs` nơi `nixpkgs` là gốc của repo, và tuỳ chọn thiết lập sang `1`. Bây giờ bạn sẽ thấy `~/D/N/nixpkgs/pkgs`, trong khi trước nó là `nixpkgs/pkgs`. +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. ### Các tuỳ chọn -| Tuỳ chọn | Mặc định | Mô tả | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | Số lượng thư mục cha của thư mục hiện tại nên được rút gọn. | -| `truncate_to_repo` | `true` | Có hoặc không rút gọn đường dẫn gốc của git repo hiện tại của bạn. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Định dạng cho module. | -| `style` | `"bold cyan"` | Kiểu cho module. | -| `disabled` | `false` | Vô hiệu mô đun `directory`. | -| `read_only` | `"🔒"` | Biểu tượng để nhận biết thư mục hiện tại là chỉ đọc. | -| `read_only_style` | `"red"` | Style cho biểu tượng chỉ đọc. | -| `truncation_symbol` | `""` | Biểu tượng tiền tố cho các đường dẫn rút gọn. ví dụ: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | Biểu tượng nhận biết thư mục home. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Tuỳ chọn | Mặc định | Mô tả | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | Số lượng thư mục cha của thư mục hiện tại nên được rút gọn. | +| `truncate_to_repo` | `true` | Có hoặc không rút gọn đường dẫn gốc của git repo hiện tại của bạn. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Định dạng cho module. | +| `style` | `"bold cyan"` | Kiểu cho module. | +| `disabled` | `false` | Vô hiệu mô đun `directory`. | +| `read_only` | `"🔒"` | Biểu tượng để nhận biết thư mục hiện tại là chỉ đọc. | +| `read_only_style` | `"red"` | Style cho biểu tượng chỉ đọc. | +| `truncation_symbol` | `""` | Biểu tượng tiền tố cho các đường dẫn rút gọn. ví dụ: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
-Mô đun này có một vài tùy chọn nâng cao để điều khiển cách thư mục được hiển thị. +This module has a few advanced configuration options that control how the directory is displayed. | Tùy chọn nâng cao | Mặc định | Mô tả | | --------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -837,7 +840,22 @@ Cho ví dụ, `~/Dev/Nix/nixpkgs/pkgs` nơi `nixpkgs` là gốc của repo, và | path | `"D:/Projects"` | Đường dẫn thư mục hiện tại | | style\* | `"black bold dimmed"` | 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 +*: This variable can only be used as a part of a style string + +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| Biến | Ví dụ | Mô tả | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Giá trị ghi đè của `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
### Ví dụ @@ -855,26 +873,26 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Các tuỳ chọn -| Tuỳ chọn | Mặc định | Mô tả | -| ------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | Định dạng cho module. | -| `symbol` | `"🐳 "` | Biểu tượng sử dụng để hiển thị trước Docker context. | -| `only_with_files` | `true` | Chỉ hiển thị khi có một tệp tin khớp | -| `detect_extensions` | `[]` | Các mở rộng nào nên kích hoạt mô đun này (cần `only_with_files` thiết lập là true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Tên tệp tin nào nên kích hoạt mô đun này (cần `only_with_files` được thiết lập là true). | -| `detect_folders` | `[]` | Thư mục nào nên kích hoạt mô đun này (cần `only_with_files` được thiết lập là true). | -| `style` | `"blue bold"` | Kiểu cho module. | -| `disabled` | `false` | Vô hiệu mô đun `docker_context`. | +| Tuỳ chọn | Mặc định | Mô tả | +| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | Định dạng cho module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `only_with_files` | `true` | Only show when there's a match | +| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | +| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | +| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | +| `style` | `"blue bold"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Các biến | Biến | Ví dụ | Mô tả | | --------- | -------------- | -------------------------------- | -| context | `test_context` | Docker context hiện tại | +| context | `test_context` | The current docker context | | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -887,9 +905,9 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. Nếu SDK được ghim trong thư mục hiện tại, phiên bản ghim đó được hiển thị. Ngược lại, mô đun hiển thị phiên bản cuối cùng của SDK được cài đặt. +The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. -Mặc định, mô đun này sẽ chỉ được hiển thị trong dấu nhắc lệnh của bạn khi một hoặc nhiều tệp tin dưới đây xuất hiện trong thư mục hiện tại: +By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: - `global.json` - `project.json` @@ -900,11 +918,11 @@ Mặc định, mô đun này sẽ chỉ được hiển thị trong dấu nhắc - `*.fsproj` - `*.xproj` -Bạn cũng sẽ cần cài đặt .NET Core SDK đúng cách để sử dụng một cách chính xác. +You'll also need the .NET Core SDK installed in order to use it correctly. -Mô đun này sử dụng cơ chế của bản thân để phát hiện phiên bản của chính nó. Thông thường, nó nhanh gấp đôi nếu chạy `dotnet --version`, nhưng nó có thể hiện sai phiên bản nếu dự án .NET của bạn có một cấu trúc thư mục bất thường. Nếu độ chính xác quan trọng hơn tốc độ, bạn có thể vô hiệu cơ chế bằng cài đặt `heuristic = false` trong các tùy chọn mô đun. +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. -Mô đun cũng sẽ hiện Target Framework Moniker () khi có một tệp tin csproj trong thư mục hiện tại. +The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. ### Các tuỳ chọn @@ -912,24 +930,24 @@ Mô đun cũng sẽ hiện Target Framework Moniker ([\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,12 +1848,12 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` ## Line Break @@ -1876,6 +1875,39 @@ The `line_break` module separates the prompt into two lines. disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | Định dạng cho module. | +| `style` | `"bold yellow"` | Kiểu cho module. | +| `disabled` | `true` | Disables the `localip` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ------------ | --------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Giá trị ghi đè của `style` | + +*: This variable can only be used as a part of a style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: @@ -1906,7 +1938,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -1923,9 +1955,9 @@ 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. -::: thử thuật +::: tip -Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -1976,7 +2008,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc | `style` | `"bold purple"` | Kiểu cho module. | | `format` | `"on [$symbol$branch]($style) "` | Định dạng cho module. | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | Biểu tượng sử dụng để nhận biết một tên nhánh được rút gọn. | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | | `disabled` | `true` | Disables the `hg_branch` module. | ### Các biến @@ -1987,7 +2019,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2013,7 +2045,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | | `detect_extensions` | `["nim", "nims", "nimble"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | @@ -2030,7 +2062,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2066,7 +2098,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2113,7 +2145,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2160,7 +2192,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2193,7 +2225,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2248,7 +2280,7 @@ The `package` module is shown when the current directory is the repository for a | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2328,7 +2360,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2343,7 +2375,7 @@ format = "via [🔹 $version](147 bold) " The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version. -::: thử thuật +::: tip By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). @@ -2374,7 +2406,7 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2424,7 +2456,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2469,7 +2501,7 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki | `detect_folders` | `[]` | Thư mục nào sẽ kích hoạt mô-đun này | | `disabled` | `false` | Disables the `python` module. | -::: thử thuật +::: tip 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. @@ -2568,7 +2600,7 @@ format = "with [📐 $version](blue bold) " ## Red -By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: +By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met: - The current directory contains a file with `.red` or `.reds` extension @@ -2593,7 +2625,7 @@ By default the `red` module shows the currently installed version of [Red](https | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2606,7 +2638,7 @@ symbol = "🔴 " ## Ruby -By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: +By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met: - The current directory contains a `Gemfile` file - The current directory contains a `.ruby-version` file @@ -2637,7 +2669,7 @@ Starship gets the current Ruby version by running `ruby -v`. | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2650,7 +2682,7 @@ symbol = "🔺 " ## Rust -By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: +By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met: - The current directory contains a `Cargo.toml` file - The current directory contains a file with the `.rs` extension @@ -2676,7 +2708,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2703,7 +2735,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `detect_extensions` | `["sbt", "scala"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | | `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Những tên tệp nào sẽ kích hoạt mô-đun này. | -| `detect_folders` | `[".metals"]` | Những thư mục nào nên kích hoạt các mô đun này. | +| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | | `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | | `style` | `"red dimmed"` | Kiểu cho module. | | `disabled` | `false` | Disables the `scala` module. | @@ -2716,7 +2748,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2731,9 +2763,9 @@ symbol = "🌟 " The `shell` module shows an indicator for currently used shell. -::: thử thuật +::: tip -Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2761,9 +2793,9 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế | Biến | Mặc định | Mô tả | | --------- | -------- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | -| style\* | | Giá trị ghi đè của `style`. | +| style\* | | Mirrors the value of option `style`. | -*: Biến này có thể chỉ được sử dụng như một phần của style string +*: This variable can only be used as a part of a style string ### Các vị dụ @@ -2801,7 +2833,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2835,7 +2867,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2850,9 +2882,9 @@ format = '[📦 \[$env\]]($style) ' The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. The status code will cast to a signed 32-bit integer. -::: thử thuật +::: tip -Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2892,7 +2924,7 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2911,9 +2943,9 @@ disabled = false The `sudo` module displays if sudo credentials are currently cached. The module will only be shown if credentials are cached. -::: thử thuật +::: tip -Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2934,7 +2966,7 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2958,7 +2990,7 @@ disabled = false ## Swift -By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: +By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met: - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -2984,7 +3016,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -2999,7 +3031,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. -::: thử thuật +::: tip By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). @@ -3032,7 +3064,7 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -3058,9 +3090,9 @@ 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. -::: thử thuật +::: tip -Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn. +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -3082,10 +3114,10 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | Biến | Ví dụ | Mô tả | | --------- | ---------- | -------------------------- | -| thời gian | `13:08:10` | The current time. | +| time | `13:08:10` | The current time. | | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -3102,14 +3134,14 @@ time_range = "10:00:00-14:00:00" ## Username -The `username` module shows active user's username. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: - The current user is root - The current user isn't the same as the one that is logged in - The user is currently connected as an SSH session - The variable `show_always` is set to true -::: thử thuật +::: tip 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. @@ -3172,7 +3204,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -3240,7 +3272,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | `black bold dimmed` | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -3253,7 +3285,7 @@ format = "[🆅 $repo](bold blue) " ## Zig -By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: +By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met: - The current directory contains a `.zig` file @@ -3278,7 +3310,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | 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 +*: This variable can only be used as a part of a style string ### Ví dụ @@ -3301,19 +3333,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) matchs with `os` field if defined. -::: thử thuật +::: tip Multiple custom modules can be defined by using a `.`. ::: -::: thử thuật +::: tip 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. ::: -::: thử thuật +::: tip [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! @@ -3334,7 +3366,7 @@ 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` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `mô tả` | `""` | The description of the module that is shown when running `starship explain`. | +| `description` | `""` | The description of the module that is shown when running `starship explain`. | | `files` | `[]` | The files that will be searched in the working directory for a match. | | `directories` | `[]` | The directories that will be searched in the working directory for a match. | | `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | @@ -3352,7 +3384,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | 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 +*: This variable can only be used as a part of a style string #### Custom command shell diff --git a/docs/vi-VN/installing/README.md b/docs/vi-VN/installing/README.md index 1f03d2de2..05c926ebd 100644 --- a/docs/vi-VN/installing/README.md +++ b/docs/vi-VN/installing/README.md @@ -63,8 +63,7 @@ Kích hoạt mô đun `programs.starship` trong tệp `home.nix` của bạn, v { programs.starship = { enable = true; - enableZshIntegration = true; - # Cấu hình viết vào ~/.config/starship.toml + # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md index 434846b37..f94812a46 100644 --- a/docs/zh-CN/config/README.md +++ b/docs/zh-CN/config/README.md @@ -261,7 +261,9 @@ format = "$all$directory$character" ## AWS -`aws` 组件显示当前 AWS 主机所在区域与配置信息。 各组件基于 `AWS_REGION`,`AWS_DEFAULT_REGION` 和 `AWS_PROFILE` 环境变量与 `~/.aws/config` 文件。 This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. 各组件基于 `AWS_REGION`,`AWS_DEFAULT_REGION` 和 `AWS_PROFILE` 环境变量与 `~/.aws/config` 文件。 This module also shows an expiration timer when using temporary credentials. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. 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. @@ -360,7 +362,7 @@ style = "blue bold" ## Battery -`battery` 组件显示电池充电情况和当前充电状态。 这个组件只会在当前电量低于 10% 时显示。 +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%. ### 配置项 @@ -388,7 +390,7 @@ discharging_symbol = "💀 " ### Battery 组件的显示 -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). 如果 `display` 没有设置, 默认设置如下: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. 默认设置如下: ```toml [[battery.display]] @@ -400,7 +402,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### 配置项 -`display` 字段的子字段如下: +The `display` option is an array of the following table. | Option | 默认值 | 描述 | | -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- | @@ -426,9 +428,9 @@ discharging_symbol = "💦" ## Character -`character` 组件用于在您输入终端的文本旁显示一个字符(通常是一个箭头)。 +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -这个字符可以告诉您最后一个命令是否执行成功。 It can do this in two ways: +The character will tell you whether the last command was successful or not. It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -556,15 +558,15 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ## Command Duration -`cmd_duration` 组件显示上一个命令执行的时间。 此组件只在命令执行时间长于两秒时显示,或者当其 `min_time` 字段被设置时,按此值为执行时间的显示下限。 +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. -::: warning 不要在 Bash 里捕获 DEBUG 信号 +::: warning Do not hook the DEBUG trap in Bash -如果您正在 `bash` 上使用 Starship,在运行 `eval $(starship)` 后,不要捕获 `DEBUG` 信号,否则此组件**将会**坏掉。 +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -需要在自动每一条命令前执行某些操作的 Bash 用户可以使用 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只需要在执行 `eval $(starship init $0)` 前简单地定义 `preexec_functions` 和 `precmd_functions` 两个列表,就可以照常运行了。 +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### 配置项 @@ -604,7 +606,7 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e ::: tip -此组件没有禁用 conda 自带的提示符修改,您可能需要执行 `conda config --set changeps1 False`。 +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. ::: @@ -787,30 +789,31 @@ format = "via [🦕 $version](green bold) " ## Directory -`directory` 组件显示当前目录的路径,显示的路径会截断到三个父目录以内。 如果您处于一个 git 仓库中,显示的路径则最多会截断到该仓库的根目录。 +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. -当使用 fish 风格的当前目录显示样式时,您会看到基于您的设置的每个上级目录的短名称,而不是隐藏被截断的上级目录。 +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. -例如,对于 `~/Dev/Nix/nixpkgs/pkgs`,其中 `nixpkgs` 是 git 仓库根目录,fish 风格相关选项设置为 `1`。 您将会看到 `~/D/N/nixpkgs/pkgs`,而在设置 fish 风格之前,当前路径将显示成 `nixpkgs/pkgs`。 +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. ### 配置项 -| Option | 默认值 | 描述 | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | 当前目录路径被截断后最多保留的父目录数量。 | -| `truncate_to_repo` | `true` | 是否只截断到您当前处于的 git 仓库根目录下。 | -| `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. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Option | 默认值 | 描述 | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | 当前目录路径被截断后最多保留的父目录数量。 | +| `truncate_to_repo` | `true` | 是否只截断到您当前处于的 git 仓库根目录下。 | +| `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. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
-此组件有几个高级配置选项来控制当前目录路径的显示方式。 +This module has a few advanced configuration options that control how the directory is displayed. | Advanced Option | 默认值 | 描述 | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -839,6 +842,21 @@ format = "via [🦕 $version](green bold) " *: This variable can only be used as a part of a style string +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| 字段 | 示例 | 描述 | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | `style`对应值 | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
+ ### 示例 ```toml @@ -887,7 +905,7 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 如果当前目录已被绑定了一个版本的 SDK,则显示被帮定的版本。 否则此组件将显示最新安装的 SDK 版本。 +The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: @@ -902,7 +920,7 @@ By default this module will only be shown in your prompt when one or more of the You'll also need the .NET Core SDK installed in order to use it correctly. -在内部,此组件使用自己的版本检测机制。 一般来说此组件是直接执行 `dotnet --version` 的两倍快,但当你的 .NET 项目使用了不常见的目录布局时此组件可能显示一个错误的版本。 如果相比于速度您更需要正确的版本号,您可以在组件设置中设置 `heuristic = false` 来禁用该机制。 +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. @@ -912,13 +930,13 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,23 +1848,23 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` ## Line Break -`line_break` 组件将提示分隔为两行。 +The `line_break` module separates the prompt into two lines. ### 配置项 -| Option | 默认值 | 描述 | -| ---------- | ------- | --------------------------- | -| `disabled` | `false` | 禁用 `line_break` 组件,使提示成为单行。 | +| Option | 默认值 | 描述 | +| ---------- | ------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | ### 示例 @@ -1876,6 +1875,39 @@ Long and automatically generated cluster names can be identified and shortened u disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### 配置项 + +| Option | 默认值 | 描述 | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | 组件格式化模板。 | +| `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 + +### 示例 + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). By default the module will be shown if any of the following conditions are met: @@ -1919,25 +1951,25 @@ format = "via [🌕 $version](bold blue) " ## Memory Usage -`memory_usage` 组件显示当前系统内存和交换区使用情况。 +The `memory_usage` module shows current system memory and swap usage. -默认情况下,如果系统交换区使用不为 0,则会显示交换区使用情况。 +By default the swap usage is displayed if the total system swap is non-zero. ::: tip -此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### 配置项 -| Option | 默认值 | 描述 | -| ----------- | ----------------------------------------------- | ---------------------- | -| `threshold` | `75` | 隐藏内存使用情况,除非它超过这个百分比。 | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | 组件格式化模板。 | -| `symbol` | `"🐏"` | 这个字段的内容会显示在当前内存使用情况之前。 | -| `style` | `"bold dimmed white"` | 此组件的样式。 | -| `disabled` | `true` | 禁用 `memory_usage` 模块 | +| Option | 默认值 | 描述 | +| ----------- | ----------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | 组件格式化模板。 | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | 此组件的样式。 | +| `disabled` | `true` | Disables the `memory_usage` module. | ### Variables @@ -1966,18 +1998,18 @@ style = "bold dimmed green" ## Mercurial Branch -`hg_branch` 组件显示当前目录的 hg 仓库的活动分支。 +The `hg_branch` module shows the active branch of the repo in your current directory. ### 配置项 -| Option | 默认值 | 描述 | -| ------------------- | -------------------------------- | --------------------------------------------- | -| `symbol` | `" "` | 该字段的内容显示于当前仓库的 hg 书签或活动分支名之前。 | -| `style` | `"bold purple"` | 此组件的样式。 | -| `format` | `"on [$symbol$branch]($style) "` | 组件格式化模板。 | -| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | 此字段的内容用来表示分支名称被截断。 | -| `disabled` | `true` | 禁用 `hg_branch` 组件。 | +| Option | 默认值 | 描述 | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `"bold purple"` | 此组件的样式。 | +| `format` | `"on [$symbol$branch]($style) "` | 组件格式化模板。 | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | ### Variables @@ -2044,7 +2076,7 @@ symbol = "🎣 " ## Nix-shell -The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. 当处于一个 nix-shell 环境中时,此组件会被显示。 +The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. ### 配置项 @@ -2055,13 +2087,13 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | `style` | `"bold blue"` | 此组件的样式。 | | `impure_msg` | `"impure"` | A format string shown when the shell is impure. | | `pure_msg` | `"pure"` | A format string shown when the shell is pure. | -| `disabled` | `false` | 禁用 `nix_shell` 组件。 | +| `disabled` | `false` | Disables the `nix_shell` module. | ### Variables | 字段 | 示例 | 描述 | | --------- | ------- | -------------------------- | -| state | `纯色` | The state of the nix-shell | +| state | `pure` | The state of the nix-shell | | name | `lorri` | The name of the nix-shell | | symbol | | `symbol`对应值 | | style\* | | `style`对应值 | @@ -2102,7 +2134,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | | `style` | `"bold green"` | 此组件的样式。 | -| `disabled` | `false` | 禁用 `nodejs` 组件。 | +| `disabled` | `false` | Disables the `nodejs` module. | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2208,7 +2240,7 @@ symbol = "☁️ " ## Package Version -当前目录是软件包的代码仓库时,将显示 `package` 组件,并显示软件包当前版本。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2234,11 +2266,11 @@ symbol = "☁️ " | Option | 默认值 | 描述 | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | | `format` | `"is [$symbol$version]($style) "` | 组件格式化模板。 | -| `symbol` | `"📦 "` | 这个字段的内容会显示在当前软件包版本之前。 | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `"bold 208"` | 此组件的样式。 | | `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | 禁用 `package` 组件。 | +| `disabled` | `false` | Disables the `package` module. | ### Variables @@ -2313,12 +2345,12 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | 这个字段的内容会显示在当前 PHP 版本之前。 | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | | `detect_extensions` | `["php"]` | Which extensions should trigger this module. | | `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `style` | `"147 bold"` | 此组件的样式。 | -| `disabled` | `false` | 禁用 `php` 组件。 | +| `disabled` | `false` | Disables the `php` module. | ### Variables @@ -2439,7 +2471,7 @@ format = "via [$symbol$version](bold white)" The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated. -如果`pyenv_version_name`被设置为`true`, 本组件将会展示pyenv版本名。 否则则显示通过`python --version`获得的版本号 +If `pyenv_version_name` is set to `true`, it will display the pyenv version name. Otherwise, it will display the version number from `python --version`. By default the module will be shown if any of the following conditions are met: @@ -2459,15 +2491,15 @@ By default the module will be shown if any of the following conditions are met: | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | 组件格式化模板。 | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | 用于表示Python的格式化字符串。 | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | | `style` | `"yellow bold"` | 此组件的样式。 | -| `pyenv_version_name` | `false` | 使用 pyenv 获取 Python 版本 | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | | `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `["py"]` | Which extensions should trigger this module | | `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `disabled` | `false` | 禁用 `python` 组件。 | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2481,11 +2513,11 @@ The default values and order for `python_binary` was chosen to first identify th | 字段 | 示例 | 描述 | | ------------ | --------------- | ------------------------------------------ | -| version | `"v3.8.1"` | `python`版本 | +| version | `"v3.8.1"` | The version of `python` | | symbol | `"🐍 "` | `symbol`对应值 | | style | `"yellow bold"` | `style`对应值 | | pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | -| virtualenv | `"venv"` | 当前`virtualenv`名称 | +| virtualenv | `"venv"` | The current `virtualenv` name | ### 示例 @@ -2568,7 +2600,7 @@ format = "with [📐 $version](blue bold) " ## Red -By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 此组件只有满足以下条件之一时才会被显示: +By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met: - The current directory contains a file with `.red` or `.reds` extension @@ -2606,7 +2638,7 @@ symbol = "🔴 " ## Ruby -By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 此组件只有满足以下条件之一时才会被显示: +By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met: - 当前目录包含 `Gemfile` 文件 - The current directory contains a `.ruby-version` file @@ -2627,7 +2659,7 @@ Starship gets the current Ruby version by running `ruby -v`. | `detect_folders` | `[]` | Which folders should trigger this module. | | `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | | `style` | `"bold red"` | 此组件的样式。 | -| `disabled` | `false` | 禁用 `ruby` 组件。 | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -2650,7 +2682,7 @@ symbol = "🔺 " ## Rust -By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 此组件只有满足以下条件之一时才会被显示: +By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met: - 当前目录包含 `Cargo.toml` 文件 - 当前目录包含一个使用 `.rs` 扩展名的文件 @@ -2666,7 +2698,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `style` | `"bold red"` | 此组件的样式。 | -| `disabled` | `false` | 禁用 `rust` 组件。 | +| `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -2733,7 +2765,7 @@ The `shell` module shows an indicator for currently used shell. ::: tip -此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2761,7 +2793,7 @@ The `shell` module shows an indicator for currently used shell. | 字段 | 默认值 | 描述 | | --------- | --- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | -| style\* | | `style`对应值. | +| style\* | | Mirrors the value of option `style`. | *: This variable can only be used as a part of a style string @@ -2852,7 +2884,7 @@ The `status` module displays the exit code of the previous command. The module w ::: tip -此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2913,7 +2945,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module ::: tip -此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2958,7 +2990,7 @@ disabled = false ## Swift -By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 此组件只有满足以下条件之一时才会被显示: +By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met: - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -3021,7 +3053,7 @@ By default the module will be shown if any of the following conditions are met: | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | | `style` | `"bold 105"` | 此组件的样式。 | -| `disabled` | `false` | 禁用 `terraform` 组件。 | +| `disabled` | `false` | Disables the `terraform` module. | ### Variables @@ -3056,27 +3088,27 @@ format = "[🏎💨 $workspace]($style) " ## Time -`time` 组件显示当前的 **本地** 时间。 `format` 字段值会提供给 [`chrono`](https://crates.io/crates/chrono) crate 用来控制时间显示方式。 请参阅 [chrono strftime 文档](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) 以了解可用格式选项。 +The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. ::: tip -此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### 配置项 -| Option | 默认值 | 描述 | -| ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | -| `use_12hr` | `false` | 启用 12 小时格式 | -| `time_format` | 见下文解释 | 用来格式化时间显示的 [chrono 格式字符串](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) | -| `style` | `"bold yellow"` | 显示时间的样式。 | -| `utc_time_offset` | `"local"` | 设置所用 UTC 偏移量。 Range from -24 < x < 24. 允许使用浮点数来得到 30/45 分钟的时区偏移。 | -| `disabled` | `true` | 禁用 `time` 组件。 | -| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | +| Option | 默认值 | 描述 | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 否则,其默认值为 `"%T"`。 Manually setting `time_format` will override the `use_12hr` setting. +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 @@ -3102,7 +3134,7 @@ time_range = "10:00:00-14:00:00" ## Username -`username` 组件显示当前活跃的用户名。 此组件只有满足以下条件之一时才会被显示: +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: - 当前用户是 root - 当前用户与登录用户不相同 @@ -3117,13 +3149,13 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` ### 配置项 -| Option | 默认值 | 描述 | -| ------------- | ----------------------- | ------------------- | -| `style_root` | `"bold red"` | 当前用户为 root 时使用的样式。 | -| `style_user` | `"bold yellow"` | 非 root 用户使用的样式。 | -| `format` | `"[$user]($style) in "` | 组件格式化模板。 | -| `show_always` | `false` | 总是显示 `username` 组件。 | -| `disabled` | `false` | 禁用 `username` 组件。 | +| Option | 默认值 | 描述 | +| ------------- | ----------------------- | ------------------------------------- | +| `style_root` | `"bold red"` | The style used when the user is root. | +| `style_user` | `"bold yellow"` | The style used for non-root users. | +| `format` | `"[$user]($style) in "` | 组件格式化模板。 | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | ### Variables @@ -3253,7 +3285,7 @@ format = "[🆅 $repo](bold blue) " ## Zig -By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 此组件只有满足以下条件之一时才会被显示: +By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met: - The current directory contains a `.zig` file @@ -3334,7 +3366,7 @@ 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` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `描述` | `""` | The description of the module that is shown when running `starship explain`. | +| `description` | `""` | The description of the module that is shown when running `starship explain`. | | `files` | `[]` | The files that will be searched in the working directory for a match. | | `directories` | `[]` | The directories that will be searched in the working directory for a match. | | `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | diff --git a/docs/zh-CN/guide/README.md b/docs/zh-CN/guide/README.md index e7d1a2f7f..1160187f2 100644 --- a/docs/zh-CN/guide/README.md +++ b/docs/zh-CN/guide/README.md @@ -103,7 +103,7 @@ >Português do Brasil  
Русский  
Linux -Install the latest version for your system: +安装最新版本: ```sh sh -c "$(curl -fsSL https://starship.rs/install.sh)" ``` -Alternatively, install Starship using any of the following package managers: +或者,使用以下任一软件包管理器安装Starship: -| Distribution | 软件包来源 | 指令 | +| 发行版 | 软件包来源 | 指令 | | ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | -| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | -| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | -| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | -| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | +| **_任意发行版_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _任意发行版_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _任意发行版_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| _任意发行版_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` | | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | @@ -229,13 +229,13 @@ Alternatively, install Starship using any of the following package managers:
macOS -Install the latest version for your system: +安装最新版本: ```sh sh -c "$(curl -fsSL https://starship.rs/install.sh)" ``` -Alternatively, install Starship using any of the following package managers: +或者,使用以下任一软件包管理器安装Starship: | 软件包来源 | 指令 | | -------------------------------------------------------- | --------------------------------------- | @@ -295,7 +295,7 @@ load(io.popen('starship init cmd'):read("*a"))() eval (starship init elvish) ``` -Note: Only Elvish v0.17+ is supported +注意:仅支持 v0.17 及以上版本的 Elvish
@@ -324,7 +324,7 @@ eval $(starship init ion)
Nushell -Add the following to the end of your Nushell configuration (find it by running `config path`): +将以下内容添加到您 Nushell 配置文件的末尾(通过运行 `config path` 来获取配置文件的路径): ```toml startup = [ @@ -340,7 +340,7 @@ prompt = "starship_prompt"
PowerShell -Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): +将以下内容添加到您 PowerShell 配置文件的末尾(通过运行 `$PROFILE` 来获取配置文件的路径) ```powershell Invoke-Expression (&starship init powershell) @@ -401,7 +401,7 @@ eval "$(starship init zsh)" ## 💭该项目受以下项目启发 -请看看这些之前的工作,他们启发了 Starship 项目的创造。 🙏 +请看看这些之前的项目,他们启发了 Starship 项目。 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. @@ -411,7 +411,7 @@ eval "$(starship init zsh)"


- Starship rocket icon + Starship 图标

## 📝 License diff --git a/docs/zh-CN/installing/README.md b/docs/zh-CN/installing/README.md index e50ddb9b0..23280056c 100644 --- a/docs/zh-CN/installing/README.md +++ b/docs/zh-CN/installing/README.md @@ -63,7 +63,6 @@ nix-env -iA nixos.starship { programs.starship = { enable = true; - enableZshIntegration = true; # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md index 54e021e5f..462301586 100644 --- a/docs/zh-TW/config/README.md +++ b/docs/zh-TW/config/README.md @@ -261,7 +261,9 @@ format = "$all$directory$character" ## AWS -`aws` 模組顯示現在 AWS 的區域與概況。 這是根據 `AWS_REGION`、`AWS_DEFAULT_REGION` 與 `AWS_PROFILE` 環境變數及 `~/.aws/config` 檔案。 This module also shows an expiration timer when using temporary credentials. +The `aws` module shows the current AWS region and profile when credentials or a `credential_process` have been setup. 這是根據 `AWS_REGION`、`AWS_DEFAULT_REGION` 與 `AWS_PROFILE` 環境變數及 `~/.aws/config` 檔案。 This module also shows an expiration timer when using temporary credentials. + +The module will display a profile only if its credentials are present in `~/.aws/credentials` or a `credential_process` is 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. 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. @@ -360,7 +362,7 @@ style = "blue bold" ## 電池 -`battery` 模組顯示電池的電量以及現在的充電狀態。 這個模組只會在裝置的電量低於 10% 的時候看見。 +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%. ### 選項 @@ -388,7 +390,7 @@ discharging_symbol = "💀 " ### 電池顯示 -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). 如果沒有提供 `display`。 預設如下: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. 預設如下: ```toml [[battery.display]] @@ -400,7 +402,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### 選項 -`display` 選項是一個下列表格的陣列。 +The `display` option is an array of the following table. | Option | 預設 | 說明 | | -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- | @@ -426,9 +428,9 @@ discharging_symbol = "💦" ## 字元 -`character` 模組在你的文字輸入處旁顯示一個字元 (通常是箭頭)。 +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. -這個字元會告訴你最後的指令是成功還是失敗。 It can do this in two ways: +The character will tell you whether the last command was successful or not. It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -556,15 +558,15 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ## 指令持續時間 -`cmd_duration` 模組顯示最後一個指令執行所花費的時間。 這個模組只會在指令花費超過兩秒或是有設定 `min_time` 時,超過設定值時出現。 +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. -::: warning 不要在 Bash 中設置 DEBUG trap +::: warning Do not hook the DEBUG trap in Bash -如果你在 `bash` 中使用 Starship,不要在執行 `eval $(starship init $0)` 之後設置 `DEBUG` trap,不然這個模組**會**壞掉。 +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. ::: -想使用類似 preexec 功能的 Bash 使用者可以 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只要在 `eval $(starship init $0)` 之前簡單地定義 `preexec_functions` 與 `precmd_functions` 兩個陣列,然後就可以照常進行。 +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. ### 選項 @@ -787,30 +789,31 @@ format = "via [🦕 $version](green bold) " ## 資料夾 -`directory` 模組顯示到現在資料夾的路徑,並裁減到前三層資料夾。 你的資料夾也會被裁減到你所在的 git 儲存庫的根目錄。 +The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. -如果正在使用 fish 風格的 pwd 選項,將不會隱藏被裁減的資料夾,而是會根據你在選項中設定的數字看到每一層資料夾的縮寫。 +When using the fish style pwd option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option. -例如,給定一個右列的路徑 `~/Dev/Nix/nixpkgs/pkgs` 其中 `nixpkgs` 是儲存庫的根目錄,而且該選項被設定為 `1`。 你會看到 `~/D/N/nixpkgs/pkgs`,而在這個設定之前則是 `nixpkgs/pkgs`。 +For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`. ### 選項 -| Option | 預設 | 說明 | -| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `truncation_length` | `3` | 到達現在資料夾的路徑中,要被裁減掉的資料夾數目。 | -| `truncate_to_repo` | `true` | 是否要裁減到你現在所在的 git 儲存庫的根目錄。 | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | -| `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. | -| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | -| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | -| `home_symbol` | `"~"` | The symbol indicating home directory. | -| `use_os_path_sep` | `true` | Use the OS specific path seperator instead of always using `/` (e.g. `\` on Windows) | +| Option | 預設 | 說明 | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | 到達現在資料夾的路徑中,要被裁減掉的資料夾數目。 | +| `truncate_to_repo` | `true` | 是否要裁減到你現在所在的 git 儲存庫的根目錄。 | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `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. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. | +| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. | +| `home_symbol` | `"~"` | The symbol indicating home directory. | +| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
-這個模組有些進階設定選項可以控制顯示資料夾。 +This module has a few advanced configuration options that control how the directory is displayed. | Advanced Option | 預設 | 說明 | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -839,6 +842,21 @@ format = "via [🦕 $version](green bold) " *: This variable can only be used as a part of a style string +
+The git repos have additional variables. + +Let us consider the path `/path/to/home/git_repo/src/lib` + +| 變數 | 範例 | 說明 | +| ------------------ | --------------------- | --------------------------------------- | +| before_root_path | `"/path/to/home/"` | The path before git root directory path | +| repo_root | `"git_repo"` | The git root directory name | +| path | `"/src/lib"` | The remaining path | +| style | `"black bold dimmed"` | Mirrors the value of option `style` | +| repo_root_style | `"underline white"` | Style for git root directory name | + +
+ ### 範例 ```toml @@ -887,7 +905,7 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 如果這個資料夾已經選定一個 SDK,則顯示這個 SDK 的版本。 如果沒有的話,則顯示最新安裝的 SDK 版本。 +The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK. By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: @@ -902,7 +920,7 @@ By default this module will only be shown in your prompt when one or more of the You'll also need the .NET Core SDK installed in order to use it correctly. -這個模組內部是使用它自己的機制來偵測版本。 一般來說這個模組有 `dotnet --version` 的兩倍快,但是它可能會在你的 .NET 專案有不尋常的資料夾結構時顯示不正確的版本。 如果精確度比速度更重要的話,你可以藉由設定模組中的 `heuristic = false` 選項來停用這個功能。 +Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. @@ -912,13 +930,13 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` #### Regex Matching @@ -1849,23 +1848,23 @@ Long and automatically generated cluster names can be identified and shortened u # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: -".*/(?P[\\w-]+)/.*" = "$cluster" +".*/(?P[\\w-]+)/.*" = "$var_cluster" # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -"gke_.*_(?P[\\w-]+)" = "gke-$cluster" +"gke_.*_(?P[\\w-]+)" = "gke-$var_cluster" ``` -## 換行 +## Line Break -`line_break` 模組將提示字元分成兩行。 +The `line_break` module separates the prompt into two lines. ### 選項 -| Option | 預設 | 說明 | -| ---------- | ------- | ----------------------------- | -| `disabled` | `false` | 停用 `line_break` 模組,讓提示字元變成一行。 | +| Option | 預設 | 說明 | +| ---------- | ------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | ### 範例 @@ -1876,6 +1875,39 @@ Long and automatically generated cluster names can be identified and shortened u disabled = true ``` +## Local IP + +The `localip` module shows the IPv4 address of the primary network interface. + +### 選項 + +| Option | 預設 | 說明 | +| ---------- | ------------------------- | ------------------------------------------------------ | +| `ssh_only` | `true` | Only show IP address when connected to an SSH session. | +| `format` | `"[$localipv4]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | 這個模組的風格。 | +| `disabled` | `true` | Disables the `localip` module. | + +### Variables + +| 變數 | 範例 | 說明 | +| --------- | ------------ | ----------------------------------- | +| localipv4 | 192.168.1.13 | Contains the primary IPv4 address | +| style\* | | Mirrors the value of option `style` | + +*: This variable can only be used as a part of a style string + +### 範例 + +```toml +# ~/.config/starship.toml + +[localip] +ssh_only = false +format = "@[$localipv4](bold red) " +disabled = false +``` + ## Lua The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). By default the module will be shown if any of the following conditions are met: @@ -1919,25 +1951,25 @@ format = "via [🌕 $version](bold blue) " ## 記憶體使用量 -`memory_usage` 模組顯示現在系統記憶體與 swap 的使用量。 +The `memory_usage` module shows current system memory and swap usage. -預設 swap 使用量會在系統總 swap 使用量不為 0 時顯示出來。 +By default the swap usage is displayed if the total system swap is non-zero. ::: tip -這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### 選項 -| Option | 預設 | 說明 | -| ----------- | ----------------------------------------------- | -------------------------- | -| `threshold` | `75` | 將記憶體使用量隱藏,除非使用量超過指定值。 | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. | -| `symbol` | `"🐏"` | 顯示在記憶體使用量之前的符號。 | -| `style` | `"bold dimmed white"` | 這個模組的風格。 | -| `disabled` | `true` | 停用 `memory_usage` 模組。 | +| Option | 預設 | 說明 | +| ----------- | ----------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | 這個模組的風格。 | +| `disabled` | `true` | Disables the `memory_usage` module. | ### Variables @@ -1976,7 +2008,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc | `style` | `"bold purple"` | 這個模組的風格。 | | `format` | `"on [$symbol$branch]($style) "` | The format for the module. | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | 用來指示分支名稱被縮減的符號。 | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | | `disabled` | `true` | Disables the `hg_branch` module. | ### Variables @@ -2044,7 +2076,7 @@ symbol = "🎣 " ## Nix-shell -The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. 這個模組會在 nix-shell 環境中顯示。 +The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. ### 選項 @@ -2055,7 +2087,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | `style` | `"bold blue"` | 這個模組的風格。 | | `impure_msg` | `"impure"` | A format string shown when the shell is impure. | | `pure_msg` | `"pure"` | A format string shown when the shell is pure. | -| `disabled` | `false` | 停用 `nix_shell` 模組。 | +| `disabled` | `false` | Disables the `nix_shell` module. | ### Variables @@ -2102,7 +2134,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | | `style` | `"bold green"` | 這個模組的風格。 | -| `disabled` | `false` | 停用 `nodejs` 模組。 | +| `disabled` | `false` | Disables the `nodejs` module. | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2208,7 +2240,7 @@ symbol = "☁️ " ## 套件版本 -The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並顯示他的現在版本。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2234,11 +2266,11 @@ The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並 | Option | 預設 | 說明 | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | | `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | 顯示在套件的版本之前的符號。 | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `"bold 208"` | 這個模組的風格。 | | `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | 停用 `package` 模組。 | +| `disabled` | `false` | Disables the `package` module. | ### Variables @@ -2370,7 +2402,7 @@ By default the module will be shown if any of the following conditions are met: | --------- | ---------- | ------------------------------------ | | version | `v0.12.24` | The version of `pulumi` | | stack | `dev` | The current Pulumi stack | -| 使用者名稱 | `alice` | The current Pulumi username | +| username | `alice` | The current Pulumi username | | symbol | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | @@ -2461,13 +2493,13 @@ By default the module will be shown if any of the following conditions are met: | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"🐍 "` | A format string representing the symbol of Python | | `style` | `"yellow bold"` | 這個模組的風格。 | -| `pyenv_version_name` | `false` | 使用 pyenv 取得 Python 的版本。 | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | | `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | | `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | | `detect_extensions` | `["py"]` | Which extensions should trigger this module | | `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | -| `disabled` | `false` | 停用 `python` 模組。 | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2568,7 +2600,7 @@ format = "with [📐 $version](blue bold) " ## Red -By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 這個模組在下列其中一個條件達成時顯示: +By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met: - The current directory contains a file with `.red` or `.reds` extension @@ -2606,7 +2638,7 @@ symbol = "🔴 " ## Ruby -By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 這個模組在下列其中一個條件達成時顯示: +By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met: - 目前資料夾中有一個 `Gemfile` 檔案 - The current directory contains a `.ruby-version` file @@ -2627,7 +2659,7 @@ Starship gets the current Ruby version by running `ruby -v`. | `detect_folders` | `[]` | Which folders should trigger this module. | | `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Which environment variables should trigger this module. | | `style` | `"bold red"` | 這個模組的風格。 | -| `disabled` | `false` | 停用 `ruby` 模組。 | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -2650,7 +2682,7 @@ symbol = "🔺 " ## Rust -By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 這個模組在下列其中一個條件達成時顯示: +By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met: - 目前資料夾中有一個 `Cargo.toml` 檔案 - 現在資料夾中包含一個檔案具有 `.rs` 副檔名 @@ -2666,7 +2698,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `style` | `"bold red"` | 這個模組的風格。 | -| `disabled` | `false` | 停用 `rust` 模組。 | +| `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -2733,7 +2765,7 @@ The `shell` module shows an indicator for currently used shell. ::: tip -這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2852,7 +2884,7 @@ The `status` module displays the exit code of the previous command. The module w ::: tip -這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2913,7 +2945,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module ::: tip -這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: @@ -2958,7 +2990,7 @@ disabled = false ## Swift -By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 這個模組在下列其中一個條件達成時顯示: +By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met: - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension @@ -3056,33 +3088,33 @@ format = "[🏎💨 $workspace]($style) " ## 時間 -`time` 模組顯示目前的**當地**時間. `format` 設定值被 [`chrono`](https://crates.io/crates/chrono) crate 用來控制時間如何顯示。 請看 [chrono 的 strftime 文件](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)來了解有那些選項可以使用。 +The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. ::: tip -這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。 +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. ::: ### 選項 -| Option | 預設 | 說明 | -| ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | -| `use_12hr` | `false` | 啟用 12 小時格式。 | -| `time_format` | 請看下列 | 用來顯示時間的 [chrono 格式字串](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)。 | -| `style` | `"bold yellow"` | 這個模組的時間的風格。 | -| `utc_time_offset` | `"local"` | 設定相對於 UTC 的時差。 Range from -24 < x < 24. 允許使用浮點數來表示 30/45 分鐘時差的時區。 | -| `disabled` | `true` | 停用 `time` 模組。 | -| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | +| Option | 預設 | 說明 | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | The format string for the module. | +| `use_12hr` | `false` | Enables 12 hour formatting | +| `time_format` | see below | The [chrono format string](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) used to format the time. | +| `style` | `"bold yellow"` | The style for the module time | +| `utc_time_offset` | `"local"` | Sets the UTC offset to use. Range from -24 < x < 24. Allows floats to accommodate 30/45 minute timezone offsets. | +| `disabled` | `true` | Disables the `time` module. | +| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 不然的話,它會被預設為 `"%T"`。 Manually setting `time_format` will override the `use_12hr` setting. +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 | 變數 | 範例 | 說明 | | --------- | ---------- | ----------------------------------- | -| 時間 | `13:08:10` | The current time. | +| time | `13:08:10` | The current time. | | style\* | | Mirrors the value of option `style` | *: This variable can only be used as a part of a style string @@ -3102,7 +3134,7 @@ time_range = "10:00:00-14:00:00" ## 使用者名稱 -`username` 模組顯示現在使用中的使用者名稱。 這個模組在下列其中一個條件達成時顯示: +The `username` module shows active user's username. The module will be shown if any of the following conditions are met: - 目前使用者為 root - 目前使用者並非登入時的使用者 @@ -3117,13 +3149,13 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` ### 選項 -| Option | 預設 | 說明 | -| ------------- | ----------------------- | -------------------------- | -| `style_root` | `"bold red"` | 使用者為 root 時使用的風格。 | -| `style_user` | `"bold yellow"` | 非 root 使用者時使用的風格。 | -| `format` | `"[$user]($style) in "` | The format for the module. | -| `show_always` | `false` | 總是顯示 `username` 模組。 | -| `disabled` | `false` | 停用 `username` 模組。 | +| Option | 預設 | 說明 | +| ------------- | ----------------------- | ------------------------------------- | +| `style_root` | `"bold red"` | The style used when the user is root. | +| `style_user` | `"bold yellow"` | The style used for non-root users. | +| `format` | `"[$user]($style) in "` | The format for the module. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | ### Variables @@ -3253,7 +3285,7 @@ format = "[🆅 $repo](bold blue) " ## Zig -By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 這個模組在下列其中一個條件達成時顯示: +By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met: - The current directory contains a `.zig` file @@ -3334,7 +3366,7 @@ 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` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. | | `shell` | | [See below](#custom-command-shell) | -| `說明` | `""` | The description of the module that is shown when running `starship explain`. | +| `description` | `""` | The description of the module that is shown when running `starship explain`. | | `files` | `[]` | The files that will be searched in the working directory for a match. | | `directories` | `[]` | The directories that will be searched in the working directory for a match. | | `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | diff --git a/docs/zh-TW/installing/README.md b/docs/zh-TW/installing/README.md index d383bed55..ce2b42abb 100644 --- a/docs/zh-TW/installing/README.md +++ b/docs/zh-TW/installing/README.md @@ -63,7 +63,6 @@ nix-env -iA nixos.starship { programs.starship = { enable = true; - enableZshIntegration = true; # Configuration written to ~/.config/starship.toml settings = { # add_newline = false;