diff options
Diffstat (limited to 'docs/es-ES/config/README.md')
-rw-r--r-- | docs/es-ES/config/README.md | 102 |
1 files changed, 86 insertions, 16 deletions
diff --git a/docs/es-ES/config/README.md b/docs/es-ES/config/README.md index 500a182a6..9f63647ab 100644 --- a/docs/es-ES/config/README.md +++ b/docs/es-ES/config/README.md @@ -32,7 +32,7 @@ Puedes modificar la ubicación por defecto del fichero `starship.toml` con la va export STARSHIP_CONFIG=~/.starship ``` -Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: +El equivalente en PowerShell (Windows) es añadir esta línea a tu `$PROFILE`: ```ps1 $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -113,6 +113,7 @@ prompt_order = [ "haskell", "java", "julia", + "nim", "nodejs", "ocaml", "php", @@ -376,9 +377,18 @@ Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repos | Variable | Por defecto | Descripción | | --------------------------- | ----------- | ---------------------------------------------------------------------------------------- | +| `substitutions` | | A table of substitutions to be made to the path. | | `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. | | `use_logical_path` | `true` | Displays the logical path provided by the shell (`PWD`) instead of the path from the OS. | +`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] +"/Volumes/network/path" = "/net" +"src/com/long/java/path" = "mypath" +``` + `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`. </details> @@ -394,7 +404,7 @@ truncation_length = 8 ## Docker context -El módulo `docker_context` muestra el [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) activo si no está a `default`. +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`. ### Opciones @@ -950,6 +960,32 @@ truncation_length = 4 truncation_symbol = "" ``` +## Nim + +The `nim` module shows the currently installed version of Nim. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +- The current directory contains a `nim.cfg` file +- The current directory contains a file with the `.nim` extension +- The current directory contains a file with the `.nims` extension +- The current directory contains a file with the `.nimble` extension + +### Opciones + +| Variable | Por defecto | Descripción | +| ---------- | --------------- | ----------------------------------------------------- | +| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `false` | Disables the `nim` module. | + +### Ejemplo + +```toml +# ~/.config/starship.toml + +[nim] +style = "yellow" +symbol = "🎣 " +``` + ## Nix-shell The `nix_shell` module shows the nix-shell environment. The module will be shown when inside a nix-shell environment. @@ -982,7 +1018,7 @@ symbol = "☃️ " The `nodejs` module shows the currently installed version of NodeJS. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un fichero `package.json` +- The current directory contains a `package.json` file - The current directory contains a `.node-version` file - The current directory contains a `node_modules` directory - The current directory contains a file with the `.js` extension @@ -1004,7 +1040,7 @@ The `nodejs` module shows the currently installed version of NodeJS. El módulo symbol = "🤖 " ``` -## Versión del paquete +## Package Version 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`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` packages. @@ -1068,7 +1104,7 @@ symbol = "🐪 " The `php` module shows the currently installed version of PHP. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- El directorio actual contiene un fichero `composer.json` +- The current directory contains a `composer.json` file - The current directory contains a `.php-version` file - The current directory contains a `.php` file @@ -1098,12 +1134,12 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name El módulo se muestra si algunas de las siguientes condiciones se cumplen: - The current directory contains a `.python-version` file -- El directorio actual contiene un fichero `requirements.txt` -- El directorio actual contiene un fichero `pyproject.toml` +- The current directory contains a `requirements.txt` file +- The current directory contains a `pyproject.toml` file - The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true) - The current directory contains a `Pipfile` file -- El directorio actual contiene un fichero `tox.ini` -- El directorio actual contiene un fichero `setup.py` +- The current directory contains a `tox.ini` file +- The current directory contains a `setup.py` file - The current directory contains a `__init__.py` file - A virtual environment is currently activated @@ -1227,7 +1263,7 @@ The `terraform` module shows the currently selected terraform workspace and vers symbol = "🏎💨 " ``` -## Hora +## Time 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. @@ -1241,11 +1277,12 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Variable | Por defecto | Descripción | | ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------- | -| `use_12hr` | `false` | Enables 12 hour formatting | +| `use_12hr` | `false` | Enables 12 hour formatting. | | `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 | +| `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 `format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `format` will override the `use_12hr` setting. @@ -1258,9 +1295,10 @@ If `use_12hr` is `true`, then `format` defaults to `"%r"`. Otherwise, it default disabled = false format = "🕙[ %T ]" utc_time_offset = "-5" +time_range = "10:00:00-14:00:00" ``` -## Nombre de usuario +## Username The `username` module shows active user's username. El módulo se muestra si algunas de las siguientes condiciones se cumplen: @@ -1311,7 +1349,7 @@ The `zig` module shows the currently installed version of Zig. El módulo se mue symbol = "⚡️ " ``` -## Comandos personalizados +## Custom commands The `custom` modules show the output of some arbitrary commands. @@ -1339,8 +1377,8 @@ The order in which custom modules are shown can be individually set by setting ` | ------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------- | | `command` | | The command whose output should be printed. | | `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` | | The path to the shell to use to execute the command. If unset, it will fallback to STARSHIP_SHELL and then to "sh". | -| `descripción` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. | +| `shell` | | [See below](#custom-command-shell) | +| `description` | `"<custom module>"` | 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. | @@ -1350,6 +1388,32 @@ The order in which custom modules are shown can be individually set by setting ` | `suffix` | `""` | Suffix to display immediately after the command output. | | `disabled` | `false` | Disables this `custom` module. | +#### Custom command shell + +`shell` accepts a non-empty list of strings, where: +- The first string is the path to the shell to use to execute the command. +- Other following arguments are passed to the shell. + +If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows. + +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 Make sure your custom shell configuration exits gracefully + +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). + +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. + +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. + +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. + +::: + ### Ejemplo ```toml @@ -1360,6 +1424,12 @@ command = "echo foo" # shows output of command files = ["foo"] # can specify filters when = """ test "$HOME" == "$PWD" """ prefix = " transcending " + +[custom.time] +command = "time /T" +files = ["*.pst"] +prefix = "transcending " +shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` ## PureScript |