From bea79619e06b22d9c819820d11c277cd88f0031d Mon Sep 17 00:00:00 2001 From: Matan Kushner Date: Tue, 26 Jan 2021 17:07:13 -0500 Subject: [PATCH] docs(i18n): New Crowdin updates (#2108) --- docs/ar-SA/config/README.md | 383 ++-- docs/ar-SA/guide/README.md | 2 +- docs/ckb-IR/README.md | 112 + docs/ckb-IR/advanced-config/README.md | 93 + docs/ckb-IR/config/README.md | 2518 +++++++++++++++++++++ docs/ckb-IR/faq/README.md | 92 + docs/ckb-IR/guide/README.md | 267 +++ docs/ckb-IR/installing/README.md | 46 + docs/ckb-IR/migrating-to-0.45.0/README.md | 267 +++ docs/ckb-IR/presets/README.md | 89 + docs/de-DE/config/README.md | 383 ++-- docs/de-DE/guide/README.md | 2 +- docs/es-ES/config/README.md | 459 ++-- docs/es-ES/faq/README.md | 4 +- docs/es-ES/guide/README.md | 6 +- docs/es-ES/installing/README.md | 34 +- docs/fr-FR/advanced-config/README.md | 4 +- docs/fr-FR/config/README.md | 407 ++-- docs/fr-FR/faq/README.md | 2 +- docs/fr-FR/guide/README.md | 4 +- docs/fr-FR/installing/README.md | 30 +- docs/it-IT/config/README.md | 383 ++-- docs/it-IT/guide/README.md | 2 +- docs/ja-JP/config/README.md | 399 ++-- docs/ja-JP/guide/README.md | 2 +- docs/ko-KR/README.md | 4 +- docs/ko-KR/config/README.md | 383 ++-- docs/ko-KR/guide/README.md | 46 +- docs/nl-NL/config/README.md | 383 ++-- docs/nl-NL/guide/README.md | 2 +- docs/pl-PL/config/README.md | 383 ++-- docs/pl-PL/guide/README.md | 2 +- docs/pt-BR/config/README.md | 383 ++-- docs/pt-BR/guide/README.md | 2 +- docs/pt-PT/config/README.md | 383 ++-- docs/pt-PT/guide/README.md | 2 +- docs/ru-RU/config/README.md | 383 ++-- docs/ru-RU/guide/README.md | 2 +- docs/tr-TR/config/README.md | 383 ++-- docs/tr-TR/guide/README.md | 2 +- docs/vi-VN/README.md | 112 + docs/vi-VN/advanced-config/README.md | 93 + docs/vi-VN/config/README.md | 2518 +++++++++++++++++++++ docs/vi-VN/faq/README.md | 92 + docs/vi-VN/guide/README.md | 267 +++ docs/vi-VN/installing/README.md | 46 + docs/vi-VN/migrating-to-0.45.0/README.md | 267 +++ docs/vi-VN/presets/README.md | 89 + docs/zh-CN/advanced-config/README.md | 6 +- docs/zh-CN/config/README.md | 383 ++-- docs/zh-CN/guide/README.md | 2 +- docs/zh-TW/config/README.md | 389 ++-- docs/zh-TW/guide/README.md | 2 +- 53 files changed, 10051 insertions(+), 2948 deletions(-) create mode 100644 docs/ckb-IR/README.md create mode 100644 docs/ckb-IR/advanced-config/README.md create mode 100644 docs/ckb-IR/config/README.md create mode 100644 docs/ckb-IR/faq/README.md create mode 100644 docs/ckb-IR/guide/README.md create mode 100644 docs/ckb-IR/installing/README.md create mode 100644 docs/ckb-IR/migrating-to-0.45.0/README.md create mode 100644 docs/ckb-IR/presets/README.md create mode 100644 docs/vi-VN/README.md create mode 100644 docs/vi-VN/advanced-config/README.md create mode 100644 docs/vi-VN/config/README.md create mode 100644 docs/vi-VN/faq/README.md create mode 100644 docs/vi-VN/guide/README.md create mode 100644 docs/vi-VN/installing/README.md create mode 100644 docs/vi-VN/migrating-to-0.45.0/README.md create mode 100644 docs/vi-VN/presets/README.md diff --git a/docs/ar-SA/config/README.md b/docs/ar-SA/config/README.md index c9970753c..984ef22d4 100644 --- a/docs/ar-SA/config/README.md +++ b/docs/ar-SA/config/README.md @@ -29,7 +29,7 @@ export STARSHIP_CONFIG=~/.starship Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -43,7 +43,7 @@ export STARSHIP_CACHE=~/.starship/cache Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -427,12 +427,12 @@ The `cmake` module shows the currently installed version of CMake if any of the ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `cmake` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | -------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -542,12 +542,12 @@ The `crystal` module shows the currently installed version of Crystal. The modul ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | --------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `style` | `"bold red"` | The style for the module. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `crystal` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables @@ -578,12 +578,12 @@ The `dart` module shows the currently installed version of Dart. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `dart` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -624,6 +624,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
This module has a few advanced configuration options that control how the directory is displayed. @@ -671,13 +672,13 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Options -| Option | Default | Description | -| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `style` | `"blue bold"` | The style for the module. | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | Disables the `docker_context` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -722,13 +723,13 @@ The module will also show the Target Framework Moniker ( "` | The symbol used before displaying the version of PureScript. | -| `style` | `"bold white"` | The style for the module. | -| `disabled` | `false` | Disables the `purescript` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -1958,16 +1959,16 @@ The module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the 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 | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | Default | Description | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the 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 | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2016,12 +2017,12 @@ The `ruby` module shows the currently installed version of Ruby. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `ruby` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -2051,12 +2052,12 @@ The `rust` module shows the currently installed version of Rust. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `rust` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -2157,18 +2158,18 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ----------------------- | -------------------------- | ---------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `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"` | The style for the module. | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `disabled` | `true` | Disables the `status` module. | +| Option | Default | Description | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables @@ -2209,12 +2210,12 @@ The `swift` module shows the currently installed version of Swift. The module wi ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `style` | `"bold 202"` | The style for the module. | -| `disabled` | `false` | Disables the `swift` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -2237,7 +2238,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). The module will be shown if any of the following conditions are met: +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +The module will be shown if any of the following conditions are met: - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2381,12 +2390,12 @@ The `zig` module shows the currently installed version of Zig. The module will b ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------------- | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | The style for the module. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `zig` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | ### Variables @@ -2438,19 +2447,19 @@ The order in which custom modules are shown can be individually set by including ### Options -| Option | Default | Description | -| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `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"` | The style for the module. | -| `format` | `"[$symbol$output]($style) "` | The format for the module. | -| `disabled` | `false` | Disables this `custom` module. | +| Option | Default | Description | +| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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"` | The style for the module. | +| `format` | `"[$symbol($output )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables this `custom` module. | ### Variables diff --git a/docs/ar-SA/guide/README.md b/docs/ar-SA/guide/README.md index 9f33e569c..c53391a57 100644 --- a/docs/ar-SA/guide/README.md +++ b/docs/ar-SA/guide/README.md @@ -196,7 +196,7 @@ Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. - ```sh + ```powershell Invoke-Expression (&starship init powershell) ``` diff --git a/docs/ckb-IR/README.md b/docs/ckb-IR/README.md new file mode 100644 index 000000000..4767ca0b1 --- /dev/null +++ b/docs/ckb-IR/README.md @@ -0,0 +1,112 @@ +--- +home: true +heroImage: /logo.svg +heroText: +tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell! +actionText: Get Started → +actionLink: ./guide/ +features: + - + title: Compatibility First + details: Works on the most common shells on the most common operating systems. Use it everywhere! + - + title: Rust-Powered + details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible. + - + title: Customizable + details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be. +footer: ISC Licensed | Copyright © 2019-present Starship Contributors +#Used for the description meta tag, for SEO +metaTitle: "Starship: Cross-Shell Prompt" +description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell. +--- + +
+ +
+ +### Quick Install + +1. Install the **starship** binary: + + + #### Install Latest Version + + With Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + #### Install via Package Manager + + With [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + With [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Add the init script to your shell's config file: + + + #### Bash + + Add the following to the end of `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Add the following to the end of `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Add the following to the end of `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### Powershell + + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Add the following to the end of `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` diff --git a/docs/ckb-IR/advanced-config/README.md b/docs/ckb-IR/advanced-config/README.md new file mode 100644 index 000000000..1cf6ebb78 --- /dev/null +++ b/docs/ckb-IR/advanced-config/README.md @@ -0,0 +1,93 @@ +# Advanced Configuration + +While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship. + +::: warning + +The configurations in this section are subject to change in future releases of Starship. + +::: + +## Custom pre-prompt and pre-execution Commands in Bash + +Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do + +```bash +function blastoff(){ + echo "🚀" +} +starship_precmd_user_func="blastoff" +``` + +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. + +```bash +function blastoff(){ + echo "🚀" +} +trap blastoff DEBUG # Trap DEBUG *before* running starship +eval $(starship init bash) +``` + +## Change Window Title + +Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`. + +First, define a window title change function (identical in bash and zsh): + +```bash +function set_win_title(){ + echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" +} +``` + +You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). + +In `bash`, set this function to be the precmd starship function: + +```bash +starship_precmd_user_func="set_win_title" +``` + +In `zsh`, add this to the `precmd_functions` array: + +```bash +precmd_functions+=(set_win_title) +``` + +If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. + +For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: + +```bash +function set_win_title(){ + echo -ne "\033]0; $(basename $PWD) \007" +} +starship_precmd_user_func="set_win_title" +``` + +## Style Strings + +Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: + + - `bold` + - `underline` + - `dimmed` + - `bg:` + - `fg:` + - `` + - `none` + +where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing , though this may change in the future. The order of words in the string does not matter. + +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. + +A color specifier can be one of the following: + + - 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`). + - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). + - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). + +If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/ckb-IR/config/README.md b/docs/ckb-IR/config/README.md new file mode 100644 index 000000000..984ef22d4 --- /dev/null +++ b/docs/ckb-IR/config/README.md @@ -0,0 +1,2518 @@ +# Configuration + +To get started configuring starship, create the following file: `~/.config/starship.toml`. + +```sh +mkdir -p ~/.config && touch ~/.config/starship.toml +``` + +All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file: + +```toml +# Don't print a new line at the start of the prompt +add_newline = false + +# 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" + +# Disable the package module, hiding it from the prompt completely +[package] +disabled = true +``` + +You can change default `starship.toml` file location with `STARSHIP_CONFIG` environment variable: + +```sh +export STARSHIP_CONFIG=~/.starship +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```powershell +$ENV:STARSHIP_CONFIG = "$HOME\.starship" +``` + +### Logging + +By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: + +```sh +export STARSHIP_CACHE=~/.starship/cache +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```powershell +$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" +``` + +### Terminology + +**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project. + +**Variable**: Smaller sub-components that contain information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of NodeJS. + +By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. + +### Format Strings + +Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. + +#### Variable + +A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`. + +For example: + +- `$version` is a format string with a variable named `version`. +- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`. +- `$git_branch $git_commit` has the two variables separated with a space. + +#### Text Group + +A text group is made up of two different parts. + +The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. + +In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part. + +For example: + +- `[on](red bold)` will print a string `on` with bold text colored red. +- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. + +#### Style Strings + +Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). + +- `"fg:green bg:blue"` sets green text on a blue background +- `"bg:blue fg:bright-green"` sets bright green text on a blue background +- `"bold fg:27"` sets bold text with [ANSI color](https://i.stack.imgur.com/KTSQa.png) 27 +- `"underline bg:#bf5700"` sets underlined text on a burnt orange background +- `"bold italic fg:purple"` sets bold italic purple text +- `""` explicitly disables all styling + +Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. + +#### Conditional Format Strings + +A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. + +For example: + +- `(@$region)` will show nothing if the variable `region` is `None`, otherwise `@` followed by the value of region. +- `(some text)` will always show nothing since there are no variables wrapped in the braces. +- When `$all` is a shortcut for `\[$a$b\]`, `($all)` will show nothing only if `$a` and `$b` are both `None`. This works the same as `(\[$a$b\] )`. + +#### Escapable characters + +The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`). + +- \$ +- \\ +- [ +- ] +- ( +- ) + +Note that `toml` has [its own escape syntax](https://github.com/toml-lang/toml#user-content-string). It is recommended to use a literal string (`''`) in your config. If you want to use a basic string (`""`), pay attention to escape the backslash `\`. + +For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: + +```toml +# with basic string +format = "\n\\$" + +# with multiline basic string +format = """ + +\\$""" + +# with literal string +format = ''' + +\$''' +``` + +## Prompt + +This is the list of prompt-wide configuration options. + +### Options + +| Option | Default | Description | +| -------------- | ------------------------------ | ----------------------------------------------------- | +| `format` | [link](#default-prompt-format) | Configure the format of the prompt. | +| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | +| `add_newline` | `true` | Add a new line before the start of the prompt. | + +### Example + +```toml +# ~/.config/starship.toml + +# Use custom format +format = """ +[┌───────────────────>](bold green) +[│](bold green)$directory$rust$package +[└─>](bold green) """ + +# Wait 10 milliseconds for starship to check files under the current directory. +scan_timeout = 10 + +# Disable the newline at the start of the prompt +add_newline = false +``` + +### Default Prompt Format + +The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown: + +```toml +format = "$all" + +# Which is equivalent to +format = """ +$username\ +$hostname\ +$shlvl\ +$kubernetes\ +$directory\ +$git_branch\ +$git_commit\ +$git_state\ +$git_status\ +$hg_branch\ +$docker_context\ +$package\ +$cmake\ +$dart\ +$dotnet\ +$elixir\ +$elm\ +$erlang\ +$golang\ +$helm\ +$java\ +$julia\ +$kotlin\ +$nim\ +$nodejs\ +$ocaml\ +$perl\ +$php\ +$purescript\ +$python\ +$ruby\ +$rust\ +$swift\ +$terraform\ +$zig\ +$nix_shell\ +$conda\ +$memory_usage\ +$aws\ +$gcloud\ +$openstack\ +$env_var\ +$crystal\ +$custom\ +$cmd_duration\ +$line_break\ +$lua\ +$jobs\ +$battery\ +$time\ +$status\ +$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. + +When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `AWS` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------ | +| region | `ap-northeast-1` | The current AWS region | +| profile | `astronauts` | The current AWS profile | +| 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 + +### Examples + +#### Display everything + +```toml +# ~/.config/starship.toml + +[aws] +format = 'on [$symbol$profile(\($region\))]($style) ' +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display region + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$region]($style) " +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display profile + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$profile]($style) " +style = "bold blue" +symbol = "🅰 " +``` + +## Battery + +The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. + +### Options + +| Option | Default | Description | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `full_symbol` | `""` | The symbol shown when the battery is full. | +| `charging_symbol` | `""` | The symbol shown when the battery is charging. | +| `discharging_symbol` | `""` | The symbol shown when the battery is discharging. | +| `unknown_symbol` | `""` | The symbol shown when the battery state is unknown. | +| `empty_symbol` | `""` | The symbol shown when the battery state is empty. | +| `format` | `"[$symbol$percentage]($style) "` | The format for the module. | +| `display` | [link](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | + + +### Example + +```toml +# ~/.config/starship.toml + +[battery] +full_symbol = "🔋" +charging_symbol = "⚡️" +discharging_symbol = "💀" +``` + +### Battery Display + +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. The default is as shown: + +```toml +[[battery.display]] +threshold = 10 +style = "bold red" +``` + +#### Options + +The `display` option is an array of the following table. + +| Option | Description | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | + +#### Example + +```toml +[[battery.display]] # "bold red" style when capacity is between 0% and 10% +threshold = 10 +style = "bold red" + +[[battery.display]] # "bold yellow" style when capacity is between 10% and 30% +threshold = 30 +style = "bold yellow" + +# when capacity is over 30%, the battery indicator will not be displayed + +``` + +## Character + +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. + +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 (`❯`/`✖`) + +By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape). + +### Options + +| Option | Default | Description | +| ---------------- | ------------------- | -------------------------------------------------------------------------------- | +| `format` | `"$symbol "` | The format string used before the text input. | +| `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. | +| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | +| `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | +| `disabled` | `false` | Disables the `character` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------- | --------------------------------------------------------------------- | +| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | + +### Examples + +#### With custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[✗](bold red) " +``` + +#### Without custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[➜](bold red) " +``` + +#### With custom vim shape + +```toml +# ~/.config/starship.toml + +[character] +vicmd_symbol = "[V](bold green) " +``` + +## CMake + +The `cmake` module shows the currently installed version of CMake if any of the following conditions are met: + +- The current directory contains a `CMakeLists.txt` file +- The current directory contains a `CMakeCache.txt` file + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | -------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v3.17.3` | The version of cmake | +| 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 + +## Command Duration + +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 Do not hook the DEBUG trap in Bash + +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 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 + +| Option | Default | Description | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | + +::: tip + +Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. + +::: + +### Variables + +| Variable | Example | Description | +| --------- | -------- | --------------------------------------- | +| duration | `16m40s` | The time it took to execute the command | +| 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 + +[cmd_duration] +min_time = 500 +format = "underwent [$duration](bold yellow)" +``` + +## Conda + +The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set. + +::: tip + +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. + +::: + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | The style for the module. | +| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Disables the `conda` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------------ | ------------------------------------ | +| environment | `astronauts` | The current conda environment | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[conda] +format = "[$symbol$environment](dimmed green) " +``` + +## Crystal + +The `crystal` module shows the currently installed version of Crystal. The module will be shown if any of the following conditions are met: + +- The current directory contains a `shard.yml` file +- The current directory contains a `.cr` file + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.32.1` | The version of `crystal` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[crystal] +format = "via [✨ $version](bold blue) " +``` + +## Dart + +The `dart` module shows the currently installed version of Dart. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.dart` extension +- The current directory contains a `.dart_tool` directory +- The current directory contains a `pubspec.yaml` or `pubspec.lock` file + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.8.4` | The version of `dart` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dart] +format = "via [🔰 $version](bold red) " +``` + +## Directory + +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. + +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 | 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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. | + +
+This module has a few advanced configuration options that control how the directory is displayed. + +| Advanced Option | Default | Description | +| --------------------------- | ------- | ---------------------------------------------------------------------------------------- | +| `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`. + +
+ +### Variables + +| Variable | Example | Description | +| --------- | --------------------- | ----------------------------------- | +| path | `"D:/Projects"` | The current directory path | +| style\* | `"black bold dimmed"` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[directory] +truncation_length = 8 +truncation_symbol = "…/" +``` + +## Docker Context + +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`. + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | Disables the `docker_context` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------- | ------------------------------------ | +| context | `test_context` | The current docker context | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[docker_context] +format = "via [🐋 $context](blue bold)" +``` + +## Dotnet + +The `dotnet` module shows the relevant version of the .NET Core SDK 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. + +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` +- `Directory.Build.props` +- `Directory.Build.targets` +- `Packages.props` +- `*.sln` +- `*.csproj` +- `*.fsproj` +- `*.xproj` + +You'll also need the .NET Core SDK installed in order to use it correctly. + +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. + +### Options + +| Option | Default | Description | +| ----------- | ----------------------------------------- | -------------------------------------------------------- | +| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. | +| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dotnet` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------------------------------------ | +| version | `v3.1.201` | The version of `dotnet` sdk | +| tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[dotnet] +symbol = "🥅 " +style = "green" +heuristic = false +``` + +## Elixir + +The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `mix.exs` file. + +### Options + +| Option | Default | Description | +| ---------- | ----------------------------------------------------------- | --------------------------------------------------------------- | +| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | +| `style` | `"bold purple"` | The style for the module. | +| `format` | `'via [$symbol($version \(OTP $otp_version\) )]($style)'` | The format for the module elixir. | +| `disabled` | `false` | Disables the `elixir` module. | + +### Variables + +| Variable | Example | Description | +| ----------- | ------- | ------------------------------------ | +| version | `v1.10` | The version of `elixir` | +| otp_version | | The otp version of `elixir` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elixir] +symbol = "🔮 " +``` + +## Elm + +The `elm` module shows the currently installed version of Elm. The module will be shown if any of the following conditions are met: + +- The current directory contains a `elm.json` file +- The current directory contains a `elm-package.json` file +- The current directory contains a `.elm-version` file +- The current directory contains a `elm-stuff` folder +- The current directory contains a `*.elm` files + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. | +| `style` | `"cyan bold"` | The style for the module. | +| `disabled` | `false` | Disables the `elm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v0.19.1` | The version of `elm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[elm] +format = "via [ $version](cyan bold) " +``` + +## Environment Variable + +The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met: + +- The `variable` configuration option matches an existing environment variable +- The `variable` configuration option is not defined, but the `default` configuration option is + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------ | ---------------------------------------------------------------------------- | +| `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 + +| Variable | Example | Description | +| --------- | ------------------------------------------- | ------------------------------------------ | +| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | `black bold dimmed` | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[env_var] +variable = "SHELL" +default = "unknown shell" +``` + +## Erlang + +The `erlang` module shows the currently installed version of Erlang/OTP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `rebar.config` file. +- The current directory contains a `erlang.mk` file. + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | -------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before displaying the version of erlang. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `erlang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v22.1.3` | The version of `erlang` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[erlang] +format = "via [e $version](bold red) " +``` + +## Gcloud + +The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$account(\($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. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | ------------------------------------------------------------------ | +| region | `us-central1` | The current GCP region | +| account | `foo@example.com` | The current GCP profile | +| project | | The current GCP project | +| 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` | + +\*: This variable can only be used as a part of a style string + +### Examples + +#### Display account and project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(\($project\))]($style) ' +``` + +#### Display active config name only + +```toml +# ~/.config/starship.toml + +[gcloud] +format = "[$symbol$active]($style) " +style = "bold yellow" +``` + +#### Display account and aliased region + +```toml +# ~/.config/starship.toml + +[gcloud] +symbol = "️🇬️ " +[gcloud.region_aliases] +us-central1 = "uc1" +asia-northeast1 = "an1" +``` + +## Git Branch + +The `git_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | +| `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) "` | The format for the module. Use `"$branch"` to refer to the current branch name. | +| `symbol` | `" "` | A format string representing the symbol of git branch. | +| `style` | `"bold purple"` | The style for the module. | +| `truncation_length` | `2^63 - 1` | Truncates a git branch to X 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 | Example | Description | +| ------------- | -------- | ---------------------------------------------------------------------------------------------------- | +| 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 | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[git_branch] +symbol = "🌱 " +truncation_length = 4 +truncation_symbol = "" +``` + +## Git Commit + +The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory. + +### Options + +| Option | Default | Description | +| -------------------- | ------------------------------------------------------ | ----------------------------------------------------- | +| `commit_hash_length` | `7` | The length of the displayed git commit hash. | +| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. | +| `style` | `"bold green"` | The style for the module. | +| `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 | Example | Description | +| --------- | --------- | ----------------------------------- | +| hash | `b703eb3` | The current git commit hash | +| 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 + +[git_commit] +commit_hash_length = 4 +tag_symbol = "🔖 " +``` + +## Git State + +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. + +### Options + +| Option | Default | Description | +| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `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"` | The style for the module. | +| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. | +| `disabled` | `false` | Disables the `git_state` module. | + +### Variables + +| Variable | Example | Description | +| ---------------- | ---------- | ----------------------------------- | +| state | `REBASING` | The current state of the repo | +| progress_current | `1` | The current operation progress | +| progress_total | `2` | The total operation progress | +| 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 + +[git_state] +format = '[\($state( $progress_current of $progress_total)\)]($style) ' +cherry_pick = "[🍒 PICKING](bold red)" +``` + +## Git Status + +The `git_status` module shows symbols representing the state of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------ | ----------------------------------------------- | ----------------------------------- | +| `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` | +| `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"` | The style for the module. | +| `disabled` | `false` | Disables the `git_status` module. | + +### Variables + +The following variables can be used in `format`: + +| Variable | Description | +| -------------- | --------------------------------------------------------------------------------------------- | +| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` | +| `ahead_behind` | Displays `diverged` `ahead` or `behind` 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\* | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +The following variables can be used in `diverged`: + +| Variable | Description | +| -------------- | ---------------------------------------------- | +| `ahead_count` | Number of commits ahead of the tracking branch | +| `behind_count` | Number of commits behind the tracking branch | + +The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`: + +| Variable | Description | +| -------- | ------------------------ | +| `count` | Show the number of files | + +### Example + +```toml +# ~/.config/starship.toml + +[git_status] +conflicted = "🏳" +ahead = "🏎💨" +behind = "😰" +diverged = "😵" +untracked = "🤷‍" +stashed = "📦" +modified = "📝" +staged = '[++\($count\)](green)' +renamed = "👅" +deleted = "🗑" +``` + +Show ahead/behind count of the branch being tracked + +```toml +# ~/.config/starship.toml + +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +## Golang + +The `golang` module shows the currently installed version of Golang. The module will be shown if any of the following conditions are met: + +- The current directory contains a `go.mod` file +- The current directory contains a `go.sum` file +- The current directory contains a `glide.yaml` file +- The current directory contains a `Gopkg.yml` file +- The current directory contains a `Gopkg.lock` file +- The current directory contains a `.go-version` file +- The current directory contains a `Godeps` directory +- The current directory contains a file with the `.go` extension + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ---------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🐹 "` | A format string representing the symbol of Go. | +| `style` | `"bold cyan"` | The style for the module. | +| `disabled` | `false` | Disables the `golang` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.12.1` | The version of `go` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[golang] +format = "via [🏎💨 $version](bold cyan) " +``` + +## Helm + +The `helm` module shows the currently installed version of Helm. The module will be shown if any of the following conditions are met: + +- The current directory contains a `helmfile.yaml` file +- The current directory contains a `Chart.yaml` file + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `helm` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v3.1.1` | The version of `helm` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[helm] +format = "via [⎈ $version](bold white) " +``` + +## Hostname + +The `hostname` module shows the system hostname. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `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 "` | The format for the module. | +| `style` | `"bold dimmed green"` | The style for the module. | +| `disabled` | `false` | Disables the `hostname` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +format = "on [$hostname](bold red) " +trim_at = ".companyname.com" +disabled = false +``` + +## Java + +The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met: + +- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file +- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------------- | ----------------------------------------------- | +| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | +| `symbol` | `"☕ "` | A format string representing the symbol of Java | +| `style` | `"red dimmed"` | The style for the module. | +| `disabled` | `false` | Disables the `java` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| version | `v14` | The version of `java` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[java] +symbol = "🌟 " +``` + +## Jobs + +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 is more than 1 job, or more than the `threshold` config value, if it exists. + +### Options + +| Option | Default | Description | +| ----------- | ----------------------------- | ------------------------------------------------ | +| `threshold` | `1` | Show number of jobs if exceeded. | +| `format` | `"[$symbol$number]($style) "` | The format for the module. | +| `symbol` | `"✦"` | A format string representing the number of jobs. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `jobs` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| number | `1` | The number of jobs | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[jobs] +symbol = "+ " +threshold = 4 +``` + +## Julia + +The `julia` module shows the currently installed version of Julia. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Project.toml` file +- The current directory contains a `Manifest.toml` file +- The current directory contains a file with the `.jl` extension + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | +| `style` | `"bold purple"` | The style for the module. | +| `disabled` | `false` | Disables the `julia` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.4.0` | The version of `julia` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[julia] +symbol = "∴ " +``` + +## Kotlin + +The `kotlin` module shows the currently installed version of Kotlin. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.kt` or a `.kts` file + +### Options + +| Option | Default | Description | +| --------------- | ------------------------------------ | ----------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | +| `style` | `"bold blue"` | The style for the module. | +| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `kotlin` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v1.4.21` | The version of `kotlin` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[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 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`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | +| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | +| `style` | `"cyan bold"` | The style for the module. | +| `context_aliases` | | Table of context aliases to display. | +| `disabled` | `true` | Disables the `kubernetes` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------------------- | ---------------------------------------- | +| context | `starship-cluster` | The current kubernetes context | +| namespace | `starship-namespace` | If set, the current kubernetes namespace | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[kubernetes] +format = 'on [⛵ $context \($namespace\)](dimmed green) ' +disabled = false +[kubernetes.context_aliases] +"dev.local.cluster.k8s" = "dev" +``` + +## Line Break + +The `line_break` module separates the prompt into two lines. + +### Options + +| Option | Default | Description | +| ---------- | ------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | + +### Example + +```toml +# ~/.config/starship.toml + +[line_break] +disabled = true +``` + +## Lua + +The `lua` module shows the currently installed version of Lua. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.lua-version` file +- The current directory contains a `lua` directory +- The current directory contains a file with the `.lua` extension + +### Options + +| Option | Default | Description | +| ------------ | ------------------------------------ | -------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | +| `style` | `"bold blue"` | The style for the module. | +| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `lua` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.4.0` | The version of `lua` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[lua] +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 + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------- | --------------------------------------------- | -------------------------------------------------------- | +| `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"` | The style for the module. | +| `disabled` | `true` | Disables the `memory_usage` module. | + +### Variables + +| Variable | Example | 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 | `🐏` | 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 \*\*: The SWAP file information is only displayed if detected on the current system + +### Example + +```toml +# ~/.config/starship.toml + +[memory_usage] +disabled = false +threshold = -1 +symbol = " " +style = "bold dimmed green" +``` + +## Mercurial Branch + +The `hg_branch` module shows the active branch of the repo in your current directory. + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `style` | `"bold purple"` | The style for the module. | +| `format` | `"on [$symbol$branch]($style) "` | The format for the module. | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to X graphemes | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| branch | `master` | The active mercurial branch | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[hg_branch] +format = "on [🌱 $branch](bold purple)" +truncation_length = 4 +truncation_symbol = "" +``` + +## Nim + +The `nim` module shows the currently installed version of Nim. The module will be shown if any of the following conditions are met: + +- 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 + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module | +| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `nim` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.2.0` | The version of `nimc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[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. + +### Options + +| Option | Default | Description | +| ------------ | ---------------------------------------------- | ----------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | +| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | +| `style` | `"bold blue"` | The style for the 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 + +| Variable | Example | 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 + +### Example + +```toml +# ~/.config/starship.toml + +[nix_shell] +disabled = true +impure_msg = "[impure shell](bold red)" +pure_msg = "[pure shell](bold green)" +format = 'via [☃️ $state( \($name\))](bold blue) ' +``` + +## NodeJS + +The `nodejs` module shows the currently installed version of NodeJS. The module will be shown if any of the following conditions are met: + +- 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`, `.mjs` or `.cjs` extension +- The current directory contains a file with the `.ts` extension + +### Options + +| Option | Default | Description | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `style` | `"bold green"` | The style for the module. | +| `disabled` | `false` | Disables the `nodejs` module. | +| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. | + +###  Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v13.12.0` | The version of `node` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[nodejs] +format = "via [🤖 $version](bold green) " +``` + +## OCaml + +The `ocaml` module shows the currently installed version of OCaml. The module will be shown if any of the following conditions are met: + +- The current directory contains a file with `.opam` extension or `_opam` directory +- The current directory contains a `esy.lock` directory +- The current directory contains a `dune` or `dune-project` file +- The current directory contains a `jbuild` or `jbuild-ignore` file +- The current directory contains a `.merlin` file +- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | +| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `ocaml` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v4.10.0` | The version of `ocaml` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ocaml] +format = "via [🐪 $version]($style) " +``` + +## OpenStack + +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. + +### Options + +| Option | Default | Description | +| ---------- | --------------------------------------------------- | -------------------------------------------------------------- | +| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `OpenStack` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| cloud | `corp` | The current OpenStack cloud | +| project | `dev` | The current OpenStack project | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[openstack] +format = "on [$symbol$cloud(\\($project\\))]($style) " +style = "bold yellow" +symbol = "☁️ " +``` + +## 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`, `mix` and `helm` packages. + +- **npm** – The `npm` package version is extracted from the `package.json` present in the current directory +- **cargo** – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory +- **poetry** – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory +- **composer** – The `composer` package version is extracted from the `composer.json` present in the current directory +- **gradle** – The `gradle` package version is extracted from the `build.gradle` present +- **julia** - The package version is extracted from the `Project.toml` present +- **mix** - The `mix` package version is extracted from the `mix.exs` present +- **helm** - The `helm` chart version is extracted from the `Chart.yaml` present +- **maven** - The `maven` package version is extracted from the `pom.xml` present +- **meson** - The `meson` package version is extracted from the `meson.build` present + +> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. + +### Options + +| Option | Default | Description | +| ----------------- | --------------------------------- | ---------------------------------------------------------- | +| `format` | `"is [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `style` | `"bold 208"` | The style for the module. | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v1.0.0` | The version of your package | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[package] +format = "via [🎁 $version](208 bold) " +``` + +## Perl + +The `perl` module shows the currently installed version of Perl. The module will be shown if any of the following conditions are met: + +- The current directory contains a `Makefile.PL` or `Build.PL` file +- The current directory contains a `cpanfile` or `cpanfile.snapshot` file +- The current directory contains a `META.json` file or `META.yml` file +- The current directory contains a `.perl-version` file +- The current directory contains a `.pl`, `.pm` or `.pod` + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | +| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | +| `style` | `"bold 149"` | The style for the module. | +| `disabled` | `false` | Disables the `perl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v5.26.1` | The version of `perl` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +### Example + +```toml +# ~/.config/starship.toml + +[perl] +format = "via [🦪 $version]($style) " +``` + +## PHP + +The `php` module shows the currently installed version of PHP. The module will be shown if any of the following conditions are met: + +- The current directory contains a `composer.json` file +- The current directory contains a `.php-version` file +- The current directory contains a `.php` file + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `style` | `"147 bold"` | The style for the module. | +| `disabled` | `false` | Disables the `php` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v7.3.8` | The version of `php` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[php] +format = "via [🔹 $version](147 bold) " +``` + +## PureScript + +The `purescript` module shows the currently installed version of PureScript version. The module will be shown if any of the following conditions are met: + +- The current directory contains a `spago.dhall` file +- The current directory contains a \*.purs files + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `0.13.5` | The version of `purescript` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[purescript] +format = "via [$symbol$version](bold white)" +``` + +## Python + +The `python` module shows the currently installed version of Python and the current Python virtual environment 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`. + +The module will be shown if any of the following conditions are met: + +- The current directory contains a `.python-version` file +- 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 +- 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 + +### Options + +| Option | Default | Description | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the 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 | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: 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. + +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 | Example | Description | +| ------------ | --------------- | ------------------------------------------ | +| version | `"v3.8.1"` | The version of `python` | +| symbol | `"🐍 "` | Mirrors the value of option `symbol` | +| style | `"yellow bold"` | Mirrors the value of option `style` | +| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `"venv"` | The current `virtualenv` name | + + +### Example + +```toml +# ~/.config/starship.toml + +[python] +symbol = "👾 " +pyenv_version_name = true +``` + +```toml +# ~/.config/starship.toml + +[python] +# Only use the `python3` binary to get the version. +python_binary = "python3" +``` + +## Ruby + +The `ruby` module shows the currently installed version of Ruby. 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 +- The current directory contains a `.rb` file + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v2.5.1` | The version of `ruby` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[ruby] +symbol = "🔺 " +``` + +## Rust + +The `rust` module shows the currently installed version of Rust. 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 + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ----------------- | ------------------------------------ | +| version | `v1.43.0-nightly` | The version of `rustc` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[rust] +format = "via [⚙️ $version](red bold)" +``` + +## SHLVL + +The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. + +### Options + +| Option | Default | Description | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `true` | Disables the `shlvl` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------- | ------------------------------------ | +| shlvl | `3` | The current value of SHLVL | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[shlvl] +disabled = false +format = "$shlvl level(s) down" +threshold = 3 +``` + +## Singularity + +The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set. + +### Options + +| Option | Default | Description | +| ---------- | -------------------------------- | ------------------------------------------------ | +| `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | +| `symbol` | `""` | A format string displayed before the image name. | +| `style` | `"bold dimmed blue"` | The style for the module. | +| `disabled` | `false` | Disables the `singularity` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ------------ | ------------------------------------ | +| env | `centos.img` | The current singularity image | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[singularity] +format = '[📦 \[$env\]]($style) ' +``` + +## Status + +The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | Description | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | + +### Variables + +| Variable | Example | Description | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| 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 | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml + +# ~/.config/starship.toml + +[status] +style = "bg:blue" +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true +disabled = false + +``` + +## Swift + +The `swift` module shows the currently installed version of Swift. 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 + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v5.2.4` | The version of `swift` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[swift] +format = "via [🏎 $version](red bold)" +``` + +## Terraform + +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +The module will be shown if any of the following conditions are met: + +- The current directory contains a `.terraform` folder +- Current directory contains a file with the `.tf` or `.hcl` extensions + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | +| `symbol` | `"💠 "` | A format string shown before the terraform workspace. | +| `style` | `"bold 105"` | The style for the module. | +| `disabled` | `false` | Disables the `terraform` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| 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 + +### Example + +#### With Version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $version$workspace]($style) " +``` + +#### Without version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $workspace]($style) " +``` + +## 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. + +::: tip + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Options + +| Option | Default | 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"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ----------------------------------- | +| 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 + +### Example + +```toml +# ~/.config/starship.toml + +[time] +disabled = false +format = '🕙[\[ $time \]]($style) ' +time_format = "%T" +utc_time_offset = "-5" +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: + +- 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 + +::: 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. + +::: + +### Options + +| Option | Default | Description | +| ------------- | ----------------------- | ------------------------------------- | +| `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 + +| Variable | Example | Description | +| -------- | ------------ | ------------------------------------------------------------------------------------------- | +| `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. | + +### Example + +```toml +# ~/.config/starship.toml + +[username] +style_user = "white bold" +style_root = "black bold" +format = "user: [$user]($style) " +disabled = false +show_always = true +``` + +## Zig + +The `zig` module shows the currently installed version of Zig. The module will be shown if any of the following conditions are met: + +- The current directory contains a `.zig` file + +### Options + +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | + +### Variables + +| Variable | Example | Description | +| --------- | -------- | ------------------------------------ | +| version | `v0.6.0` | The version of `zig` | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[zig] +symbol = "⚡️ " +``` + +## Custom commands + +The `custom` modules show the output of some arbitrary commands. + +These modules will be shown if any of the following conditions are met: + +- The current directory contains a file whose name is in `files` +- The current directory contains a directory whose name is in `directories` +- The current directory contains a file whose extension is in `extensions` +- The `when` command returns 0 + +::: tip + +Multiple custom modules can be defined by using a `.`. + +::: + +::: 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 + +[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! + +::: + +### Options + +| Option | Default | Description | +| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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"` | The style for the module. | +| `format` | `"[$symbol($output )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables this `custom` module. | + +### Variables + +| Variable | Description | +| --------- | -------------------------------------- | +| output | The output of shell command in `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 + +#### 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. + +The `command` will be passed in on stdin. + +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. + +::: + +### Example + +```toml +# ~/.config/starship.toml + +[custom.foo] +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters +when = """ test "$HOME" == "$PWD" """ +format = " transcending [$output]($style)" + +[custom.time] +command = "time /T" +files = ["*.pst"] +shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +``` diff --git a/docs/ckb-IR/faq/README.md b/docs/ckb-IR/faq/README.md new file mode 100644 index 000000000..9bb23bf93 --- /dev/null +++ b/docs/ckb-IR/faq/README.md @@ -0,0 +1,92 @@ +# FAQ + +## What is the configuration used in the demo GIF? + +- **Terminal Emulator**: [iTerm2](https://iterm2.com/) + - **Theme**: Minimal + - **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy) + - **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads) +- **Shell**: [Fish Shell](https://fishshell.com/) + - **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish) + - **Prompt**: [Starship](https://starship.rs/) + +## How do I get command completion as shown in the demo GIF? + +Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). + +## Do top level `format` and `.disabled` do the same thing? + +Yes, they can both be used to disable modules in the prompt. If all you plan to do is disable modules, `.disabled` is the preferred way to do so for these reasons: + +- Disabling modules is more explicit than omitting them from the top level `format` +- Newly created modules will be added to the prompt as Starship is updated + +## The docs say Starship is cross-shell. Why isn't my preferred shell supported? + +The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used. + +Here's a small example getting Starship working with bash: + +```sh +# Get the status code from the last command executed +STATUS=$? + +# Get the number of jobs running. +NUM_JOBS=$(jobs -p | wc -l) + +# Set the prompt to the output of `starship prompt` +PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)" +``` + +The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#Command-Duration) and to ensure that Starship is compatible with pre-installed Bash configurations. + +For a list of all flags accepted by `starship prompt`, use the following command: + +```sh +starship prompt --help +``` + +The prompt will use as much context as is provided, but no flags are "required". + +## How do I run Starship on Linux distributions with older versions of glibc? + +If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`: + +```sh +curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl +``` + +## Why don't I see a glyph symbol in my prompt? + +The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that: + +- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/). +- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice. +- You are using a [Nerd Font](https://www.nerdfonts.com/). + +To test your system, run the following commands in a terminal: + +```sh +echo -e "\xf0\x9f\x90\x8d" +echo -e "\xee\x82\xa0" +``` + +The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). + +If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose) + +## How do I uninstall Starship? + +Starship is just as easy to uninstall as it is to install in the first place. + +1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship. +1. Delete the Starship binary. + +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. + +If Starship was installed using the `curl | bash` script, the following command will delete the binary: + +```sh +# Locate and delete the starship binary +rm "$(which starship)" +``` diff --git a/docs/ckb-IR/guide/README.md b/docs/ckb-IR/guide/README.md new file mode 100644 index 000000000..c53391a57 --- /dev/null +++ b/docs/ckb-IR/guide/README.md @@ -0,0 +1,267 @@ +

+ Starship – Cross-shell prompt +

+ +

+ GitHub Actions workflow status + Crates.io version + Packaging status
+ Chat on Discord + Follow @StarshipPrompt on Twitter +

+ +

+ Website + · + Installation + · + Configuration +

+ +

+ English +   + 日本語 +   + 繁體中文 +   + Русский +   + Deutsch +   + 简体中文 +   + Español +   + Français +

+ +

+ +Starship with iTerm2 and the Snazzy theme + +**The minimal, blazing-fast, and infinitely customizable prompt for any shell!** + +- **Fast:** it's fast – _really really_ fast! 🚀 +- **Customizable:** configure every aspect of your prompt. +- **Universal:** works on any shell, on any operating system. +- **Intelligent:** shows relevant information at a glance. +- **Feature rich:** support for all your favorite tools. +- **Easy:** quick to install – start using it in minutes. + +

+Explore the Starship docs  ▶ +

+ + + +## 🚀 Installation + +### Prerequisites + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). + +### Getting Started + +**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/). + +1. Install the **starship** binary: + + + #### Install Latest Version + + + ##### From prebuilt binary, with Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + #### Install via Package Manager + + + ##### Example: [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + + ##### With [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +2. Add the init script to your shell's config file: + + + #### Bash + + Add the following to the end of `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Add the following to the end of `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Add the following to the end of `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### PowerShell + + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + + ```powershell + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Add the following to the end of `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` + +## 🤝 Contributing + +We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). + +If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/). + +If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋 + +### Code Contributors + +This project exists thanks to all the people who contribute. [[Contribute](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. + + +### Financial Contributors + +Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)] + +#### Individuals + + + +#### Organizations + +Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)] + + + + + + + + + + + + +## 💭 Inspired By + +Please check out these previous works that helped inspire the creation of starship. 🙏 + +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts. + +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript. + +- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons. + +

+
+ Starship rocket icon +

+ +## 📝 License + +Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed. diff --git a/docs/ckb-IR/installing/README.md b/docs/ckb-IR/installing/README.md new file mode 100644 index 000000000..6f0ea0d6b --- /dev/null +++ b/docs/ckb-IR/installing/README.md @@ -0,0 +1,46 @@ +# 🚀 Advanced Installation + +To install starship, you need to do two things: + +1. Get the **starship** binary onto your computer +1. Tell your shell to use the starship binary as its prompt by modifying its init scripts + +For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed. + +There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out! + +## [Nix](https://nixos.wiki/wiki/Nix) + +### Getting the Binary + +#### Imperatively + +```sh +nix-env -iA nixos.starship +``` + +#### Declarative, single user, via [home-manager](home-manager) + +Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run + +```sh +home-manager switch +``` + +#### Declarative, system-wide, with NixOS + +Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run + +```sh +sudo nixos-rebuild switch +``` + +### Modifying Init Scripts + +#### With Nix and home-manager, using zsh: + +Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run + +```sh +home-manager switch +``` diff --git a/docs/ckb-IR/migrating-to-0.45.0/README.md b/docs/ckb-IR/migrating-to-0.45.0/README.md new file mode 100644 index 000000000..95a847bf2 --- /dev/null +++ b/docs/ckb-IR/migrating-to-0.45.0/README.md @@ -0,0 +1,267 @@ +# Migrating to v0.45.0 + +Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization. + +This guide is intended to walk you through the breaking changes. + +## `prompt_order` has been replaced by a root-level `format` + +Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship. + +Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves. + +**Example pre-v0.45.0 configuration** + +```toml +prompt_order = [ + "username", + "hostname", + "directory", + "git_branch", + "git_commit", + "git_state", + "git_status", + "cmd_duration", + "custom", + "line_break", + "jobs", + "battery", + "time", + "character", +] +``` + +**Example v0.45.0 configuration** + +```toml +format = """\ + $username\ + $hostname\ + $directory\ + $git_branch\ + $git_commit\ + $git_state\ + $git_status\ + $cmd_duration\ + $custom\ + $line_break\ + $jobs\ + $battery\ + $time\ + $character\ + """ +``` + +## Module `prefix` and `suffix` have been replaced by `format` + +Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered. + +Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output. + +**Example pre-v0.45.0 configuration** + +```toml +[cmd_duration] +prefix = "took " +``` + +**Example v0.45.0 configuration** + +```toml +[cmd_duration] +# $duration – The command duration (e.g. "15s") +# $style – The default style of the module (e.g. "bold yellow") +format = "took [$duration]($style) " +``` + +### Affected Modules + +#### Character + +| Removed Property | Replacement | +| ----------------------- | ---------------- | +| `symbol` | `success_symbol` | +| `use_symbol_for_status` | `error_symbol` | +| `style_success` | `success_symbol` | +| `style_failure` | `error_symbol` | + +**Changes to the Default Configuration** + +```diff +[character] +-- symbol = "❯" +-- error_symbol = "✖" +-- use_symbol_for_status = true +-- vicmd_symbol = "❮" +++ success_symbol = "[❯](bold green)" +++ error_symbol = "[❯](bold red)" +++ vicmd_symbol = "[❮](bold green)" +``` + +Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code. + +With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties. + +To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file: + +```toml +[character] +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. + +#### Command Duration + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[cmd_duration] +-- prefix = "took " +++ format = "took [$duration]($style) " +``` + +#### Directory + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[directory] +-- prefix = "in " +++ format = "[$path]($style)[$read_only]($read_only_style) " +``` + +#### Environment Variable + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[env_var] +-- prefix = "" +-- suffix = "" +++ format = "with [$env_value]($style) " +``` + +#### Git Commit + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_commit] +-- prefix = "(" +-- suffix = ")" +++ format = '[\($hash\)]($style) ' +``` + +#### Git Status + +| Removed Property | Replacement | +| ----------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | +| `show_sync_count` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_status] +-- prefix = "[" +-- suffix = "]" +-- show_sync_count = false +++ format = '([\[$all_status$ahead_behind\]]($style) )' +``` + +Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch. + +With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`. + +To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file: + +```toml +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +#### Hostname + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[hostname] +-- prefix = "" +-- suffix = "" +++ format = "[$hostname]($style) in " +``` + +#### Singularity + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `label` | `format` | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[singularity] +-- prefix = "" +-- suffix = "" +++ format = '[$symbol\[$env\]]($style) ' +``` + +#### Time + +| Removed Property | Replacement | +| ---------------- | ------------- | +| `format` | `time_format` | + +**Changes to the Default Configuration** + +```diff +[time] +-- format = "🕙[ %T ]" +++ time_format = "%T" +++ format = "at 🕙[$time]($style) " +``` + +#### Custom Commands + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[custom.example] +-- prefix = "" +-- suffix = "" +++ format = "[$symbol$output]($style) " +``` diff --git a/docs/ckb-IR/presets/README.md b/docs/ckb-IR/presets/README.md new file mode 100644 index 000000000..746364fa2 --- /dev/null +++ b/docs/ckb-IR/presets/README.md @@ -0,0 +1,89 @@ +# Presets + +Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊 + +## Nerd Font Symbols + +This preset doesn't change anything except for the symbols used for each module. If emojis aren't your thing, this might catch your eye! + +![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png) + +### Prerequisites + +- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font) + +### Configuration + +```toml +[aws] +symbol = " " + +[conda] +symbol = " " + +[dart] +symbol = " " + +[directory] +read_only = " " + +[docker] +symbol = " " + +[elixir] +symbol = " " + +[elm] +symbol = " " + +[git_branch] +symbol = " " + +[golang] +symbol = " " + +[haskell] +symbol = " " + +[hg_branch] +symbol = " " + +[java] +symbol = " " + +[julia] +symbol = " " + +[memory_usage] +symbol = " " + +[nim] +symbol = " " + +[nix_shell] +symbol = " " + +[nodejs] +symbol = " " + +[package] +symbol = " " + +[perl] +symbol = " " + +[php] +symbol = " " + +[python] +symbol = " " + +[ruby] +symbol = " " + +[rust] +symbol = " " + +[swift] +symbol = "ﯣ " +``` diff --git a/docs/de-DE/config/README.md b/docs/de-DE/config/README.md index cf1c81975..fbf271cab 100644 --- a/docs/de-DE/config/README.md +++ b/docs/de-DE/config/README.md @@ -29,7 +29,7 @@ export STARSHIP_CONFIG=~/.starship Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -43,7 +43,7 @@ export STARSHIP_CACHE=~/.starship/cache Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -427,12 +427,12 @@ The `cmake` module shows the currently installed version of CMake if any of the ### Optionen -| Option | Standardwert | Beschreibung | -| ---------- | ---------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | -| `style` | `"bold blue"` | Stil für dieses Modul. | -| `disabled` | `false` | Disables the `cmake` module. | +| Option | Standardwert | Beschreibung | +| ---------- | ------------------------------------ | -------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | Stil für dieses Modul. | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -542,12 +542,12 @@ The `crystal` module shows the currently installed version of Crystal. Das Modul ### Optionen -| Option | Standardwert | Beschreibung | -| ---------- | ---------------------------------- | --------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `style` | `"bold red"` | Stil für dieses Modul. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `crystal` module. | +| Option | Standardwert | Beschreibung | +| ---------- | ------------------------------------ | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | Stil für dieses Modul. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables @@ -578,12 +578,12 @@ The `dart` module shows the currently installed version of Dart. Das Modul wird ### Optionen -| Option | Standardwert | Beschreibung | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `style` | `"bold blue"` | Stil für dieses Modul. | -| `disabled` | `false` | Disables the `dart` module. | +| Option | Standardwert | Beschreibung | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | Stil für dieses Modul. | +| `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -624,6 +624,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
Dieses Modul hat einige erweiterte Konfigurationsoptionen, welche die Darstellung von Verzeichnissen steuern. @@ -671,13 +672,13 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Optionen -| Option | Standardwert | Beschreibung | -| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `style` | `"blue bold"` | Stil für dieses Modul. | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | Disables the `docker_context` module. | +| Option | Standardwert | Beschreibung | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | Stil für dieses Modul. | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -722,13 +723,13 @@ The module will also show the Target Framework Moniker ( "` | The symbol used before displaying the version of PureScript. | -| `style` | `"bold white"` | Stil für dieses Modul. | -| `disabled` | `false` | Disables the `purescript` module. | +| Option | Standardwert | Beschreibung | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | Stil für dieses Modul. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -1958,16 +1959,16 @@ Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: ### Optionen -| Option | Standardwert | Beschreibung | -| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `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_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `disabled` | `false` | Deaktiviert das `python`-Modul. | +| Option | Standardwert | Beschreibung | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | The format for the module. | +| `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_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Deaktiviert das `python`-Modul. | ::: Tipp @@ -2016,12 +2017,12 @@ Das `ruby` Modul zeigt die derzeit installierte Version von Ruby an. Das Modul w ### Optionen -| Option | Standardwert | Beschreibung | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold red"` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `ruby`-Modul. | +| Option | Standardwert | Beschreibung | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | Stil für dieses Modul. | +| `disabled` | `false` | Deaktiviert das `ruby`-Modul. | ### Variables @@ -2051,12 +2052,12 @@ Das `rust` Modul zeigt die derzeit installierte Version von Rust an. Das Modul w ### Optionen -| Option | Standardwert | Beschreibung | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold red"` | Stil für dieses Modul. | -| `disabled` | `false` | Deaktiviert das `rust`-Modul. | +| Option | Standardwert | Beschreibung | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | Stil für dieses Modul. | +| `disabled` | `false` | Deaktiviert das `rust`-Modul. | ### Variables @@ -2157,18 +2158,18 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis ### Optionen -| Option | Standardwert | Beschreibung | -| ----------------------- | -------------------------- | ---------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `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"` | Stil für dieses Modul. | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `disabled` | `true` | Disables the `status` module. | +| Option | Standardwert | Beschreibung | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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"` | Stil für dieses Modul. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables @@ -2209,12 +2210,12 @@ The `swift` module shows the currently installed version of Swift. Das Modul wir ### Optionen -| Option | Standardwert | Beschreibung | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `style` | `"bold 202"` | Stil für dieses Modul. | -| `disabled` | `false` | Disables the `swift` module. | +| Option | Standardwert | Beschreibung | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | Stil für dieses Modul. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -2237,7 +2238,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: +The `terraform` module shows the currently selected terraform workspace and version. + +::: Tipp + +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-version). + +::: + +Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist: - Das aktuelle Verzeichnis enthält eine `.terraform`-Datei - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2381,12 +2390,12 @@ The `zig` module shows the currently installed version of Zig. Das Modul wird ge ### Optionen -| Option | Standardwert | Beschreibung | -| ---------- | ---------------------------------- | ----------------------------------------------------- | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | Stil für dieses Modul. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `zig` module. | +| Option | Standardwert | Beschreibung | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | ### Variables @@ -2438,19 +2447,19 @@ The order in which custom modules are shown can be individually set by including ### 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) "` | The format for the module. | -| `disabled` | `false` | Disables this `custom` module. | +| 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)"` | The format for the module. | +| `disabled` | `false` | Disables this `custom` module. | ### Variables diff --git a/docs/de-DE/guide/README.md b/docs/de-DE/guide/README.md index 70421a657..176267c44 100644 --- a/docs/de-DE/guide/README.md +++ b/docs/de-DE/guide/README.md @@ -196,7 +196,7 @@ Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. - ```sh + ```powershell Invoke-Expression (&starship init powershell) ``` diff --git a/docs/es-ES/config/README.md b/docs/es-ES/config/README.md index 58b732004..e83787cd5 100644 --- a/docs/es-ES/config/README.md +++ b/docs/es-ES/config/README.md @@ -30,7 +30,7 @@ export STARSHIP_CONFIG=~/.starship El equivalente en PowerShell (Windows) es añadir esta línea a tu `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -44,7 +44,7 @@ export STARSHIP_CACHE=~/.starship/cache El equivalente en PowerShell (Windows) es añadir esta línea a tu `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -52,7 +52,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" **Módulo**: un componente en el promt que provee información basada en información contextual de tu sistema operativo. Por ejemplo, el módulo "nodejs" muestra la versión de NodeJS que tienes actualmente instalada en tu ordenador, si el directorio actual es un proyecto NodeJS. -**Variable**: Smaller sub-components that contain information provided by the module. Por ejemplo, la variable "version" en el módulo "nodejs" contiene la versión actual de NodeJS. +**Variable**: subcomponentes más pequeños que contienen información proporcionada por el módulo. Por ejemplo, la variable "version" en el módulo "nodejs" contiene la versión actual de NodeJS. Por convención, la mayoría de los módulos tienen un prefijo del color predeterminado de la terminal (por ejemplo, `vía` en "nodejs") y un espacio vacío como sufijo. @@ -174,7 +174,7 @@ La varieble `format` por defecto se utiliza para definir el formato del prompt, ```toml format = "$all" -# Which is equivalent to +# Equivalente a format = """ $username\ $hostname\ @@ -421,19 +421,19 @@ vicmd_symbol = "[V](bold green) " ## CMake -The `cmake` module shows the currently installed version of CMake if any of the following conditions are met: +El módulo `cmake` muestra la versión instalada de CMake si se cumple alguna de las siguientes condiciones: - El directorio actual contiene un archivo `CMakeLists.txt` - El directorio actual contiene un archivo `CMakeCache.txt` ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ---------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"喝 "` | El símbolo usado antes de la versión de cmake. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `cmake`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | ---------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `symbol` | `"喝 "` | El símbolo usado antes de la versión de cmake. | +| `style` | `"bold blue"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `cmake`. | ### Variables @@ -459,15 +459,15 @@ Los usuarios de bash que necesiten la funcionalidad preexec-like pueden usar el ### 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` | Shortest duration for notification (in milliseconds). | +| 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). | ::: tip @@ -543,12 +543,12 @@ El módulo `crystal` muestra la versión actual de Crystal. El módulo se muestr ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | --------------------------------------------- | -| `symbol` | `"🔮 "` | Símbolo usado antes de la versión de Crystal. | -| `style` | `"bold red"` | El estilo del módulo. | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `disabled` | `false` | Desactiva el módulo `crystal`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | --------------------------------------------- | +| `symbol` | `"🔮 "` | Símbolo usado antes de la versión de Crystal. | +| `style` | `"bold red"` | El estilo del módulo. | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `disabled` | `false` | Desactiva el módulo `crystal`. | ### Variables @@ -579,12 +579,12 @@ El módulo `dart` muestra la versión actualmente instalada de Dart. El módulo ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"🎯 "` | Una cadena de formato que representa el símbolo de Dart | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `dart`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | ------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `symbol` | `"🎯 "` | Una cadena de formato que representa el símbolo de Dart | +| `style` | `"bold blue"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `dart`. | ### Variables @@ -625,6 +625,7 @@ Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repos | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
Este módulo tiene algunas opciones avanzadas de configuración que controlan cómo se muestra el directorio. @@ -672,13 +673,13 @@ El módulo `docker_context` muestra el [Docker context](https://docs.docker.com/ ### 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. | -| `style` | `"blue bold"` | El estilo del módulo. | -| `only_with_files` | `false` | Solo lo muestra cuando hay un archivo `docker-compose.yml` o `Dockerfile` en el directorio actual. | -| `disabled` | `true` | Desactiva el módulo `docker_context`. | +| 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. | +| `style` | `"blue bold"` | El estilo del módulo. | +| `only_with_files` | `true` | Mostrar solo cuando hay un `docker-compose.yml`, `docker-compose.yaml`o `Dockerfile` en el directorio actual. | +| `disabled` | `false` | Desactiva el módulo `docker_context`. | ### Variables @@ -723,13 +724,13 @@ El módulo también mostrará el Target Framework Moniker ([https://docs.microso ### Opciones -| Opción | Por defecto | Descripción | -| ----------- | --------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"[$symbol$version( 🎯 $tfm)]($style) "` | El formato del módulo. | -| `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. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `dotnet`. | +| Opción | Por defecto | Descripción | +| ----------- | ----------------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | El formato del módulo. | +| `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. | +| `style` | `"bold blue"` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `dotnet`. | ### Variables @@ -761,12 +762,12 @@ El módulo `elixir` muestra la version instalada actualmente de Elixir y Erlang/ ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | --------------------------------------------------------- | -------------------------------------------------------------- | -| `symbol` | `"💧 "` | El símbolo usado antes de mostrar la version de Elixir/Erlang. | -| `style` | `"bold purple"` | El estilo del módulo. | -| `format` | `'via [$symbol$version \(OTP $otp_version\)]($style) '` | El formato para el módulo elixir. | -| `disabled` | `false` | Desactiva el módulo `elixir`. | +| Opción | Por defecto | Descripción | +| ---------- | ----------------------------------------------------------- | -------------------------------------------------------------- | +| `symbol` | `"💧 "` | El símbolo usado antes de mostrar la version de Elixir/Erlang. | +| `style` | `"bold purple"` | El estilo del módulo. | +| `format` | `'via [$symbol($version \(OTP $otp_version\) )]($style)'` | El formato para el módulo elixir. | +| `disabled` | `false` | Desactiva el módulo `elixir`. | ### Variables @@ -800,12 +801,12 @@ El módulo `elm` muestra la versión actualmente instalada de Elm. El módulo se ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"🌳 "` | Una cadena de formato que representa el símbolo de Elm. | -| `style` | `"cyan bold"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `elm`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | ------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `symbol` | `"🌳 "` | Una cadena de formato que representa el símbolo de Elm. | +| `style` | `"cyan bold"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `elm`. | ### Variables @@ -872,12 +873,12 @@ El módulo `erlang` muestra la versión instalada de Erlang/OTP. El módulo se m ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ------------------------------------------------------- | -| `symbol` | `" "` | El símbolo usado antes de mostrar la versión de Erlang. | -| `style` | `"bold red"` | El estilo del módulo. | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `disabled` | `false` | Desactiva el módulo `erlang`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | ------------------------------------------------------- | +| `symbol` | `" "` | El símbolo usado antes de mostrar la versión de Erlang. | +| `style` | `"bold red"` | El estilo del módulo. | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `disabled` | `false` | Desactiva el módulo `erlang`. | ### Variables @@ -980,8 +981,8 @@ El módulo `git_branch` muestra la rama activa del repositorio en su directorio | Variable | Ejemplo | Descripción | | ------------- | -------- | ------------------------------------------------------------------------------------------------------------- | | branch | `master` | El nombre de la rama actual, regresa a `HEAD` si no hay ninguna rama actual (por ejemplo, git detached HEAD). | -| remote_name | `origin` | The remote name. | -| remote_branch | `master` | The name of the branch tracked on `remote_name`. | +| 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` | @@ -1171,12 +1172,12 @@ El módulo `golang` muestra la versión actualmente instalada de Golang. El mód ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"🐹 "` | Una cadena de formato que representa el símbolo de Go. | -| `style` | `"bold cyan"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo de `golang`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | ------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `symbol` | `"🐹 "` | Una cadena de formato que representa el símbolo de Go. | +| `style` | `"bold cyan"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo de `golang`. | ### Variables @@ -1206,12 +1207,12 @@ El módulo `helm` muestra la versión instalada de Helm. El módulo se muestra s ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | -------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"⎈ "` | Una cadena de formato que representa el símbolo de Helm. | -| `style` | `"bold white"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `helm`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | -------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `symbol` | `"⎈ "` | Una cadena de formato que representa el símbolo de Helm. | +| `style` | `"bold white"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `helm`. | ### Variables @@ -1276,12 +1277,12 @@ El módulo `java` muestra la versión actualmente instalada de Java. El módulo ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | -------------------------------------- | ------------------------------------------------------- | -| `format` | `"via [${symbol}${version}]($style) "` | El formato del módulo. | -| `symbol` | `"☕ "` | Una cadena de formato que representa el símbolo de Java | -| `style` | `"red dimmed"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `java`. | +| Opción | Por defecto | Descripción | +| ---------- | ---------------------------------------- | ------------------------------------------------------- | +| `format` | `"via [${symbol}(${version} )]($style)"` | El formato del módulo. | +| `symbol` | `"☕ "` | Una cadena de formato que representa el símbolo de Java | +| `style` | `"red dimmed"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `java`. | ### Variables @@ -1346,12 +1347,12 @@ El módulo `Julia` muestra la versión actualmente instalada de Julia. El módul ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | --------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"ஃ "` | Una cadena de formato que representa el símbolo de Julia. | -| `style` | `"bold purple"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `julia`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | --------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `symbol` | `"ஃ "` | Una cadena de formato que representa el símbolo de Julia. | +| `style` | `"bold purple"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `julia`. | ### Variables @@ -1374,25 +1375,25 @@ symbol = "∴ " ## Kotlin -The `kotlin` module shows the currently installed version of Kotlin. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +El módulo `kotlin` muestra la versión instalada de Kotlin. El módulo se muestra si algunas de las siguientes condiciones se cumplen: -- The current directory contains a `.kt` or a `.kts` file +- 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. | -| `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. | +| Opción | Por defecto | Descripción | +| --------------- | ------------------------------------ | ----------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `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` | The version of `kotlin` | +| 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` | @@ -1411,7 +1412,7 @@ symbol = "🅺 " # ~/.config/starship.toml [kotlin] -# Uses the Kotlin Compiler binary to get the installed version +# Utiliza el binario del Compilador de Kotlin para obtener la versión instalada kotlin_binary = "kotlinc" ``` @@ -1487,13 +1488,13 @@ El módulo `lua` muestra la versión instalada de Lua. El módulo se muestra si ### Opciones -| Opción | Por defecto | Descripción | -| ------------ | ---------------------------------- | ----------------------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"🌙 "` | Una cadena de formato que representa el símbolo de Lua. | -| `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`. | +| Opción | Por defecto | Descripción | +| ------------ | ------------------------------------ | ----------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `symbol` | `"🌙 "` | Una cadena de formato que representa el símbolo de Lua. | +| `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`. | ### Variables @@ -1608,12 +1609,12 @@ El módulo `nim` muestra la versión instalada de Nim. El módulo se muestra si ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ---------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo | -| `symbol` | `"👑 "` | El símbolo usado antes de mostrar la versión de Nim. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `nim`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | ---------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo | +| `symbol` | `"👑 "` | El símbolo usado antes de mostrar la versión de Nim. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `nim`. | ### Variables @@ -1685,13 +1686,13 @@ El módulo `nodejs` muestra la versión instalada de NodeJS. El módulo se muest ### Opciones -| Opción | Por defecto | Descripción | -| ------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"⬢ "` | Una cadena de formato que representa el símbolo de NodeJS. | -| `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 Packages.json no coincide con la versión de NodeJS. | +| Opción | Por defecto | Descripción | +| ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `symbol` | `"⬢ "` | Una cadena de formato que representa el símbolo de NodeJS. | +| `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 Packages.json no coincide con la versión de NodeJS. | ###  Variables @@ -1725,12 +1726,12 @@ El módulo `ocaml` muestra la versión actualmente instalada de OCaml. El módul ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ------------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | La cadena de formato para el módulo. | -| `symbol` | `"🐫 "` | El símbolo usado antes de mostrar la versión de OCaml. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `ocaml`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | ------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | La cadena de formato para el módulo. | +| `symbol` | `"🐫 "` | El símbolo usado antes de mostrar la versión de OCaml. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `ocaml`. | ### Variables @@ -1799,7 +1800,7 @@ El módulo `package` se muestra cuando el directorio actual es el repositorio de - **mix** - La versión del paquete `mix` se extrae del `mix.exs` presente - **helm** - La versión del gráfico `helm` se extrae del `Chart.yaml` presente - **maven** - La versión del paquete `maven` es extraída del `pom.xml` presente -- **meson** - The `meson` package version is extracted from the `meson.build` present +- **meson** - La versión del paquete `meson` es extraída del `meson.build` presente > ⚠️ 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. @@ -1844,12 +1845,12 @@ El módulo `perl` muestra la versión actualmente instalada de Perl. El módulo ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ---------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | La cadena de formato para el módulo. | -| `symbol` | `"🐪 "` | El símbolo usado antes de mostrar la versión de Perl | -| `style` | `"bold 149"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `perl`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | ---------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | La cadena de formato para el módulo. | +| `symbol` | `"🐪 "` | El símbolo usado antes de mostrar la versión de Perl | +| `style` | `"bold 149"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `perl`. | ### Variables @@ -1878,12 +1879,12 @@ El módulo `php` muestra la versión instalada de PHP. El módulo se muestra si ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ---------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"🐘 "` | El símbolo usado antes de mostrar la versión de PHP. | -| `style` | `"147 bold"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `php`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | ---------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `symbol` | `"🐘 "` | El símbolo usado antes de mostrar la versión de PHP. | +| `style` | `"147 bold"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `php`. | ### Variables @@ -1913,12 +1914,12 @@ El módulo `purescript` muestra la versión actualmente instalada de PureScript. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ----------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"<=> "` | El símbolo usado antes de mostrar la versión de PureScript. | -| `style` | `"bold white"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `purescript`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | ----------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `symbol` | `"<=> "` | El símbolo usado antes de mostrar la versión de PureScript. | +| `style` | `"bold white"` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `purescript`. | ### Variables @@ -1959,16 +1960,16 @@ El módulo se muestra si algunas de las siguientes condiciones se cumplen: ### Opciones -| Opción | Por defecto | Descripción | -| -------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | El formato del módulo. | -| `symbol` | `"🐍 "` | Una cadena de formato que representa el símbolo de 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 | -| `scan_for_pyfiles` | `true` | Si es falso, los archivos Python en el directorio actual no mostrarán este módulo. | -| `python_binary` | `["python", "python3, "python2"]` | Configura los binarios de python que Starship debería ejecutar al obtener la versión. | -| `disabled` | `false` | Desactiva el módulo `python`. | +| Opción | Por defecto | Descripción | +| -------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | El formato del módulo. | +| `symbol` | `"🐍 "` | Una cadena de formato que representa el símbolo de 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 | +| `scan_for_pyfiles` | `true` | Si es falso, los archivos Python en el directorio actual no mostrarán este módulo. | +| `python_binary` | `["python", "python3, "python2"]` | Configura los binarios de python que Starship debería ejecutar al obtener la versión. | +| `disabled` | `false` | Desactiva el módulo `python`. | ::: tip @@ -2017,12 +2018,12 @@ El módulo `ruby` muestra la versión actualmente instalada de Ruby. El módulo ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | -------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"💎 "` | Una cadena de formato que representa el símbolo de Ruby. | -| `style` | `"bold red"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `ruby`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | -------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `symbol` | `"💎 "` | Una cadena de formato que representa el símbolo de Ruby. | +| `style` | `"bold red"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `ruby`. | ### Variables @@ -2052,12 +2053,12 @@ El módulo `rust` muestra la versión instalada de Rust. El módulo se muestra s ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"🦀 "` | Una cadena de formato que representa el símbolo de Rust | -| `style` | `"bold red"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `rust`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | ------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `symbol` | `"🦀 "` | Una cadena de formato que representa el símbolo de Rust | +| `style` | `"bold red"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `rust`. | ### Variables @@ -2084,14 +2085,14 @@ El módulo `shlvl` muestra la variable de entorno actual SHLVL ("nivel de shell" ### Opciones -| Opción | Por defecto | Descripción | -| ----------- | ---------------------------- | ----------------------------------------------------------- | -| `threshold` | `2` | Mostrar umbral. | -| `format` | `"[$symbol$shlvl]($style) "` | El formato del módulo. | -| `symbol` | `"↕️ "` | El símbolo usado para representar el SHLVL. | -| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `true` | Desactiva el módulo `shlvl`. | +| Opción | Por defecto | Descripción | +| ----------- | ---------------------------- | -------------------------------------------------------------- | +| `threshold` | `2` | Mostrar umbral. | +| `format` | `"[$symbol$shlvl]($style) "` | El formato del módulo. | +| `symbol` | `"↕️ "` | El símbolo usado para representar el SHLVL. | +| `repeat` | `false` | Causa `symbol` a ser repetido por la cantidad actual de SHLVL. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `true` | Desactiva el módulo `shlvl`. | ### Variables @@ -2158,31 +2159,31 @@ 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` | `"✖"` | The symbol displayed on program error | -| `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 | -| `disabled` | `true` | Desactiva el módulo `status`. | +| Opción | Por defecto | Descripción | +| ----------------------- | ----------------------------- | ------------------------------------------------------ | +| `format` | `"[$symbol$status]($style) "` | El formato del módulo | +| `symbol` | `"✖"` | El símbolo mostrado en error 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 | +| `disabled` | `true` | Desactiva el módulo `status`. | ### Variables -| Variable | Ejemplo | Descripción | -| -------------- | ------- | -------------------------------------------------------------------- | -| status | `127` | El código de salida del último comando | -| int | `127` | El código de salida del último comando | -| 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 | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| -------------- | ------- | ------------------------------------------------------------------------------------ | +| status | `127` | El código de salida del último comando | +| 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 | +| 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 @@ -2203,19 +2204,19 @@ disabled = false ## Swift -The `swift` module shows the currently installed version of Swift. El módulo se muestra si algunas de las siguientes condiciones se cumplen: +El módulo `swift` muestra la versión actualmente instalada de Swift. El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene un archivo `Package.swift` - El directorio actual contiene un archivo con la extensión `.swift` ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | -------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"🐦 "` | Una cadena de formato que representa el símbolo de Swift | -| `style` | `"bold 202"` | El estilo del módulo. | -| `disabled` | `false` | Desactiva el módulo `swift`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | -------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `symbol` | `"🐦 "` | Una cadena de formato que representa el símbolo de Swift | +| `style` | `"bold 202"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `swift`. | ### Variables @@ -2238,7 +2239,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). El módulo se muestra si algunas de las siguientes condiciones se cumplen: +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +El módulo se muestra si algunas de las siguientes condiciones se cumplen: - El directorio actual contiene una carpeta `.terraform` - El directorio actual contiene un archivo con las extensiones `.tf` o `.hcl` @@ -2382,12 +2391,12 @@ The `zig` module shows the currently installed version of Zig. El módulo se mue ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ---------------------------------- | ---------------------------------------------------- | -| `symbol` | `"↯ "` | El símbolo usado antes de mostrar la versión de Zig. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `format` | `"via [$symbol$version]($style) "` | El formato del módulo. | -| `disabled` | `false` | Desactiva el módulo `zig`. | +| Opción | Por defecto | Descripción | +| ---------- | ------------------------------------ | ---------------------------------------------------- | +| `symbol` | `"↯ "` | El símbolo usado antes de mostrar la versión de Zig. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `disabled` | `false` | Desactiva el módulo `zig`. | ### Variables @@ -2439,19 +2448,19 @@ The order in which custom modules are shown can be individually set by including ### 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`. | +| 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`. | ### Variables diff --git a/docs/es-ES/faq/README.md b/docs/es-ES/faq/README.md index 197fd4b8a..3c8d079bc 100644 --- a/docs/es-ES/faq/README.md +++ b/docs/es-ES/faq/README.md @@ -12,7 +12,7 @@ ## ¿Cómo obtengo el autocompletado del comando como se muestra en el GIF? -Completion support, or autocomplete, is provided by your shell of choice. En el caso de la demo, la demo se realizó con [Fish Shell](https://fishshell.com/), que proporciona el completado por defecto. Si usas Z Shell (zsh), te sugeriría echar un vistazo a [zsh-autosuggeries,](https://github.com/zsh-users/zsh-autosuggestions). +El soporte de terminación, o autocompletado, es proporcionado por su shell de elección. En el caso de la demo, la demo se realizó con [Fish Shell](https://fishshell.com/), que proporciona el completado por defecto. Si usas Z Shell (zsh), te sugeriría echar un vistazo a [zsh-autosuggeries,](https://github.com/zsh-users/zsh-autosuggestions). ## ¿`prompt_order` y `.disabled` hacen lo mismo? @@ -21,7 +21,7 @@ Sí, se pueden usar ambos para desactivar los módulos en el símbolo del sistem - Deshabilitar módulos es más explícito que omitirlos del nivel superior `format` - Los nuevos módulos se añadirán al símbolo del sistema en cuanto Starship se actualice -## The docs say Starship is cross-shell. Why isn't my preferred shell supported? +## La documentación dice que Starship es "cross-shell". ¿Por qué no es compatible mi shell preferido? Por la forma en que Starshp está construído, debería ser posible añadir soporte para prácticamente cualquier intérprete de comandos. El binario de Starship es sin estado y agnóstico, por lo que mientras que tu intérprete de comandos se pueda ampliar y soporte la personalización del símbolo del sistema, puede utilizar Starship. diff --git a/docs/es-ES/guide/README.md b/docs/es-ES/guide/README.md index 8fe736c55..2c51e270f 100644 --- a/docs/es-ES/guide/README.md +++ b/docs/es-ES/guide/README.md @@ -125,7 +125,7 @@ ### Comenzar -**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/). +**Nota**: debido a la proliferación de diferentes plataformas, solo un subconjunto de plataformas soportadas se muestra a continuación. ¿No puedes ver el tuyo? Echa un vistazo a las [instrucciones adicionales de la plataforma](https://starship.rs/installing/). 1. Instala el binario de **Starship**: @@ -143,7 +143,7 @@ #### Instalar con un gestor de paquetes - ##### Example: [Homebrew](https://brew.sh/): + ##### Ejemplo: [Homebrew](https://brew.sh/): ```sh brew install starship @@ -196,7 +196,7 @@ Añade lo siguiente al final de `Microsoft.PowerShell_profile.ps1`. Puedes comprobar la ubicación de este archivo consultando la variable `$PROFILE` en PowerShell. Normalmente la ruta es `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` o `~/.config/powershell/Microsoft.PowerShell_profile.ps1` en -Nix. - ```sh + ```powershell Invoke-Expression (&starship init powershell) ``` diff --git a/docs/es-ES/installing/README.md b/docs/es-ES/installing/README.md index 6f0ea0d6b..15d0b1f10 100644 --- a/docs/es-ES/installing/README.md +++ b/docs/es-ES/installing/README.md @@ -1,46 +1,46 @@ -# 🚀 Advanced Installation +# 🚀 Instalación avanzada -To install starship, you need to do two things: +Para instalar Starship, necesitas hacer dos cosas: -1. Get the **starship** binary onto your computer -1. Tell your shell to use the starship binary as its prompt by modifying its init scripts +1. Consigue el binario de **Starship** en tu ordenador +1. Decirle a tu shell que use el binario de Starship como su prompt modificando sus guiones de inicio -For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed. +Para la mayoría de los usuarios, las instrucciones en [la página principal](/guide/#🚀-installation) funcionarán genial. Sin embargo, para algunas plataformas más especializadas, se necesitan diferentes instrucciones. -There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out! +Hay tantas plataformas ahí fuera que no cabían en el README.md principal, así que aquí están algunas instrucciones de instalación para otras plataformas de la comunidad. ¿No está usted aquí? ¡Por favor, añádelo aquí si lo encuentras! ## [Nix](https://nixos.wiki/wiki/Nix) -### Getting the Binary +### Obtener el binario -#### Imperatively +#### Imperativamente ```sh nix-env -iA nixos.starship ``` -#### Declarative, single user, via [home-manager](home-manager) +#### Declarativo, usuario único, a través de [home-manager](home-manager) -Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run +Añade `pkgs.starship` a tu `home.packages` en tu archivo `home.nix` y luego ejecuta ```sh -home-manager switch +interruptor home-manager ``` -#### Declarative, system-wide, with NixOS +#### Declarativo, en todo el sistema, con NixOS -Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run +Añade `pkgs.starship` a `environment.packages` en tu `configuration.nix`, luego ejecuta ```sh sudo nixos-rebuild switch ``` -### Modifying Init Scripts +### Modificando guiones Init -#### With Nix and home-manager, using zsh: +#### Con Nix y home-manager, usando zsh: -Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run +Añade lo siguiente a `programs.zsh.initExtra` en tu archivo `home.nix` y luego ejecutar ```sh -home-manager switch +interruptor home-manager ``` diff --git a/docs/fr-FR/advanced-config/README.md b/docs/fr-FR/advanced-config/README.md index acee47990..850c2fb47 100644 --- a/docs/fr-FR/advanced-config/README.md +++ b/docs/fr-FR/advanced-config/README.md @@ -21,7 +21,7 @@ function blastoff(){ starship_precmd_user_func="blastoff" ``` -- Pour exécuter une fonction personnalisée juste avant l'exécution d'une commande, vous pouvez utiliser le [` DEBUG` mécanisme d'interruption ](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Cependant, vous **devez** pièger le signal DEBUG *avant* initialisation du Starship ! Starship peut préserver la valeur du piège DEBUG, mais si le piège est écrasé après le démarrage de Starship, certaines fonctionnalités vont casser. +- Pour exécuter une fonction personnalisée juste avant l'exécution d'une commande, vous pouvez utiliser le [` DEBUG` mécanisme d'interruption ](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Cependant, vous **devez** piéger le signal DEBUG *avant* initialisation du Starship ! Starship peut préserver la valeur du piège DEBUG, mais si le piège est écrasé après le démarrage de Starship, certaines fonctionnalités vont casser. ```bash function blastoff(){ @@ -45,7 +45,7 @@ function set_titre_fenetre(){ Vous pouvez utiliser des variables pour personnaliser ce titre (`$USER`, `$HOSTNAME`, et `$PWD` sont des choix populaires). -Dans `bash`, définissez cette fonction comme la fonction précmd Starship : +Dans `bash`, définissez cette fonction comme la fonction precmd Starship : ```bash starship_precmd_user_func="set_titre_gagnante" diff --git a/docs/fr-FR/config/README.md b/docs/fr-FR/config/README.md index 477a46498..95de7a5bc 100644 --- a/docs/fr-FR/config/README.md +++ b/docs/fr-FR/config/README.md @@ -29,13 +29,13 @@ export STARSHIP_CONFIG=~/.starship De manière équivalente, pour Powershell (Windows), ajoutez la ligne suivante à votre `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` ### Journalisation -Par défaut, Starship enregistre les avertissements et les erreurs dans un fichier nommé `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, où la clé de session correspond à une instance de votre terminal. Ceci, peut cependant être modifié en utilisant la variable d'environnement `STARSHIP_CACHE`: +Par défaut, Starship enregistre les avertissements et les erreurs dans un fichier nommé `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, où la clé de session correspond à une instance de votre terminal. Ceci peut cependant être modifié en utilisant la variable d'environnement `STARSHIP_CACHE`: ```sh export STARSHIP_CACHE=~/.starship/cache @@ -43,7 +43,7 @@ export STARSHIP_CACHE=~/.starship/cache De manière équivalente, pour Powershell (Windows), ajoutez la ligne suivante à votre `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -51,7 +51,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" **Module**: Un composant dans l'invite donnant des informations basées sur des informations contextuelles à propos de votre Système d'Exploitation. Par exemple, le module "nodejs" montre la version de NodeJS qui est actuellement installée sur votre ordinateur, si votre répertoire actuel est un projet NodeJS. -**Variable**: Smaller sub-components that contain information provided by the module. Par exemple, la variable "version" dans le module "nodejs" contient la version actuelle de NodeJS. +**Variable**: Petits sous-composants qui contiennent des informations fournies par le module. Par exemple, la variable "version" dans le module "nodejs" contient la version actuelle de NodeJS. Par convention, la plupart des modules ont un préfixe de la couleur par défaut du terminal (par exemple `via` dans "nodejs") et un espace vide comme suffixe. @@ -375,7 +375,7 @@ Par défaut, il ne change que la couleur. Si vous voulez également changer sa f | Option | Défaut | Description | | ---------------- | ------------------- | ----------------------------------------------------------------------------- | -| `format` | `"$symbol "` | Le format utilisée avant l'entrée de texte. | +| `format` | `"$symbol "` | Le format utilisé avant l'entrée de texte. | | `success_symbol` | `"[❯](bold green)"` | Le format utilisé avant l'entrée de texte si la commande précédente a réussi. | | `error_symbol` | `"[❯](bold red)"` | Le format utilisé avant l'entrée de texte si la commande précédente a échoué. | | `vicmd_symbol` | `"[❮](bold green)"` | Le format utilisé avant l'entrée de texte si le shell est en mode vim normal. | @@ -385,7 +385,7 @@ Par défaut, il ne change que la couleur. Si vous voulez également changer sa f | Variable | Exemple | Description | | -------- | ------- | --------------------------------------------------------------- | -| symbol | | Reflète sois `success_symbol`, `error_symbol` ou `vicmd_symbol` | +| symbol | | Reflète soit `success_symbol`, `error_symbol` ou `vicmd_symbol` | ### Exemples @@ -427,12 +427,12 @@ Le module `cmake` affiche la version actuellement installée de CMake si l'une d ### Options -| Option | Défaut | Description | -| ---------- | ---------------------------------- | --------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | Format du module. | -| `symbol` | `"喝 "` | Le symbole utilisé avant la version de cmake. | -| `style` | `"bold blue"` | Le style du module. | -| `disabled` | `false` | Désactive le module `cmake`. | +| Option | Défaut | Description | +| ---------- | ------------------------------------ | --------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Format du module. | +| `symbol` | `"喝 "` | Le symbole utilisé avant la version de cmake. | +| `style` | `"bold blue"` | Le style du module. | +| `disabled` | `false` | Désactive le module `cmake`. | ### Variables @@ -454,7 +454,7 @@ Si vous utilisez starship en `bash`, n'accrochez pas `DEBUG` après avoir exécu ::: -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. +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'exécuter `eval $(starship init $0)`, puis procédez comme d'habitude. ### Options @@ -470,7 +470,7 @@ Les utilisateurs de Bash qui ont besoin de fonctionnalité pré-exec peuvent uti ::: tip -Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. +L'affichage des notifications de bureau nécessite que starship soit compilé avec la prise en charge de `rust-notify`. Vérifiez si starship supporte les notifications en exécutant `STARSHIP_LOG=debug starship module cmd_duration -d 60000` lorsque `show_notifications` est défini à `true`. ::: @@ -535,19 +535,19 @@ format = "[$symbol$environment](dimmed green) " ## Crystal -Le module `crystal` affiche la version actuellement installée de Crystal. Le module est affiché si l'une des ces conditions est remplie : +Le module `crystal` affiche la version actuellement installée de Crystal. Le module est affiché si l'une de ces conditions est remplie : - Le répertoire courant contient un fichier `shard.yml` - Le répertoire courant contient un fichier `.cr` ### Options -| Option | Défaut | Description | -| ---------- | ---------------------------------- | ---------------------------------------------------------- | -| `symbol` | `"🔮 "` | Le symbole utilisé avant d'afficher la version de crystal. | -| `style` | `"bold green"` | Le style du module. | -| `format` | `"via [$symbol$version]($style) "` | Format du module. | -| `disabled` | `false` | Désactive le module `crystal`. | +| Option | Défaut | Description | +| ---------- | ------------------------------------ | ---------------------------------------------------------- | +| `symbol` | `"🔮 "` | Le symbole utilisé avant d'afficher la version de crystal. | +| `style` | `"bold green"` | Le style du module. | +| `format` | `"via [$symbol($version )]($style)"` | Format du module. | +| `disabled` | `false` | Désactive le module `crystal`. | ### Variables @@ -570,7 +570,7 @@ format = "via [✨ $version](bold blue) " ## Dart -Le module `crystal` affiche la version courante installée de Dart. Le module est affiché si l'une des ces conditions est remplie : +Le module `dart` affiche la version courante installée de Dart. Le module est affiché si l'une de ces conditions est remplie : - Le répertoire courant contient un fichier `.dart` - Le répertoire courant contient un répertoire `.dart_tool` @@ -578,12 +578,12 @@ Le module `crystal` affiche la version courante installée de Dart. Le module es ### Options -| Option | Défaut | Description | -| ---------- | ---------------------------------- | -------------------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | Format du module. | -| `symbol` | `"🎯 "` | Une chaîne de caractères représentant le symbole de Dart | -| `style` | `"bold blue"` | Le style du module. | -| `disabled` | `false` | Désactive le module `dart`. | +| Option | Défaut | Description | +| ---------- | ------------------------------------ | -------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Format du module. | +| `symbol` | `"🎯 "` | Une chaîne de caractères représentant le symbole de Dart | +| `style` | `"bold blue"` | Le style du module. | +| `disabled` | `false` | Désactive le module `dart`. | ### Variables @@ -606,9 +606,9 @@ format = "via [🔰 $version](bold red) " ## Dossier -Le mode `directory` montre le chemin de votre dossier actuel, tronqué au 3 dossiers parents. Votre répertoire sera également tronqué à la racine du repo git dans lequel vous vous trouvez actuellement. +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. -Quand vous utilisez le style pwd de fish, au lieu de cacher le chemin qui est troqué, vous verrez un nom raccourcis de chaque dossiers basés sur le nombre établi pour l'option. +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. 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. @@ -624,6 +624,7 @@ Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
Ce module possède quelques options de configuration avancées qui contrôlent l'affichage du répertoire. @@ -671,19 +672,19 @@ 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` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `style` | `"blue bold"` | Le style du module. | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | 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. | +| `style` | `"blue bold"` | Le style du module. | +| `only_with_files` | `true` | Affiché quand il y a un `docker-compose.yml`, `docker-compose.yaml`, ou un `Dockerfile` dans le dossier actuel. | +| `disabled` | `false` | Désactive le module `docker_context`. | ### Variables | Variable | Exemple | Description | | --------- | -------------- | -------------------------------------- | -| context | `test_context` | The current docker context | +| context | `test_context` | Le contexte actuel de Docker | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | @@ -722,13 +723,13 @@ The module will also show the Target Framework Moniker ( "` | Le symbole utilisé avant d'afficher la version de PureScript. | -| `style` | `"bold white"` | Le style du module. | -| `disabled` | `false` | Désactive le module `purescript`. | +| Option | Défaut | Description | +| ---------- | ------------------------------------ | ------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Format du module. | +| `symbol` | `"<=> "` | Le symbole utilisé avant d'afficher la version de PureScript. | +| `style` | `"bold white"` | Le style du module. | +| `disabled` | `false` | Désactive le module `purescript`. | ### Variables @@ -1958,16 +1959,16 @@ Le module est affiché si l'une des ces conditions est remplie : ### Options -| Option | Défaut | Description | -| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | Format du module. | -| `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 | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | Défaut | Description | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | Format du module. | +| `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 | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2016,12 +2017,12 @@ The `ruby` module shows the currently installed version of Ruby. Le module est a ### Options -| Option | Défaut | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | Format du module. | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold green"` | Le style du module. | -| `disabled` | `false` | Disables the `ruby` module. | +| Option | Défaut | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | Format du module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold green"` | Le style du module. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -2051,12 +2052,12 @@ The `rust` module shows the currently installed version of Rust. Le module est a ### Options -| Option | Défaut | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | Format du module. | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold green"` | Le style du module. | -| `disabled` | `false` | Disables the `rust` module. | +| Option | Défaut | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Format du module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold green"` | Le style du module. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -2157,18 +2158,18 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur ### Options -| Option | Défaut | Description | -| ----------------------- | -------------------------- | ---------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `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 green"` | Le style du module. | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `disabled` | `true` | Disables the `status` module. | +| Option | Défaut | Description | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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 green"` | Le style du module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables @@ -2209,12 +2210,12 @@ The `swift` module shows the currently installed version of Swift. Le module est ### Options -| Option | Défaut | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | Format du module. | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `style` | `"bold 202"` | Le style du module. | -| `disabled` | `false` | Disables the `swift` module. | +| Option | Défaut | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | Format du module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | Le style du module. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -2237,7 +2238,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). Le module est affiché si l'une des ces conditions est remplie : +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +Le module est affiché si l'une des ces conditions est remplie : - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2381,12 +2390,12 @@ The `zig` module shows the currently installed version of Zig. Le module est aff ### Options -| Option | Défaut | Description | -| ---------- | ---------------------------------- | ----------------------------------------------------- | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | Le style du module. | -| `format` | `"via [$symbol$version]($style) "` | Format du module. | -| `disabled` | `false` | Disables the `zig` module. | +| Option | Défaut | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | Le style du module. | +| `format` | `"via [$symbol($version )]($style)"` | Format du module. | +| `disabled` | `false` | Disables the `zig` module. | ### Variables @@ -2438,19 +2447,19 @@ The order in which custom modules are shown can be individually set by including ### Options -| Option | Défaut | Description | -| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `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"` | Le style du module. | -| `format` | `"[$symbol$output]($style) "` | Format du module. | -| `disabled` | `false` | Disables this `custom` module. | +| Option | Défaut | Description | +| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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"` | Le style du module. | +| `format` | `"[$symbol($output )]($style)"` | Format du module. | +| `disabled` | `false` | Disables this `custom` module. | ### Variables diff --git a/docs/fr-FR/faq/README.md b/docs/fr-FR/faq/README.md index 6590a1303..b66ed3124 100644 --- a/docs/fr-FR/faq/README.md +++ b/docs/fr-FR/faq/README.md @@ -12,7 +12,7 @@ ## Comment puis-je obtenir la complétion de commandes comme montré dans le GIF de démo? -Completion support, or autocomplete, is provided by your shell of choice. Dans le cas de la démo, elle a été faite avec [Fish Shell](https://fishshell.com/), qui fournit des complétions par défaut. Si vous utilisez le Shell Z (zsh), vous pouvez jeter un œil à [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). +L'aide à la complétion ou autocomplétion est fournie par le shell que vous avez choisi. Dans le cas de la démo, elle a été faite avec [Fish Shell](https://fishshell.com/), qui fournit des complétions par défaut. Si vous utilisez le Shell Z (zsh), vous pouvez jeter un œil à [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). ## Est-ce que l'option globale `format` et `.disabled` font la même chose ? diff --git a/docs/fr-FR/guide/README.md b/docs/fr-FR/guide/README.md index 80a92bd38..d0a288a56 100644 --- a/docs/fr-FR/guide/README.md +++ b/docs/fr-FR/guide/README.md @@ -194,9 +194,9 @@ #### PowerShell - Ajoutez ce qui suit à la fin de `Microsoft.PowerShell_profile.ps1`. Vous pouvez vérifier l'emplacement de ce fichier en regardant la variable `$PROFILE` dans PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + Ajouter ce qui suit à la fin de `Microsoft.PowerShell_profile.ps1`. Vous pouvez vérifier l'emplacement de ce fichier en regardant la variable `$PROFILE` dans PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. - ```sh + ```powershell Invoke-Expression (&starship init powershell) ``` diff --git a/docs/fr-FR/installing/README.md b/docs/fr-FR/installing/README.md index 6f0ea0d6b..c2b30a25d 100644 --- a/docs/fr-FR/installing/README.md +++ b/docs/fr-FR/installing/README.md @@ -1,45 +1,45 @@ -# 🚀 Advanced Installation +# 🚀 Installation avancée -To install starship, you need to do two things: +Pour installer starship, vous devez faire deux choses: -1. Get the **starship** binary onto your computer -1. Tell your shell to use the starship binary as its prompt by modifying its init scripts +1. Installez le binaire **starship** sur votre ordinateur +1. Dites à votre shell d'utiliser le binaire de starship comme invite en modifiant ses scripts d'initialisation -For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed. +Pour la plupart des utilisateurs, les instructions sur [la page principale](/guide/#🚀-installation) fonctionneront bien. Cependant, pour certaines plateformes plus spécialisées, des instructions différentes sont nécessaires. -There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out! +Il y a tellement de plates-formes, qu'il aurait été déraisonnable de les faire apparaître dans le README principal, voici donc quelques instructions d'installation supplémentaires pour celles-ci, écrient par la commaunauté. La vôtre n'est-elle pas là ? S'il vous plaît, ajoutez-la ici pour les suivants ! ## [Nix](https://nixos.wiki/wiki/Nix) -### Getting the Binary +### Obtention du binaire -#### Imperatively +#### Impératif ```sh nix-env -iA nixos.starship ``` -#### Declarative, single user, via [home-manager](home-manager) +#### Déclaration, utilisateur unique, via [home-manager](home-manager) -Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run +Ajoutez `pkgs.starship` à votre `home.packages` dans votre fichier `home.nix` puis exécutez ```sh home-manager switch ``` -#### Declarative, system-wide, with NixOS +#### Déclaration, au niveau du système, avec NixOS -Add `pkgs.starship` to `environment.packages` in your `configuration.nix`, then run +Ajoutez `pkgs.starship` à `environment.packages` dans votre `configuration.nix`, puis exécutez ```sh sudo nixos-rebuild switch ``` -### Modifying Init Scripts +### Modification des scripts d'initialisation -#### With Nix and home-manager, using zsh: +#### Avec Nix et home manager, en utilisant zsh : -Add the following to `programs.zsh.initExtra` in your `home.nix` file, then run +Ajoutez les éléments suivants à `programs.zsh.initExtra` dans votre fichier `home.nix` puis exécuter ```sh home-manager switch diff --git a/docs/it-IT/config/README.md b/docs/it-IT/config/README.md index 31490be6c..9e9e3cf93 100644 --- a/docs/it-IT/config/README.md +++ b/docs/it-IT/config/README.md @@ -29,7 +29,7 @@ export STARSHIP_CONFIG=~/.starship Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -43,7 +43,7 @@ export STARSHIP_CACHE=~/.starship/cache Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -427,12 +427,12 @@ The `cmake` module shows the currently installed version of CMake if any of the ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `cmake` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | -------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -542,12 +542,12 @@ The `crystal` module shows the currently installed version of Crystal. The modul ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | --------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `style` | `"bold red"` | The style for the module. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `crystal` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables @@ -578,12 +578,12 @@ The `dart` module shows the currently installed version of Dart. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `dart` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -624,6 +624,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
This module has a few advanced configuration options that control how the directory is displayed. @@ -671,13 +672,13 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Options -| Option | Default | Description | -| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `style` | `"blue bold"` | The style for the module. | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | Disables the `docker_context` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -722,13 +723,13 @@ The module will also show the Target Framework Moniker ( "` | The symbol used before displaying the version of PureScript. | -| `style` | `"bold white"` | The style for the module. | -| `disabled` | `false` | Disables the `purescript` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -1958,16 +1959,16 @@ The module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the 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 | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | Default | Description | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the 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 | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2016,12 +2017,12 @@ The `ruby` module shows the currently installed version of Ruby. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `ruby` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -2051,12 +2052,12 @@ The `rust` module shows the currently installed version of Rust. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `rust` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -2157,18 +2158,18 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ----------------------- | -------------------------- | ---------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `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"` | The style for the module. | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `disabled` | `true` | Disables the `status` module. | +| Option | Default | Description | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables @@ -2209,12 +2210,12 @@ The `swift` module shows the currently installed version of Swift. The module wi ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `style` | `"bold 202"` | The style for the module. | -| `disabled` | `false` | Disables the `swift` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -2237,7 +2238,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). The module will be shown if any of the following conditions are met: +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +The module will be shown if any of the following conditions are met: - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2381,12 +2390,12 @@ The `zig` module shows the currently installed version of Zig. The module will b ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------------- | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | The style for the module. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `zig` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | ### Variables @@ -2438,19 +2447,19 @@ The order in which custom modules are shown can be individually set by including ### Options -| Option | Default | Description | -| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `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"` | The style for the module. | -| `format` | `"[$symbol$output]($style) "` | The format for the module. | -| `disabled` | `false` | Disables this `custom` module. | +| Option | Default | Description | +| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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"` | The style for the module. | +| `format` | `"[$symbol($output )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables this `custom` module. | ### Variables diff --git a/docs/it-IT/guide/README.md b/docs/it-IT/guide/README.md index b72b93721..a99cd23dc 100644 --- a/docs/it-IT/guide/README.md +++ b/docs/it-IT/guide/README.md @@ -196,7 +196,7 @@ Aggiungi quanto segue alla fine di `Microsoft.PowerShell_profile.ps1`. Puoi controllare la posizione di questo file interrogando la variabile `$PROFILE` in PowerShell. Tipicamente il percorso è `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` oppure `~/.config/powershell/Microsoft.PowerShell_profile.ps1` su -Nix. - ```sh + ```powershell Invoke-Expression (&starship init powershell) ``` diff --git a/docs/ja-JP/config/README.md b/docs/ja-JP/config/README.md index 9efac3dcb..a72de6d2f 100644 --- a/docs/ja-JP/config/README.md +++ b/docs/ja-JP/config/README.md @@ -29,7 +29,7 @@ export STARSHIP_CONFIG=~/.starship PowerShell (Windows) で同様に `$PROFILE`にこの行を追加します。 -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -43,7 +43,7 @@ export STARSHIP_CACHE=~/.starship/cache PowerShell (Windows) で同様に `$PROFILE`にこの行を追加します。 -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -51,7 +51,7 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" **モジュール**: OSのコンテキスト情報に基づいて情報を提供するプロンプト内のコンポーネントです。 たとえば、現在のディレクトリがNodeJSプロジェクトである場合、「nodejs」モジュールは、現在コンピューターにインストールされているNodeJSのバージョンを表示します。 -**Variable**: Smaller sub-components that contain information provided by the module. 例えば、"nodejs" モジュール内の "version" 変数には、NodeJS の現在のバージョンが含まれています。 +**変数**: モジュールが提供する情報を含むサブコンポーネントを小さくする。 例えば、"nodejs" モジュール内の "version" 変数には、NodeJS の現在のバージョンが含まれています。 慣例により、ほとんどのモジュールにはデフォルトの端末色の接頭辞(「nodejs」の`via` など)と接尾辞として空のスペースがあります。 @@ -374,13 +374,13 @@ style = "bold yellow" ### オプション -| オプション | デフォルト | 説明 | -| ---------------- | ------------------- | -------------------------------------------------------------------------------- | -| `format` | `"$symbol "` | The format string used before the text input. | -| `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. | -| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | -| `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | -| `disabled` | `false` | `character`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ---------------- | ------------------- | -------------------------------------------- | +| `format` | `"$symbol"` | テキスト入力の前に使用される書式文字列。 | +| `success_symbol` | `"[❯](bold green)"` | 前のコマンドが成功した場合にテキスト入力の前に使用される書式文字列です。 | +| `error_symbol` | `"[❯](bold red)"` | 前のコマンドが失敗した場合にテキスト入力の前に使用される書式文字列です。 | +| `vicmd_symbol` | `"[❮](bold green)"` | シェルが vim ノーマルモードの場合にテキスト入力の前に使用されるフォーマット文字列。 | +| `disabled` | `false` | `character`モジュールを無効にします。 | ### 変数 @@ -428,12 +428,12 @@ The `cmake` module shows the currently installed version of CMake if any of the ### オプション -| オプション | デフォルト | 説明 | -| ---------- | ---------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `cmake` module. | +| オプション | デフォルト | 説明 | +| ---------- | ------------------------------------ | -------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `cmake` module. | ### 変数 @@ -543,12 +543,12 @@ format = "[$symbol$environment](dimmed green) " ### オプション -| オプション | デフォルト | 説明 | -| ---------- | ---------------------------------- | ------------------------------ | -| `symbol` | `"🔮 "` | Crystalのバージョンを表示する前に使用される記号です。 | -| `style` | `"bold red"` | モジュールのスタイルです。 | -| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 | -| `disabled` | `false` | `crystal`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ---------- | ------------------------------------ | ------------------------------ | +| `symbol` | `"🔮 "` | Crystalのバージョンを表示する前に使用される記号です。 | +| `style` | `"bold red"` | モジュールのスタイルです。 | +| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | +| `disabled` | `false` | `crystal`モジュールを無効にします。 | ### 変数 @@ -579,12 +579,12 @@ The `dart` module shows the currently installed version of Dart. 次の条件の ### オプション -| オプション | デフォルト | 説明 | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `dart` module. | +| オプション | デフォルト | 説明 | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `dart` module. | ### 変数 @@ -625,6 +625,7 @@ fishスタイルのpwdオプションを使用すると、切り捨てられた | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
このモジュールは、どのようにディレクトリを表示するかについての高度なオプションをいくつか持っています。 @@ -672,13 +673,13 @@ truncation_symbol = "…/" ### オプション -| オプション | デフォルト | 説明 | -| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | moduleのフォーマットです。 | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `style` | `"blue bold"` | モジュールのスタイルです。 | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | `docker_context`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | moduleのフォーマットです。 | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | モジュールのスタイルです。 | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | `docker_context`モジュールを無効にします。 | ### 変数 @@ -723,13 +724,13 @@ The module will also show the Target Framework Moniker ( "` | The symbol used before displaying the version of PureScript. | -| `style` | `"bold white"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `purescript` module. | +| オプション | デフォルト | 説明 | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `purescript` module. | ### 変数 @@ -1960,16 +1961,16 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name ### オプション -| オプション | デフォルト | 説明 | -| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | moduleのフォーマットです。 | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | モジュールのスタイルです。 | -| `pyenv_version_name` | `false` | pyenvを使用してPythonバージョンを取得します | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `disabled` | `false` | `python`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | moduleのフォーマットです。 | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | モジュールのスタイルです。 | +| `pyenv_version_name` | `false` | pyenvを使用してPythonバージョンを取得します | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | `python`モジュールを無効にします。 | ::: tip @@ -2018,12 +2019,12 @@ python_binary = "python3" ### オプション -| オプション | デフォルト | 説明 | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold red"` | モジュールのスタイルです。 | -| `disabled` | `false` | `ruby`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | モジュールのスタイルです。 | +| `disabled` | `false` | `ruby`モジュールを無効にします。 | ### 変数 @@ -2053,12 +2054,12 @@ symbol = "🔺 " ### オプション -| オプション | デフォルト | 説明 | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold red"` | モジュールのスタイルです。 | -| `disabled` | `false` | `rust`モジュールを無効にします。 | +| オプション | デフォルト | 説明 | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | モジュールのスタイルです。 | +| `disabled` | `false` | `rust`モジュールを無効にします。 | ### 変数 @@ -2159,18 +2160,18 @@ The `status` module displays the exit code of the previous command. The module w ### オプション -| オプション | デフォルト | 説明 | -| ----------------------- | -------------------------- | ---------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `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"` | モジュールのスタイルです。 | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `disabled` | `true` | Disables the `status` module. | +| オプション | デフォルト | 説明 | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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"` | モジュールのスタイルです。 | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### 変数 @@ -2211,12 +2212,12 @@ The `swift` module shows the currently installed version of Swift. 次の条件 ### オプション -| オプション | デフォルト | 説明 | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `style` | `"bold 202"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `swift` module. | +| オプション | デフォルト | 説明 | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `swift` module. | ### 変数 @@ -2239,7 +2240,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). 次の条件のいずれかが満たされると、モジュールが表示されます。 +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +次の条件のいずれかが満たされると、モジュールが表示されます。 - カレントディレクトリに`.terraform`フォルダが含まれている - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2383,12 +2392,12 @@ The `zig` module shows the currently installed version of Zig. 次の条件の ### オプション -| オプション | デフォルト | 説明 | -| ---------- | ---------------------------------- | ----------------------------------------------------- | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | -| `format` | `"via [$symbol$version]($style) "` | moduleのフォーマットです。 | -| `disabled` | `false` | Disables the `zig` module. | +| オプション | デフォルト | 説明 | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | モジュールのスタイルです。 | +| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | +| `disabled` | `false` | Disables the `zig` module. | ### 変数 @@ -2440,19 +2449,19 @@ The order in which custom modules are shown can be individually set by including ### オプション -| オプション | デフォルト | 説明 | -| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `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`. | -| `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"` | モジュールのスタイルです。 | -| `format` | `"[$symbol$output]($style) "` | moduleのフォーマットです。 | -| `disabled` | `false` | Disables this `custom` module. | +| オプション | デフォルト | 説明 | +| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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`. | +| `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"` | モジュールのスタイルです。 | +| `format` | `"[$symbol($output )]($style)"` | moduleのフォーマットです。 | +| `disabled` | `false` | Disables this `custom` module. | ### 変数 diff --git a/docs/ja-JP/guide/README.md b/docs/ja-JP/guide/README.md index 1d4171eea..7c0311207 100644 --- a/docs/ja-JP/guide/README.md +++ b/docs/ja-JP/guide/README.md @@ -196,7 +196,7 @@ Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. - ```sh + ```powershell Invoke-Expression (&starship init powershell) ``` diff --git a/docs/ko-KR/README.md b/docs/ko-KR/README.md index 4767ca0b1..cfdd95989 100644 --- a/docs/ko-KR/README.md +++ b/docs/ko-KR/README.md @@ -30,10 +30,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p ### Quick Install -1. Install the **starship** binary: +1. **starship** 바이러니 설치: - #### Install Latest Version + #### 최근 버전 설치 With Shell: diff --git a/docs/ko-KR/config/README.md b/docs/ko-KR/config/README.md index c9970753c..984ef22d4 100644 --- a/docs/ko-KR/config/README.md +++ b/docs/ko-KR/config/README.md @@ -29,7 +29,7 @@ export STARSHIP_CONFIG=~/.starship Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -43,7 +43,7 @@ export STARSHIP_CACHE=~/.starship/cache Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -427,12 +427,12 @@ The `cmake` module shows the currently installed version of CMake if any of the ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `cmake` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | -------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -542,12 +542,12 @@ The `crystal` module shows the currently installed version of Crystal. The modul ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | --------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `style` | `"bold red"` | The style for the module. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `crystal` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables @@ -578,12 +578,12 @@ The `dart` module shows the currently installed version of Dart. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `dart` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -624,6 +624,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
This module has a few advanced configuration options that control how the directory is displayed. @@ -671,13 +672,13 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Options -| Option | Default | Description | -| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `style` | `"blue bold"` | The style for the module. | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | Disables the `docker_context` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -722,13 +723,13 @@ The module will also show the Target Framework Moniker ( "` | The symbol used before displaying the version of PureScript. | -| `style` | `"bold white"` | The style for the module. | -| `disabled` | `false` | Disables the `purescript` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -1958,16 +1959,16 @@ The module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the 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 | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | Default | Description | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the 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 | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2016,12 +2017,12 @@ The `ruby` module shows the currently installed version of Ruby. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `ruby` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -2051,12 +2052,12 @@ The `rust` module shows the currently installed version of Rust. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `rust` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -2157,18 +2158,18 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ----------------------- | -------------------------- | ---------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `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"` | The style for the module. | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `disabled` | `true` | Disables the `status` module. | +| Option | Default | Description | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables @@ -2209,12 +2210,12 @@ The `swift` module shows the currently installed version of Swift. The module wi ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `style` | `"bold 202"` | The style for the module. | -| `disabled` | `false` | Disables the `swift` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -2237,7 +2238,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). The module will be shown if any of the following conditions are met: +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +The module will be shown if any of the following conditions are met: - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2381,12 +2390,12 @@ The `zig` module shows the currently installed version of Zig. The module will b ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------------- | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | The style for the module. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `zig` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | ### Variables @@ -2438,19 +2447,19 @@ The order in which custom modules are shown can be individually set by including ### Options -| Option | Default | Description | -| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `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"` | The style for the module. | -| `format` | `"[$symbol$output]($style) "` | The format for the module. | -| `disabled` | `false` | Disables this `custom` module. | +| Option | Default | Description | +| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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"` | The style for the module. | +| `format` | `"[$symbol($output )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables this `custom` module. | ### Variables diff --git a/docs/ko-KR/guide/README.md b/docs/ko-KR/guide/README.md index 9f33e569c..407933fb9 100644 --- a/docs/ko-KR/guide/README.md +++ b/docs/ko-KR/guide/README.md @@ -9,32 +9,32 @@ GitHub Actions workflow status + alt="깃헙 액션 워크풀로 상태" /> Crates.io version + alt="Crates.io 버전" /> Packaging status
Chat on Discord + alt="디스코드에 채팅을 하세요" /> Follow @StarshipPrompt on Twitter + alt="트위터에서 @StarshipPrompt를 팔로우 하세요" />

- Website + 웹사이트 · - Installation + 설치 · - Configuration + 설정

@@ -117,20 +117,20 @@ -## 🚀 Installation +## 🚀 설치 ### Prerequisites - A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). -### Getting Started +### 시작하기 **Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/). -1. Install the **starship** binary: +1. **starship** 바이러니 설치: - #### Install Latest Version + #### 최근 버전 설치 ##### From prebuilt binary, with Shell: @@ -143,7 +143,7 @@ #### Install via Package Manager - ##### Example: [Homebrew](https://brew.sh/): + ##### 예제: [Homebrew](https://brew.sh/): ```sh brew install starship @@ -192,11 +192,11 @@ ``` - #### PowerShell + #### 파워셀 Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. - ```sh + ```powershell Invoke-Expression (&starship init powershell) ``` @@ -211,7 +211,7 @@ eval $(starship init ion) ``` -## 🤝 Contributing +## 🤝 기여 We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). @@ -219,22 +219,22 @@ If you are fluent in a non-English language, we greatly appreciate any help keep If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋 -### Code Contributors +### 코드 기여 -This project exists thanks to all the people who contribute. [[Contribute](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. +This project exists thanks to all the people who contribute. [[기여](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. ### Financial Contributors -Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)] +Become a financial contributor and help us sustain our community. [[기여](https://opencollective.com/starship/contribute)] #### Individuals -#### Organizations +#### 조직 -Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)] +Support this project with your organization. Your logo will show up here with a link to your website. [[기여](https://opencollective.com/starship/contribute)] @@ -259,9 +259,9 @@ Please check out these previous works that helped inspire the creation of starsh


- Starship rocket icon + Starship 로켓 아이콘

-## 📝 License +## 📝라이선스 Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed. diff --git a/docs/nl-NL/config/README.md b/docs/nl-NL/config/README.md index c9970753c..984ef22d4 100644 --- a/docs/nl-NL/config/README.md +++ b/docs/nl-NL/config/README.md @@ -29,7 +29,7 @@ export STARSHIP_CONFIG=~/.starship Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -43,7 +43,7 @@ export STARSHIP_CACHE=~/.starship/cache Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -427,12 +427,12 @@ The `cmake` module shows the currently installed version of CMake if any of the ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `cmake` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | -------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -542,12 +542,12 @@ The `crystal` module shows the currently installed version of Crystal. The modul ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | --------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `style` | `"bold red"` | The style for the module. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `crystal` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables @@ -578,12 +578,12 @@ The `dart` module shows the currently installed version of Dart. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `dart` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -624,6 +624,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
This module has a few advanced configuration options that control how the directory is displayed. @@ -671,13 +672,13 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Options -| Option | Default | Description | -| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `style` | `"blue bold"` | The style for the module. | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | Disables the `docker_context` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -722,13 +723,13 @@ The module will also show the Target Framework Moniker ( "` | The symbol used before displaying the version of PureScript. | -| `style` | `"bold white"` | The style for the module. | -| `disabled` | `false` | Disables the `purescript` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -1958,16 +1959,16 @@ The module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the 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 | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | Default | Description | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the 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 | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2016,12 +2017,12 @@ The `ruby` module shows the currently installed version of Ruby. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `ruby` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -2051,12 +2052,12 @@ The `rust` module shows the currently installed version of Rust. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `rust` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -2157,18 +2158,18 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ----------------------- | -------------------------- | ---------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `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"` | The style for the module. | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `disabled` | `true` | Disables the `status` module. | +| Option | Default | Description | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables @@ -2209,12 +2210,12 @@ The `swift` module shows the currently installed version of Swift. The module wi ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `style` | `"bold 202"` | The style for the module. | -| `disabled` | `false` | Disables the `swift` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -2237,7 +2238,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). The module will be shown if any of the following conditions are met: +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +The module will be shown if any of the following conditions are met: - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2381,12 +2390,12 @@ The `zig` module shows the currently installed version of Zig. The module will b ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------------- | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | The style for the module. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `zig` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | ### Variables @@ -2438,19 +2447,19 @@ The order in which custom modules are shown can be individually set by including ### Options -| Option | Default | Description | -| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `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"` | The style for the module. | -| `format` | `"[$symbol$output]($style) "` | The format for the module. | -| `disabled` | `false` | Disables this `custom` module. | +| Option | Default | Description | +| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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"` | The style for the module. | +| `format` | `"[$symbol($output )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables this `custom` module. | ### Variables diff --git a/docs/nl-NL/guide/README.md b/docs/nl-NL/guide/README.md index 9f33e569c..c53391a57 100644 --- a/docs/nl-NL/guide/README.md +++ b/docs/nl-NL/guide/README.md @@ -196,7 +196,7 @@ Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. - ```sh + ```powershell Invoke-Expression (&starship init powershell) ``` diff --git a/docs/pl-PL/config/README.md b/docs/pl-PL/config/README.md index c9970753c..984ef22d4 100644 --- a/docs/pl-PL/config/README.md +++ b/docs/pl-PL/config/README.md @@ -29,7 +29,7 @@ export STARSHIP_CONFIG=~/.starship Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -43,7 +43,7 @@ export STARSHIP_CACHE=~/.starship/cache Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -427,12 +427,12 @@ The `cmake` module shows the currently installed version of CMake if any of the ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `cmake` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | -------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -542,12 +542,12 @@ The `crystal` module shows the currently installed version of Crystal. The modul ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | --------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `style` | `"bold red"` | The style for the module. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `crystal` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables @@ -578,12 +578,12 @@ The `dart` module shows the currently installed version of Dart. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `dart` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -624,6 +624,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
This module has a few advanced configuration options that control how the directory is displayed. @@ -671,13 +672,13 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Options -| Option | Default | Description | -| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `style` | `"blue bold"` | The style for the module. | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | Disables the `docker_context` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -722,13 +723,13 @@ The module will also show the Target Framework Moniker ( "` | The symbol used before displaying the version of PureScript. | -| `style` | `"bold white"` | The style for the module. | -| `disabled` | `false` | Disables the `purescript` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -1958,16 +1959,16 @@ The module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the 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 | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | Default | Description | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the 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 | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2016,12 +2017,12 @@ The `ruby` module shows the currently installed version of Ruby. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `ruby` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -2051,12 +2052,12 @@ The `rust` module shows the currently installed version of Rust. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `rust` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -2157,18 +2158,18 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ----------------------- | -------------------------- | ---------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `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"` | The style for the module. | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `disabled` | `true` | Disables the `status` module. | +| Option | Default | Description | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables @@ -2209,12 +2210,12 @@ The `swift` module shows the currently installed version of Swift. The module wi ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `style` | `"bold 202"` | The style for the module. | -| `disabled` | `false` | Disables the `swift` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -2237,7 +2238,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). The module will be shown if any of the following conditions are met: +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +The module will be shown if any of the following conditions are met: - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2381,12 +2390,12 @@ The `zig` module shows the currently installed version of Zig. The module will b ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------------- | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | The style for the module. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `zig` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | ### Variables @@ -2438,19 +2447,19 @@ The order in which custom modules are shown can be individually set by including ### Options -| Option | Default | Description | -| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `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"` | The style for the module. | -| `format` | `"[$symbol$output]($style) "` | The format for the module. | -| `disabled` | `false` | Disables this `custom` module. | +| Option | Default | Description | +| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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"` | The style for the module. | +| `format` | `"[$symbol($output )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables this `custom` module. | ### Variables diff --git a/docs/pl-PL/guide/README.md b/docs/pl-PL/guide/README.md index 9f33e569c..c53391a57 100644 --- a/docs/pl-PL/guide/README.md +++ b/docs/pl-PL/guide/README.md @@ -196,7 +196,7 @@ Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. - ```sh + ```powershell Invoke-Expression (&starship init powershell) ``` diff --git a/docs/pt-BR/config/README.md b/docs/pt-BR/config/README.md index a106870e3..0a9d1cacc 100644 --- a/docs/pt-BR/config/README.md +++ b/docs/pt-BR/config/README.md @@ -29,7 +29,7 @@ export STARSHIP_CONFIG=~/.starship No PowerShell (Windows) você pode adicionar a seguinte linha no seu `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -43,7 +43,7 @@ export STARSHIP_CACHE=~/.starship/cache No PowerShell (Windows) você pode adicionar a seguinte linha no seu `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -427,12 +427,12 @@ The `cmake` module shows the currently installed version of CMake if any of the ### Opções -| Option | Padrão | Descrição | -| ---------- | ---------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | -| `style` | `"bold blue"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `cmake` module. | +| Option | Padrão | Descrição | +| ---------- | ------------------------------------ | -------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | O estilo do módulo. | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -542,12 +542,12 @@ The `crystal` module shows the currently installed version of Crystal. The modul ### Opções -| Option | Padrão | Descrição | -| ---------- | ---------------------------------- | --------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `style` | `"bold red"` | O estilo do módulo. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `crystal` module. | +| Option | Padrão | Descrição | +| ---------- | ------------------------------------ | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | O estilo do módulo. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables @@ -578,12 +578,12 @@ The `dart` module shows the currently installed version of Dart. The module will ### Opções -| Option | Padrão | Descrição | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `style` | `"bold blue"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `dart` module. | +| Option | Padrão | Descrição | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | O estilo do módulo. | +| `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -624,6 +624,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
This module has a few advanced configuration options that control how the directory is displayed. @@ -671,13 +672,13 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Opções -| Option | Padrão | Descrição | -| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `style` | `"blue bold"` | O estilo do módulo. | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | Disables the `docker_context` module. | +| Option | Padrão | Descrição | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | O estilo do módulo. | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -722,13 +723,13 @@ The module will also show the Target Framework Moniker ( "` | The symbol used before displaying the version of PureScript. | -| `style` | `"bold white"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `purescript` module. | +| Option | Padrão | Descrição | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | O estilo do módulo. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -1958,16 +1959,16 @@ The module will be shown if any of the following conditions are met: ### Opções -| Option | Padrão | Descrição | -| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `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 | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | Padrão | Descrição | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | The format for the module. | +| `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 | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2016,12 +2017,12 @@ The `ruby` module shows the currently installed version of Ruby. The module will ### Opções -| Option | Padrão | Descrição | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold red"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `ruby` module. | +| Option | Padrão | Descrição | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | O estilo do módulo. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -2051,12 +2052,12 @@ The `rust` module shows the currently installed version of Rust. The module will ### Opções -| Option | Padrão | Descrição | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold red"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `rust` module. | +| Option | Padrão | Descrição | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | O estilo do módulo. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -2157,18 +2158,18 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Opções -| Option | Padrão | Descrição | -| ----------------------- | -------------------------- | ---------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `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` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `disabled` | `true` | Disables the `status` module. | +| Option | Padrão | Descrição | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables @@ -2209,12 +2210,12 @@ The `swift` module shows the currently installed version of Swift. The module wi ### Opções -| Option | Padrão | Descrição | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `style` | `"bold 202"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `swift` module. | +| Option | Padrão | Descrição | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | O estilo do módulo. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -2237,7 +2238,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). The module will be shown if any of the following conditions are met: +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +The module will be shown if any of the following conditions are met: - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2381,12 +2390,12 @@ The `zig` module shows the currently installed version of Zig. The module will b ### Opções -| Option | Padrão | Descrição | -| ---------- | ---------------------------------- | ----------------------------------------------------- | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | O estilo do módulo. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `zig` module. | +| Option | Padrão | Descrição | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | O estilo do módulo. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | ### Variables @@ -2438,19 +2447,19 @@ The order in which custom modules are shown can be individually set by including ### Opções -| Option | 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) | -| `descrição` | `""` | 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) "` | The format for the module. | -| `disabled` | `false` | Disables this `custom` module. | +| Option | 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) | +| `descrição` | `""` | 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)"` | The format for the module. | +| `disabled` | `false` | Disables this `custom` module. | ### Variables diff --git a/docs/pt-BR/guide/README.md b/docs/pt-BR/guide/README.md index b74b85efb..385831474 100644 --- a/docs/pt-BR/guide/README.md +++ b/docs/pt-BR/guide/README.md @@ -196,7 +196,7 @@ Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. - ```sh + ```powershell Invoke-Expression (&starship init powershell) ``` diff --git a/docs/pt-PT/config/README.md b/docs/pt-PT/config/README.md index c9970753c..984ef22d4 100644 --- a/docs/pt-PT/config/README.md +++ b/docs/pt-PT/config/README.md @@ -29,7 +29,7 @@ export STARSHIP_CONFIG=~/.starship Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -43,7 +43,7 @@ export STARSHIP_CACHE=~/.starship/cache Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -427,12 +427,12 @@ The `cmake` module shows the currently installed version of CMake if any of the ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `cmake` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | -------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -542,12 +542,12 @@ The `crystal` module shows the currently installed version of Crystal. The modul ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | --------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `style` | `"bold red"` | The style for the module. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `crystal` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables @@ -578,12 +578,12 @@ The `dart` module shows the currently installed version of Dart. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `dart` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -624,6 +624,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
This module has a few advanced configuration options that control how the directory is displayed. @@ -671,13 +672,13 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Options -| Option | Default | Description | -| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `style` | `"blue bold"` | The style for the module. | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | Disables the `docker_context` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -722,13 +723,13 @@ The module will also show the Target Framework Moniker ( "` | The symbol used before displaying the version of PureScript. | -| `style` | `"bold white"` | The style for the module. | -| `disabled` | `false` | Disables the `purescript` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -1958,16 +1959,16 @@ The module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the 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 | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | Default | Description | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the 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 | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2016,12 +2017,12 @@ The `ruby` module shows the currently installed version of Ruby. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `ruby` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -2051,12 +2052,12 @@ The `rust` module shows the currently installed version of Rust. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `rust` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -2157,18 +2158,18 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ----------------------- | -------------------------- | ---------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `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"` | The style for the module. | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `disabled` | `true` | Disables the `status` module. | +| Option | Default | Description | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables @@ -2209,12 +2210,12 @@ The `swift` module shows the currently installed version of Swift. The module wi ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `style` | `"bold 202"` | The style for the module. | -| `disabled` | `false` | Disables the `swift` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -2237,7 +2238,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). The module will be shown if any of the following conditions are met: +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +The module will be shown if any of the following conditions are met: - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2381,12 +2390,12 @@ The `zig` module shows the currently installed version of Zig. The module will b ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------------- | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | The style for the module. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `zig` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | ### Variables @@ -2438,19 +2447,19 @@ The order in which custom modules are shown can be individually set by including ### Options -| Option | Default | Description | -| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `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"` | The style for the module. | -| `format` | `"[$symbol$output]($style) "` | The format for the module. | -| `disabled` | `false` | Disables this `custom` module. | +| Option | Default | Description | +| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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"` | The style for the module. | +| `format` | `"[$symbol($output )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables this `custom` module. | ### Variables diff --git a/docs/pt-PT/guide/README.md b/docs/pt-PT/guide/README.md index 9f33e569c..c53391a57 100644 --- a/docs/pt-PT/guide/README.md +++ b/docs/pt-PT/guide/README.md @@ -196,7 +196,7 @@ Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. - ```sh + ```powershell Invoke-Expression (&starship init powershell) ``` diff --git a/docs/ru-RU/config/README.md b/docs/ru-RU/config/README.md index fb541cdac..db35423c8 100644 --- a/docs/ru-RU/config/README.md +++ b/docs/ru-RU/config/README.md @@ -29,7 +29,7 @@ export STARSHIP_CONFIG=~/.starship Аналогично в PowerShell (Windows) следует добавить эту строку в `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -43,7 +43,7 @@ export STARSHIP_CACHE=~/.starship/cache Аналогично в PowerShell (Windows) следует добавить эту строку в `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -427,12 +427,12 @@ The `cmake` module shows the currently installed version of CMake if any of the ### Опции -| Параметр | По умолчанию | Описание | -| ---------- | ---------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | -| `style` | `"bold blue"` | Стиль модуля. | -| `disabled` | `false` | Disables the `cmake` module. | +| Параметр | По умолчанию | Описание | +| ---------- | ------------------------------------ | -------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | Стиль модуля. | +| `disabled` | `false` | Disables the `cmake` module. | ### Переменные @@ -542,12 +542,12 @@ format = "[$symbol$environment](dimmed green) " ### Опции -| Параметр | По умолчанию | Описание | -| ---------- | ---------------------------------- | ------------------------------------------------------- | -| `symbol` | `"🔮 "` | Символ, используемый перед отображением версии crystal. | -| `style` | `"bold red"` | Стиль модуля. | -| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | -| `disabled` | `false` | Отключает модуль `crystal`. | +| Параметр | По умолчанию | Описание | +| ---------- | ------------------------------------ | ------------------------------------------------------- | +| `symbol` | `"🔮 "` | Символ, используемый перед отображением версии crystal. | +| `style` | `"bold red"` | Стиль модуля. | +| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | +| `disabled` | `false` | Отключает модуль `crystal`. | ### Переменные @@ -578,12 +578,12 @@ The `dart` module shows the currently installed version of Dart. Модуль б ### Опции -| Параметр | По умолчанию | Описание | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `style` | `"bold blue"` | Стиль модуля. | -| `disabled` | `false` | Disables the `dart` module. | +| Параметр | По умолчанию | Описание | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | Стиль модуля. | +| `disabled` | `false` | Disables the `dart` module. | ### Переменные @@ -624,6 +624,7 @@ format = "via [🔰 $version](bold red) " | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
Этот модуль имеет несколько расширенных опций конфигурации, которые контролируют отображение каталога. @@ -671,13 +672,13 @@ truncation_symbol = "…/" ### Опции -| Параметр | По умолчанию | Описание | -| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | Формат модуля. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `style` | `"blue bold"` | Стиль модуля. | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | Disables the `docker_context` module. | +| Параметр | По умолчанию | Описание | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | Формат модуля. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | Стиль модуля. | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Переменные @@ -722,13 +723,13 @@ The module will also show the Target Framework Moniker ( "` | The symbol used before displaying the version of PureScript. | -| `style` | `"bold white"` | Стиль модуля. | -| `disabled` | `false` | Disables the `purescript` module. | +| Параметр | По умолчанию | Описание | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | Стиль модуля. | +| `disabled` | `false` | Disables the `purescript` module. | ### Переменные @@ -1958,16 +1959,16 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name ### Опции -| Параметр | По умолчанию | Описание | -| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | Формат модуля. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | Стиль модуля. | -| `pyenv_version_name` | `false` | Использовать pyenv для получения версии Python | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Параметр | По умолчанию | Описание | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | Формат модуля. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | Стиль модуля. | +| `pyenv_version_name` | `false` | Использовать pyenv для получения версии Python | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2016,12 +2017,12 @@ python_binary = "python3" ### Опции -| Параметр | По умолчанию | Описание | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold red"` | Стиль модуля. | -| `disabled` | `false` | Отключает модуль `ruby`. | +| Параметр | По умолчанию | Описание | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | Стиль модуля. | +| `disabled` | `false` | Отключает модуль `ruby`. | ### Переменные @@ -2051,12 +2052,12 @@ symbol = "🔺 " ### Опции -| Параметр | По умолчанию | Описание | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold red"` | Стиль модуля. | -| `disabled` | `false` | Отключает модуль `rust`. | +| Параметр | По умолчанию | Описание | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | Стиль модуля. | +| `disabled` | `false` | Отключает модуль `rust`. | ### Переменные @@ -2157,18 +2158,18 @@ The `status` module displays the exit code of the previous command. The module w ### Опции -| Параметр | По умолчанию | Описание | -| ----------------------- | -------------------------- | ---------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `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"` | Стиль модуля. | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `disabled` | `true` | Disables the `status` module. | +| Параметр | По умолчанию | Описание | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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"` | Стиль модуля. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Переменные @@ -2209,12 +2210,12 @@ The `swift` module shows the currently installed version of Swift. Модуль ### Опции -| Параметр | По умолчанию | Описание | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `style` | `"bold 202"` | Стиль модуля. | -| `disabled` | `false` | Disables the `swift` module. | +| Параметр | По умолчанию | Описание | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | Стиль модуля. | +| `disabled` | `false` | Disables the `swift` module. | ### Переменные @@ -2237,7 +2238,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). Модуль будет показан, если любое из следующих условий соблюдено: +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +Модуль будет показан, если любое из следующих условий соблюдено: - Текущий каталог содержит папку `.terraform` - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2381,12 +2390,12 @@ The `zig` module shows the currently installed version of Zig. Модуль бу ### Опции -| Параметр | По умолчанию | Описание | -| ---------- | ---------------------------------- | ----------------------------------------------------- | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | Стиль модуля. | -| `format` | `"via [$symbol$version]($style) "` | Формат модуля. | -| `disabled` | `false` | Disables the `zig` module. | +| Параметр | По умолчанию | Описание | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | Стиль модуля. | +| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | +| `disabled` | `false` | Disables the `zig` module. | ### Переменные @@ -2438,19 +2447,19 @@ The order in which custom modules are shown can be individually set by including ### Опции -| Параметр | По умолчанию | Описание | -| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `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`. | -| `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"` | Стиль модуля. | -| `format` | `"[$symbol$output]($style) "` | Формат модуля. | -| `disabled` | `false` | Disables this `custom` module. | +| Параметр | По умолчанию | Описание | +| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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`. | +| `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"` | Стиль модуля. | +| `format` | `"[$symbol($output )]($style)"` | Формат модуля. | +| `disabled` | `false` | Disables this `custom` module. | ### Переменные diff --git a/docs/ru-RU/guide/README.md b/docs/ru-RU/guide/README.md index e8cc54e93..4da3c323c 100644 --- a/docs/ru-RU/guide/README.md +++ b/docs/ru-RU/guide/README.md @@ -196,7 +196,7 @@ Добавьте следующее в конец `Microsoft.PowerShell_profile.ps1`. Вы можете проверить местоположение этого файла, запросив переменную `$PROFILE` в PowerShell. Обычно он находится в `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` или `~/.config/powershell/Microsoft.PowerShell_profile.ps1` на -Nix. - ```sh + ```powershell Invoke-Expression (&starship init powershell) ``` diff --git a/docs/tr-TR/config/README.md b/docs/tr-TR/config/README.md index c9970753c..984ef22d4 100644 --- a/docs/tr-TR/config/README.md +++ b/docs/tr-TR/config/README.md @@ -29,7 +29,7 @@ export STARSHIP_CONFIG=~/.starship Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -43,7 +43,7 @@ export STARSHIP_CACHE=~/.starship/cache Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -427,12 +427,12 @@ The `cmake` module shows the currently installed version of CMake if any of the ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `cmake` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | -------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -542,12 +542,12 @@ The `crystal` module shows the currently installed version of Crystal. The modul ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | --------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `style` | `"bold red"` | The style for the module. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `crystal` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables @@ -578,12 +578,12 @@ The `dart` module shows the currently installed version of Dart. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `dart` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -624,6 +624,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
This module has a few advanced configuration options that control how the directory is displayed. @@ -671,13 +672,13 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Options -| Option | Default | Description | -| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `style` | `"blue bold"` | The style for the module. | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | Disables the `docker_context` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | The style for the module. | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -722,13 +723,13 @@ The module will also show the Target Framework Moniker ( "` | The symbol used before displaying the version of PureScript. | -| `style` | `"bold white"` | The style for the module. | -| `disabled` | `false` | Disables the `purescript` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | The style for the module. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -1958,16 +1959,16 @@ The module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | The style for the 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 | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `disabled` | `false` | Disables the `python` module. | +| Option | Default | Description | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | The style for the 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 | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2016,12 +2017,12 @@ The `ruby` module shows the currently installed version of Ruby. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `ruby` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables @@ -2051,12 +2052,12 @@ The `rust` module shows the currently installed version of Rust. The module will ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `rust` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | The style for the module. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables @@ -2157,18 +2158,18 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ----------------------- | -------------------------- | ---------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `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"` | The style for the module. | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `disabled` | `true` | Disables the `status` module. | +| Option | Default | Description | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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"` | The style for the module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables @@ -2209,12 +2210,12 @@ The `swift` module shows the currently installed version of Swift. The module wi ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `style` | `"bold 202"` | The style for the module. | -| `disabled` | `false` | Disables the `swift` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | The style for the module. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -2237,7 +2238,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). The module will be shown if any of the following conditions are met: +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +The module will be shown if any of the following conditions are met: - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2381,12 +2390,12 @@ The `zig` module shows the currently installed version of Zig. The module will b ### Options -| Option | Default | Description | -| ---------- | ---------------------------------- | ----------------------------------------------------- | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | The style for the module. | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `zig` module. | +| Option | Default | Description | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | The style for the module. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | ### Variables @@ -2438,19 +2447,19 @@ The order in which custom modules are shown can be individually set by including ### Options -| Option | Default | Description | -| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `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"` | The style for the module. | -| `format` | `"[$symbol$output]($style) "` | The format for the module. | -| `disabled` | `false` | Disables this `custom` module. | +| Option | Default | Description | +| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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"` | The style for the module. | +| `format` | `"[$symbol($output )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables this `custom` module. | ### Variables diff --git a/docs/tr-TR/guide/README.md b/docs/tr-TR/guide/README.md index 9f33e569c..c53391a57 100644 --- a/docs/tr-TR/guide/README.md +++ b/docs/tr-TR/guide/README.md @@ -196,7 +196,7 @@ Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. - ```sh + ```powershell Invoke-Expression (&starship init powershell) ``` diff --git a/docs/vi-VN/README.md b/docs/vi-VN/README.md new file mode 100644 index 000000000..567441302 --- /dev/null +++ b/docs/vi-VN/README.md @@ -0,0 +1,112 @@ +--- +home: true +heroImage: /logo.svg +heroText: +tagline: Nhỏ gọn, cực nhanh, và khả năng tuỳ chỉnh vô hạn prompt cho bất kì shell nào! +actionText: Bắt đầu → +actionLink: ./guide/ +features: + - + title: Khả năng tương thích + details: Những công việc trên đa số các shell phổ biến trên đa số các hệ điều hành phổ biến. Sử dụng nó ở mọi nơi! + - + title: Sức mạnh của Rust + details: Mang lại tốc độ và độ an toàn tốt nhất của Rust, giúp prompt của bạn thực thi nhanh chóng và đáng tin cậy nhất có thể. + - + title: Khả năng tuỳ biến + details: Mọi chi tiết nhỏ được tuỳ biến theo ý thích của bạn, giúp prompt này nhỏ nhất có thể hoặc phong phú về tính năng như bạn muốn. +footer: Cấp phép bởi ISC | Bản quyền © 2019-nay Starship Contributors +#Used for the description meta tag, for SEO +metaTitle: "Starship: Cross-Shell Prompt" +description: Starship là prompt nhỏ, cực nhanh, và khả năng tuỳ biến mạnh mẽ cho bất kì shell nào! Hiển thị thông tin bạn cần, trong khi vẫn giữ cho đẹp và nhỏ gọn. Có thể được cài đặt nhanh chóng cho Bash, Fish, ZSH, Ion và PowerShell. +--- + +
+ +
+ +### Cài đặt nhanh chóng + +1. Cài đặt **starship** nhị phân: + + + #### Cài đặt phiên bản cuối cùng + + Với Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + #### Cài đặt thông qua Trình quản lí gói + + Với [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + Với [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Thêm đoạn mã khởi tạo vào tệp tin cấu hình shell của bạn: + + + #### Bash + + Thêm đoạn sau vào cuối tệp tin `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Thêm đoạn sau vào cuối tệp tin `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Thêm đoạn sau vào cuối tệp tin `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### Powershell + + Thêm vào cuối tệp tin `Microsoft.PowerShell_profile.ps1`. Bạn có thể kiểm tra vị trí tệp tin này bằng việc truy xuất biến `$PROFILE` trong PowerShell. Thông thường, đường dẫn là `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` hoặc `~/.config/powershell/Microsoft.PowerShell_profile.ps1` trên -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Thêm vào cuối tệp tin `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + +eval $(starship init ion) + ``` diff --git a/docs/vi-VN/advanced-config/README.md b/docs/vi-VN/advanced-config/README.md new file mode 100644 index 000000000..1bc96d014 --- /dev/null +++ b/docs/vi-VN/advanced-config/README.md @@ -0,0 +1,93 @@ +# Cấu hình nâng cao + +Trong khi Starship là một shell linh hoạt, đôi khi bạn vẫn cần làm nhiều hơn là chỉnh sửa `starship.toml` để có thể là được những việc nhất định. Trang này chi tiết một vài cấu hình kĩ thuật nâng cao hơn được sử dụng trong starship. + +::: cảnh báo + +Các cấu hình trong phần này có thể thay đổi trong các bản phát hành Starship trong tương lai. + +::: + +## Tuỳ biến pre-prompt và pre-execution Commands trong Bash + +Bash không có một preexec/precmd framwork chính thống giống như các shells khác. Bởi vì điều này, nó là khó để cung cấp các hook cho việc tuỳ biến được đầy đủ trong `bash`. Tuy nhiên, Starship cung cấp cho bạn khả năng hạn chế để chèn các chức năng của riêng bạn vào trong thủ tục prompt-rendering: + +- Để chạy một hàm tuỳ biến trước khi prompt được vẽ ra, định nghĩa một hàm mới và sau đó gán tên của nó tới `starship_precmd_user_func`. Ví dụ, để vẽ một tên lửa trước prompt, bạn sẽ làm + +```bash +function blastoff(){ + echo "🚀" +} +starship_precmd_user_func="blastoff" +``` + +- Để chạy một hàm tuỳ biến trước khi một câu lệnh chạy, bạn có thể sử dụng cơ chế bẫy [`DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Tuy nhiên, bạn **phải** đặt bẫy tín hiệu DEBUG *trước* khởi tạo Starship! Starship có thể giữ giá trị của DEBUG trap, nhưng nếu trap được ghi đè sau khi starship khởi động, một vài chức năng sẽ không hoạt động. + +```bash +function blastoff(){ + echo "🚀" +} +trap blastoff DEBUG # Bẫy DEBUG *trước khi* starship chạy +eval $(starship init bash) +``` + +## Thay đổi tiêu đề của sổ + +Một vào prompts sẽ tự động thay đổi tiêu đề cửa sổ cho bạn (ví dụ phản ánh thư mục hiện hành của bạn). Fish thậm chí là nó một cách mặc định. Starship không làm điều này, nhưng nó khá đơn giản để thêm điều này vào chức năng cho `bash` hoặc `zsh`. + +Đầu tiên, định nghĩa một hàm thay đổi tiêu đề cửa sổ (giống hệt trong bash và zsh): + +```bash +function set_win_title(){ + echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" +} +``` + +Bạn có thể tuỳ biến để tuỳ biến tiêu đề này (`$USER`, `$HOSTNAME`, và `$PWD` là những lựa chọn phổ biến). + +Trong `bash`, thiết lập hàm này thành hàm precmd của starship: + +```bash +starship_precmd_user_func="set_win_title" +``` + +Trong `zsh`, thêm cái này vào mảng `precmd_functions`: + +```bash +precmd_functions+=(set_win_title) +``` + +Nếu bạn thích thành quả, thêm những giòng này vào tập tin cấu hình shell của bạn (`~/.bashrc` or `~/.zshrc`) để cấu hình nó vĩnh viễn. + +Ví dụ, nếu bạn muốn hiển thị đường dẫn hiện tại của bạn trong tiêu đề tab terminal, thêm snippet sau vào `~/.bashrc` hoặc `~/.zshrc` của bạn: + +```bash +function set_win_title(){ + echo -ne "\033]0; $(basename $PWD) \007" +} +starship_precmd_user_func="set_win_title" +``` + +## Các chuỗi kiểu + +Chuỗi kiểu là một danh sách các từ, được phân cách bởi khoảng trắng. Các từ là không phân biệt hoa thường (ví dụ. `bold` và `Bold` là hai chuỗi tương đương). Mỗi từ có thể là một trong các từ sau: + + - `bold` + - `underline` + - `dimmed` + - `bg:` + - `fg:` + - `` + - `none` + +`` là một nơi quy định màu (được bàn luận ở phía dưới). `fg:` và `` hiện tại thực hiện công việc như nhau, tuy nhiên, điều này có thể thay đổi trong tương lai. Thứ tự các từ trong chuỗi là không quan trọng. + +Từ mã `none` ghi đè tất cả các từ mã khác trong chuỗi nếu nó không là một phần của `bg:` specifier, vậy nên `fg:red none fg:blue` sẽ vẫn tạo một chuỗi mà không có kiểu. `bg:none` thiết lập màu nền do đó `fg:red bg:none` là tương đương với `red` hoặc `fg:red` và `bg:green fg:red bg:none` cũng tương đương với `fg:red` hoặc `red`. Nó có thể trở thành một lỗi để sử dụng `none` trong việc kết hợp với các từ mã khác trong tương lai. + +Một quy định màu có thể là một trong các thứ sau: + + - Một tròn các màu chuẩn của terminal: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Bạn có thể tuỳ chọn những tiền tố này với `bright` để có được phiên bản sáng hơn (ví dụ: `bright-white`). + - Một `#` được theo sau bởi một số thập lục phân gồm sáu chữ số. Cái này quy định một [mã thập lục phân cho màu RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp). + - Một số nằm giữa 0-255. Cái này quy định một [mã màu ANSI 8-bit](https://i.stack.imgur.com/KTSQa.png). + +Nếu nhiều màu được quy định cho màu chữ/màu nền, cái cuối cùng trong chuỗi sẽ được ưu tiên. diff --git a/docs/vi-VN/config/README.md b/docs/vi-VN/config/README.md new file mode 100644 index 000000000..f7cf7d568 --- /dev/null +++ b/docs/vi-VN/config/README.md @@ -0,0 +1,2518 @@ +# Cấu hình + +Để bắt đầu cấu hình starship, tạo tập tin sau: `~/.config/starship.toml`. + +```sh +mkdir -p ~/.config && touch ~/.config/starship.toml +``` + +Tất cả cấu hình của starship đã xong trong tập tin này: [TOML](https://github.com/toml-lang/toml): + +```toml +# Không in dòng mới tại điểm bắt đầu của prompt +add_newline = false + +# Thay thế kí hiệu "❯" trong prompt với "➜" +[character] # Tên module chúng ta đang cấu hình là "character" +success_symbol = "[➜](bold green)" # "success_symbol" được thiết lập là "➜" với màu "bold green" + +# Vô hiệu hoá module, ẩn nó từ prompt hoàn chỉnh +[package] +disabled = true +``` + +Bạn có thể thay đổi đường dẫn mặc định của tệp tin `starship.toml` quan biến môi trường `STARSHIP_CONFIG`: + +```sh +export STARSHIP_CONFIG=~/.starship +``` + +Tương đương trong PowerShell (Windows) sẽ được thêm dòng này vào `$PROFILE` của bạn: + +```powershell +$ENV:STARSHIP_CONFIG = "$HOME\.starship" +``` + +### Logging + +Mặc định, starship logs các cảnh báo và các lỗi trong một tập tin tên là `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, nơi đó khoá của phiên làm việc tương ứng với thực thể terminal của bạn. Cái này, tuy nhiên có thể được thay đổi bằng cách sử dụng biến môi trường `STARSHIP_CACHE`: + +```sh +export STARSHIP_CACHE=~/.starship/cache +``` + +Tương đương trong PowerShell (Windows) sẽ được thêm dòng này vào `$PROFILE` của bạn: + +```powershell +$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" +``` + +### Thuật ngữ + +**Module**: Một thành phần trong prompt, thông tin lấy được dựa trên thông tin ngữ cảnh từ hệ điều hành của bạn. Cho ví dụ, module "nodejs" cho biết phiên bản của NodeJS, cái hiện tại được cài đặt trên máy tính của bạn, nếu đường dẫn hiện tại của bạn là một dự án NodeJS. + +**Variable**: Các thành phần con nhỏ hơn chứa thông tin cung cấp bởi module. Cho ví dụ, biến "version" trong "nodejs" module chứa phiên bản hiện tại của NodeJS. + +Bằng việc quy ước, đa số các module có một tiền tố của terminal mặc định (ví dụ `via` trong "nodejs") và một khoảng trắng như là một hậu tố. + +### Định dạng các chuỗi + +Định dạng các chuỗi là định dạng một module với việc in ra tất cả các biến của nó. Đa số các module có một cái bắt đầu gọi là `format`, cái đó cấu hình việc hiển thị định dạng của module. Bạn có thể sử dụng các văn bản, các biến và các nhóm văn bản trong một định dạng chuỗi. + +#### Biến + +Một biến chứa một kí hiệu `$` theo sau bởi tên biến. Tên của một biến chỉ chứa các kí tự, các số và `_`. + +Ví dụ: + +- `$version` là một đính dạng chuỗi với một biến đặt tên là `version`. +- `$git_branch$git_commit` là một định dạng chuỗi với hai biến named `git_branch` và `git_commit`. +- `$git_branch $git_commit` có hai biến phân cách bằng một khoảng trắng. + +#### Nhóm văn bản + +Một nhóm văn bản được tạo nên bởi hai phần khác nhau. + +Phần đầu tiên, cái được bao bọc trong một `[]`, là một [định dạng chuỗi](#format-strings). Bạn có thể thêm các văn bản, các biến, hoặc thậm chí các nhóm văn bản lồng nhau vào trong nó. + +Phần thứ hai, cái được bao bọc trong một `()`, là một [chuỗi kiểu](#style-strings). Cái này có thể được sử dụng để quy định kiểu của phần đầu tiên. + +Ví dụ: + +- `[on](red bold)` sẽ in một chuỗi `on` với chữ đậm tô màu đỏ. +- `[⬢ $version](bold green)` sẽ in một kí hiệu `⬢` theo sao bởi nội dung của biến `version`, với chữ đậm tô màu xanh lá cây. +- `[a [b](red) c](green)` sẽ in `a b c` với `b` màu đỏ, `a` và `c` màu xanh lá cây. + +#### Các chuỗi kiểu + +Đa số các module trong starship cho phép bạn cấu hình kiểu hiển thị của chúng. This is done with an entry (thường được gọi là `kiểu`) cái là một cuỗi cấu hình đặc biệt. Đây là vài ví dụ của các chuỗi kiểu cũng với những gì chúng làm. Cú pháp chi tiết đầy đủ, tham khảo [hướng dẫn cấu hình nâng cao](/advanced-config/). + +- `"fg:green bg:blue"` thiết lập chữ màu xanh lá cây trên nền màu xanh nước biển +- `"bg:blue fg:bright-green"` thiết lập chữ màu xanh lá cây sáng trên nền màu canh nước biển +- `"bold fg:27"` thiết lập chữ đậm với [màu ANSI](https://i.stack.imgur.com/KTSQa.png) 27 +- `"underline bg:#bf5700"` thiết lập chữ gạch chân trên một nền màu da cam +- `"bold italic fg:purple"` thiết lập chữa nghiêng đậm có màu tím +- `""` vô hiệu hoá tất cả các kiểu + +Lưu ý rằng những style trông như thế nào sẽ được điều khiển bởi giả lập terminal của bạn. Ví dụ, một vài giả lập terminal sẽ làm sáng những màu thay vì làm đậm chữ, và một vài theme màu sử dụng cũng các giá trị cho các màu thường và màu sáng. Tương tự, để có được chữ nghiêng, terminal của bạn phải hỗ trợ các kiểu chữ nghiêng. + +#### Điều kiện định dạng chuỗi + +Một điều kiện định dạng chuỗi bọc trong `(` và `)` sẽ không render nếu tất cả các biến bên trong là rỗng. + +Ví dụ: + +- `(@$region)` sẽ không hiển thị gì nếu biến `region` là `None`, ngược lại `@` theo sao bởi giá trị của region. +- `(một vài văn bản)` sẽ không hiển thị thứ gì khi không có những biến bọc trong các dấu ngoặc. +- Khi `$all` là một shortcut cho `\[$a$b\]`, `($all)` sẽ không hiển thị chỉ khi `$a` và `$b` đều là `None`. Cái này làm việc giống như `(\[$a$b\] )`. + +#### Các kí tự Escapable + +Các kí hiệu sau có các sử dụng đặc biệt trong một định dạng chuỗi. Nếu bạn muốn in các kí tự sau, bạn phải đặt trước chúng kí tự backslash (`\`). + +- \$ +- \\ +- [ +- ] +- ( +- ) + +Lưu ý rằng `toml` có [cú pháp escape riêng của nó](https://github.com/toml-lang/toml#user-content-string). Nó được khuyến nghị để sử dụng một literal string (`''`) trong cấu hình của bạn. Nếu bạn muốn sử dụng một kí tự cơ bản (`""`), chú ý đặt backslash `\` trước nó. + +Ví dụ, khi bạn muốn in một kí hiệu `$` trên một dòng mới, các cấu hình sau cho `định dạng` tương đương: + +```toml +# với chuỗi cơ bản +format = "\n\\$" + +# với chuỗi cơ bản trong nhiều dòng +format = """ + +\\$""" + +# với chuỗi đặc biệt +format = ''' + +\$''' +``` + +## Prompt + +Cái này là danh sách các tuỳ chọn cho cấu hình prompt-wide. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| -------------- | ------------------------------ | ------------------------------------------------------------------------ | +| `format` | [link](#default-prompt-format) | Cấu hình định dạng của prompt. | +| `scan_timeout` | `30` | Timeout của starship cho việc quét các tập tin (tính theo milliseconds). | +| `add_newline` | `true` | Thêm một dòng mới trước khi bắt đầu một prompt. | + +### Ví dụ + +```toml +# ~/.config/starship.toml + +# Sử dụng định dạng custom +format = """ +[┌───────────────────>](bold green) +[│](bold green)$directory$rust$package +[└─>](bold green) """ + +# Chờ 10 milliseconds để starship kiểm tra các tập tin trong đường dẫn hiện tại. +scan_timeout = 10 + +# Vô hiệu hoá dòng mới tại điểm bắt đầu của prompt +add_newline = false +``` + +### Định dạng prompt mặc định + +Mặc định `format` được sử dụng để định nghĩa định dạng của prompt, nếu rỗng hoặc không `format` được cung cấp. Mặc định như sau: + +```toml +format = "$all" + +# Cái đó tương đương với +format = """ +$username\ +$hostname\ +$shlvl\ +$kubernetes\ +$directory\ +$git_branch\ +$git_commit\ +$git_state\ +$git_status\ +$hg_branch\ +$docker_context\ +$package\ +$cmake\ +$dart\ +$dotnet\ +$elixir\ +$elm\ +$erlang\ +$golang\ +$helm\ +$java\ +$julia\ +$kotlin\ +$nim\ +$nodejs\ +$ocaml\ +$perl\ +$php\ +$purescript\ +$python\ +$ruby\ +$rust\ +$swift\ +$terraform\ +$zig\ +$nix_shell\ +$conda\ +$memory_usage\ +$aws\ +$gcloud\ +$openstack\ +$env_var\ +$crystal\ +$custom\ +$cmd_duration\ +$line_break\ +$lua\ +$jobs\ +$battery\ +$time\ +$status\ +$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`. + +Khi sử dụng [aws-vault](https://github.com/99designs/aws-vault) profile được đọc từ biến môt trường `AWS_VAULT`. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------------- | ------------------------------------------------ | ---------------------------------------------------- | +| `format` | `'on [$symbol$profile(\($region\))]($style) '` | Định dạng cho module. | +| `symbol` | `"☁️ "` | Kí hiệu sử dụng hiển thị trước profile AWS hiện tại. | +| `region_aliases` | | Bảng của các region alias để hiển thị ngoài tên AWS. | +| `style` | `"bold yellow"` | Kiểu cho module. | +| `disabled` | `false` | Vô hiệu `AWS` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ---------------- | -------------------------------- | +| region | `ap-northeast-1` | Region AWS hiện tại | +| profile | `astronauts` | Profile AWS hiện tại | +| 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 + +### Các vị dụ + +#### Hiển thị mọi thứ + +```toml +# ~/.config/starship.toml + +[aws] +format = 'on [$symbol$profile(\($region\))]($style) ' +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Hiển thị region + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$region]($style) " +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Hiển thị profile + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$profile]($style) " +style = "bold blue" +symbol = "🅰 " +``` + +## 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%. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| -------------------- | --------------------------------- | -------------------------------------------------------- | +| `full_symbol` | `""` | Kí hiệu cho biết khi pin đầy. | +| `charging_symbol` | `""` | Kí hiệu cho biết khi ping đang sạc. | +| `discharging_symbol` | `""` | Kí hiệu cho biết khi pin đang không sạc. | +| `unknown_symbol` | `""` | Kí hiệu cho biết khi trạng thái pin không được xác định. | +| `empty_symbol` | `""` | Kí hiệu cho biết khi hết pin. | +| `format` | `"[$symbol$percentage]($style) "` | Định dạng cho module. | +| `display` | [link](#battery-display) | Ngưỡng hiển thị và kiểu cho module. | +| `disabled` | `false` | Vô hiệu `battery` module. | + + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[battery] +full_symbol = "🔋" +charging_symbol = "⚡️" +discharging_symbol = "💀" +``` + +### Hiển thị pin + +Tuỳ chọn cấu hình `display` được sử dụng để định nghĩa khi nào pin nên cho biết (threshold) và nó trông như thế nào (style). Nếu `display` không được cung cấp. Mặc định như sau: + +```toml +[[battery.display]] +threshold = 10 +style = "bold red" +``` + +#### Các tuỳ chọn + +Tuỳ chọn `display` là một mảng của của bảng sau. + +| Tuỳ chọn | Mô tả | +| ----------- | ---------------------------------------------------------- | +| `threshold` | Cận trên của tuỳ chọn hiển thị. | +| `style` | Kiểu sử dụng nếu tuỳ chọn hiển thị được sử dụng bên trong. | + +#### Ví dụ + +```toml +[[battery.display]] # "bold red" style khi lượng pin nằm giữa 0% và 10% +threshold = 10 +style = "bold red" + +[[battery.display]] # "bold yellow" style khi lượng pin nằm giữa 10% và 30% +threshold = 30 +style = "bold yellow" + +#khi lượng pin trên 30%, pin sẽ không được hiển thị + +``` + +## 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. + +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: + +- thay đổi màu(`đỏ`/`xanh lá`) +- thay đổi hình dạng (`❯`/`✖`) + +Mặc định, nó chỉ thay đổi màu. Nếu bạn cũng muốn thay đổi hình dạng, tham khảo [ví dụ này](#with-custom-error-shape). + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------------- | ------------------- | ------------------------------------------------------------------------------------ | +| `format` | `"$symbol "` | Định dạng chuỗi sử dụng trước văn bản nhập vào. | +| `success_symbol` | `"[❯](bold green)"` | Định dạng chuỗi sửa dụng trước văn bản nhập vào nếu câu lệnh trước đó đã thành công. | +| `error_symbol` | `"[❯](bold red)"` | Định dạng chuỗi sửa dụng trước văn bản nhập vào nếu câu lệnh trước đó đã thất bại. | +| `vicmd_symbol` | `"[❮](bold green)"` | Định dạng chuỗi sửa dụng trước văn bản nhập vào nếu shell trong chế độ vim normal. | +| `disabled` | `false` | Vô hiệu module `character`. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| ------ | ----- | --------------------------------------------------------------------- | +| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | + +### Các vị dụ + +#### Có tuỳ chỉnh hình dạng lỗi + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[✗](bold red) " +``` + +#### Không có tuỳ chỉnh hình dạng lỗi + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[➜](bold red) " +``` + +#### Có tuỳ chỉnh hình dạng vim + +```toml +# ~/.config/starship.toml + +[character] +vicmd_symbol = "[V](bold green) " +``` + +## CMake + +Module `cmake` cho biết phiên bản Cmake hiện tại được cài đặt nếu mọi điều kiện sau được thoả mãn: + +- Đườ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` + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `symbol` | `"喝 "` | Kí hiệu sử dụng trước phiên bản của cmake. | +| `style` | `"bold blue"` | Kiểu cho module. | +| `disabled` | `false` | Vô hiệu module `cmake`. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | --------- | -------------------------------- | +| version | `v3.17.3` | Phiên bản của cmake | +| 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 + +## 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. + +::: cảnh báo Không thể hook DEBUG trap trong 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. + +::: + +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. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| -------------------- | ----------------------------- | ---------------------------------------------------------------------- | +| `min_time` | `2_000` | Khoảng thời gian ngắn nhất để hiện thời gian (tính bằng milliseconds). | +| `show_milliseconds` | `false` | Hiện milliseconds. | +| `format` | `"took [$duration]($style) "` | Định dạng cho module. | +| `style` | `"bold yellow"` | Kiểu cho module. | +| `disabled` | `false` | Vô hiệu module `cmd_duration`. | +| `show_notifications` | `false` | Hiện thông báo desktop khi câu lệnh hoàn thành. | +| `min_time_to_notify` | `45_000` | Khoảng thời gian ngắn nhất để thông báo (tính bằng milliseconds). | + +::: thử thuật + +Hiện thông báo desktop yêu cầu starship được built với sự hỗ trợ của `rust-notify`. Bạn kiểm tra nếu starship hỗ trợ các thông báo bằng cách chạy `STARSHIP_LOG=debug starship module cmd_duration -d 60000` khi `show_notifications` được thiết lập là `true`. + +::: + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------- | ------------------------------------- | +| 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 + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[cmd_duration] +min_time = 500 +format = "underwent [$duration](bold yellow)" +``` + +## Conda + +Module `conda` cho biết môi trường conda hiện tại, nếu `$CONDA_DEFAULT_ENV` được thiết lập. + +::: thủ thuật + +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`. + +::: + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | Số lượng đường dẫn của biến môi trường nên được cắt bớt, nếu biến môi trường được tạo thông qua via `conda create -p [path]`. `0` nghĩa là không cắt bớt. Cũng thấy trong module [`directory`](#directory). | +| `symbol` | `"🅒 "` | Kí hiệu sử dụng trước tên biến môi trường. | +| `style` | `"bold green"` | Kiểu cho module. | +| `format` | `"via [$symbol$environment]($style) "` | Định dạng cho module. | +| `ignore_base` | `true` | Bỏ qua biến môi trường `base` khi đã kích hoạt. | +| `disabled` | `false` | Vô hiệu module `conda`. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| ----------- | ------------ | ---------------------------------- | +| environment | `astronauts` | Biến môi trường hiện tại của conda | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[conda] +format = "[$symbol$environment](dimmed green) " +``` + +## Crystal + +Module `crystal` cho biết phiên bản hiện tại của Crystal được đã cài đặt. Module sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- Đường dẫn hiện tại chứa một tập tin `shard.yml` +- Đường dẫn hiện tại chứa một tập tin `.cr` + +### Options + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"🔮 "` | Kí hiệu sử dụng trước phiên bản hiển thị của crystal. | +| `style` | `"bold red"` | Kiểu cho module. | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `disabled` | `false` | Vô hiệu hoá module `crystal`. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | --------- | -------------------------------- | +| version | `v0.32.1` | Phiên bản của `crystal` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[crystal] +format = "via [✨ $version](bold blue) " +``` + +## Dart + +Module `dart` cho biết phiên bản của Dart đã cài đặt. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- Đường dẫn hiện tại chứa một tập tin với phần mở rộng `.dart` +- Đường dẫn hiện tại chứa một đường dẫn `.dart_tool` +- The current directory contains a `pubspec.yaml` or `pubspec.lock` file + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `dart` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------- | -------------------------------- | +| version | `v2.8.4` | The version of `dart` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[dart] +format = "via [🔰 $version](bold red) " +``` + +## Directory + +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. + +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` | 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) "` | Định dạng cho module. | +| `style` | `"bold cyan"` | Kiểu cho 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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. | + +
+This module has a few advanced configuration options that control how the directory is displayed. + +| Advanced Option | Mặc định | Mô tả | +| --------------------------- | -------- | ---------------------------------------------------------------------------------------- | +| `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`. + +
+ +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | --------------------- | -------------------------- | +| path | `"D:/Projects"` | The current directory path | +| 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 + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[directory] +truncation_length = 8 +truncation_symbol = "…/" +``` + +## Docker Context + +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`. + +### Các tuỳ chọn + +| 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. | +| `style` | `"blue bold"` | Kiểu cho module. | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | Disables the `docker_context` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------------- | -------------------------------- | +| 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 + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[docker_context] +format = "via [🐋 $context](blue bold)" +``` + +## Dotnet + +The `dotnet` module shows the relevant version of the .NET Core SDK 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. + +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` +- `Directory.Build.props` +- `Directory.Build.targets` +- `Packages.props` +- `*.sln` +- `*.csproj` +- `*.fsproj` +- `*.xproj` + +You'll also need the .NET Core SDK installed in order to use it correctly. + +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. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ----------- | ----------------------------------------- | -------------------------------------------------------- | +| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | Định dạng cho module. | +| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | +| `style` | `"bold blue"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `dotnet` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ---------------- | ------------------------------------------------------------------ | +| version | `v3.1.201` | The version of `dotnet` sdk | +| tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[dotnet] +symbol = "🥅 " +style = "green" +heuristic = false +``` + +## Elixir + +The `elixir` module shows the currently installed version of Elixir and Erlang/OTP. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- Đường dẫn hiện tại chứa một tập tin `mix.exs`. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ----------------------------------------------------------- | --------------------------------------------------------------- | +| `symbol` | `"💧 "` | The symbol used before displaying the version of Elixir/Erlang. | +| `style` | `"bold purple"` | Kiểu cho module. | +| `format` | `'via [$symbol($version \(OTP $otp_version\) )]($style)'` | The format for the module elixir. | +| `disabled` | `false` | Disables the `elixir` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| ----------- | ------- | -------------------------------- | +| version | `v1.10` | The version of `elixir` | +| otp_version | | The otp version of `elixir` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[elixir] +symbol = "🔮 " +``` + +## Elm + +The `elm` module shows the currently installed version of Elm. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- Đường dẫn hiện tại chứa một tập tin `elm.json` +- Đường dẫn hiện tại chứa một tập tin `elm-package.json` +- The current directory contains a `.elm-version` file +- The current directory contains a `elm-stuff` folder +- The current directory contains a `*.elm` files + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. | +| `style` | `"cyan bold"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `elm` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | --------- | -------------------------------- | +| version | `v0.19.1` | The version of `elm` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[elm] +format = "via [ $version](cyan bold) " +``` + +## Environment Variable + +The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met: + +- The `variable` configuration option matches an existing environment variable +- The `variable` configuration option is not defined, but the `default` configuration option is + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------ | ---------------------------------------------------------------------------- | +| `symbol` | | The symbol used before displaying the variable value. | +| `biến` | | The environment variable to be displayed. | +| `mặc định` | | The default value to be displayed when the selected variable is not defined. | +| `format` | `"with [$env_value]($style) "` | Định dạng cho module. | +| `disabled` | `false` | Disables the `env_var` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ------------------------------------------- | ------------------------------------------ | +| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` | +| 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 + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[env_var] +variable = "SHELL" +default = "unknown shell" +``` + +## Erlang + +The `erlang` module shows the currently installed version of Erlang/OTP. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- Đường dẫn hiện tại chứa một tập tin `rebar.config`. +- Đường dẫn hiện tại chứa một tập tin `erlang.mk`. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | -------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before displaying the version of erlang. | +| `style` | `"bold red"` | Kiểu cho module. | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `disabled` | `false` | Disables the `erlang` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | --------- | -------------------------------- | +| version | `v22.1.3` | The version of `erlang` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[erlang] +format = "via [e $version](bold red) " +``` + +## Gcloud + +The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$account(\($region\))]($style) '` | Định dạng cho 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"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `gcloud` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ----------------- | ------------------------------------------------------------------ | +| region | `us-central1` | The current GCP region | +| account | `foo@example.com` | The current GCP profile | +| project | | The current GCP project | +| active | `mặc định` | The active config name written in `~/.config/gcloud/active_config` | +| 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 + +### Các vị dụ + +#### Display account and project + +```toml +# ~/.config/starship.toml + +[gcloud] +format = 'on [$symbol$account(\($project\))]($style) ' +``` + +#### Display active config name only + +```toml +# ~/.config/starship.toml + +[gcloud] +format = "[$symbol$active]($style) " +style = "bold yellow" +``` + +#### Display account and aliased region + +```toml +# ~/.config/starship.toml + +[gcloud] +symbol = "️🇬️ " +[gcloud.region_aliases] +us-central1 = "uc1" +asia-northeast1 = "an1" +``` + +## Git Branch + +The `git_branch` module shows the active branch of the repo in your current directory. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | +| `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) "` | Định dạng cho module. Use `"$branch"` to refer to the current branch name. | +| `symbol` | `" "` | A format string representing the symbol of git branch. | +| `style` | `"bold purple"` | Kiểu cho module. | +| `truncation_length` | `2^63 - 1` | Truncates a git branch to X 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. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| ------------- | -------- | ---------------------------------------------------------------------------------------------------- | +| 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 | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[git_branch] +symbol = "🌱 " +truncation_length = 4 +truncation_symbol = "" +``` + +## Git Commit + +The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| -------------------- | ------------------------------------------------------ | ----------------------------------------------------- | +| `commit_hash_length` | `7` | The length of the displayed git commit hash. | +| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | Định dạng cho module. | +| `style` | `"bold green"` | Kiểu cho module. | +| `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. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | --------- | --------------------------- | +| hash | `b703eb3` | The current git commit hash | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[git_commit] +commit_hash_length = 4 +tag_symbol = "🔖 " +``` + +## Git State + +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. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `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"` | Kiểu cho module. | +| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | Định dạng cho module. | +| `disabled` | `false` | Disables the `git_state` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| ---------------- | ---------- | ------------------------------ | +| state | `REBASING` | The current state of the repo | +| progress_current | `1` | The current operation progress | +| progress_total | `2` | The total operation progress | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[git_state] +format = '[\($state( $progress_current of $progress_total)\)]($style) ' +cherry_pick = "[🍒 PICKING](bold red)" +``` + +## Git Status + +The `git_status` module shows symbols representing the state of the repo in your current directory. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ------------ | ----------------------------------------------- | ----------------------------------- | +| `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` | +| `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"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `git_status` module. | + +### Các biến + +The following variables can be used in `format`: + +| Biến | Mô tả | +| -------------- | --------------------------------------------------------------------------------------------- | +| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$staged$untracked` | +| `ahead_behind` | Displays `diverged` `ahead` or `behind` 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\* | 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 + +The following variables can be used in `diverged`: + +| Biến | Mô tả | +| -------------- | ---------------------------------------------- | +| `ahead_count` | Number of commits ahead of the tracking branch | +| `behind_count` | Number of commits behind the tracking branch | + +The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`: + +| Biến | Mô tả | +| ------- | ------------------------ | +| `count` | Show the number of files | + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[git_status] +conflicted = "🏳" +ahead = "🏎💨" +behind = "😰" +diverged = "😵" +untracked = "🤷‍" +stashed = "📦" +modified = "📝" +staged = '[++\($count\)](green)' +renamed = "👅" +deleted = "🗑" +``` + +Show ahead/behind count of the branch being tracked + +```toml +# ~/.config/starship.toml + +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +## Golang + +The `golang` module shows the currently installed version of Golang. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- Đường dẫn hiện tại chứa một tập tin `go.mod` +- Đường dẫn hiện tại chứa một tập tin `go.sum` +- Đường dẫn hiện tại chứa một tập tin `glide.yaml` +- The current directory contains a `Gopkg.yml` file +- The current directory contains a `Gopkg.lock` file +- The current directory contains a `.go-version` file +- The current directory contains a `Godeps` directory +- The current directory contains a file with the `.go` extension + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ---------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `symbol` | `"🐹 "` | A format string representing the symbol of Go. | +| `style` | `"bold cyan"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `golang` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | --------- | -------------------------------- | +| version | `v1.12.1` | The version of `go` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[golang] +format = "via [🏎💨 $version](bold cyan) " +``` + +## Helm + +The `helm` module shows the currently installed version of Helm. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- Đường dẫn hiện tại chứa một tập tin `helmfile.yaml` +- The current directory contains a `Chart.yaml` file + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. | +| `style` | `"bold white"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `helm` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------- | -------------------------------- | +| version | `v3.1.1` | The version of `helm` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[helm] +format = "via [⎈ $version](bold white) " +``` + +## Hostname + +The `hostname` module shows the system hostname. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `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 "` | Định dạng cho module. | +| `style` | `"bold dimmed green"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `hostname` module. | + +### Các biến + +| Biến | Ví dụ | Mô 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 + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[hostname] +ssh_only = false +format = "on [$hostname](bold red) " +trim_at = ".companyname.com" +disabled = false +``` + +## Java + +The `java` module shows the currently installed version of Java. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file +- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ---------------------------------------- | ----------------------------------------------- | +| `format` | `"via [${symbol}(${version} )]($style)"` | Định dạng cho module. | +| `symbol` | `"☕ "` | A format string representing the symbol of Java | +| `style` | `"red dimmed"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `java` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ----- | -------------------------------- | +| version | `v14` | The version of `java` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[java] +symbol = "🌟 " +``` + +## Jobs + +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 is more than 1 job, or more than the `threshold` config value, if it exists. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ----------- | ----------------------------- | ------------------------------------------------ | +| `threshold` | `1` | Show number of jobs if exceeded. | +| `format` | `"[$symbol$number]($style) "` | Định dạng cho module. | +| `symbol` | `"✦"` | A format string representing the number of jobs. | +| `style` | `"bold blue"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `jobs` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ----- | -------------------------------- | +| number | `1` | The number of jobs | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[jobs] +symbol = "+ " +threshold = 4 +``` + +## Julia + +The `julia` module shows the currently installed version of Julia. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains a `Project.toml` file +- The current directory contains a `Manifest.toml` file +- The current directory contains a file with the `.jl` extension + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | +| `style` | `"bold purple"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `julia` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------- | -------------------------------- | +| version | `v1.4.0` | The version of `julia` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[julia] +symbol = "∴ " +``` + +## Kotlin + +The `kotlin` module shows the currently installed version of Kotlin. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains a `.kt` or a `.kts` file + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| --------------- | ------------------------------------ | ----------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | +| `style` | `"bold blue"` | Kiểu cho module. | +| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `kotlin` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | --------- | -------------------------------- | +| version | `v1.4.21` | The version of `kotlin` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[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 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`. + +::: thử thuật + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | +| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | Định dạng cho module. | +| `style` | `"cyan bold"` | Kiểu cho module. | +| `context_aliases` | | Table of context aliases to display. | +| `disabled` | `true` | Disables the `kubernetes` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------------------- | ---------------------------------------- | +| context | `starship-cluster` | The current kubernetes context | +| namespace | `starship-namespace` | If set, the current kubernetes namespace | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[kubernetes] +format = 'on [⛵ $context \($namespace\)](dimmed green) ' +disabled = false +[kubernetes.context_aliases] +"dev.local.cluster.k8s" = "dev" +``` + +## Line Break + +The `line_break` module separates the prompt into two lines. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | -------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[line_break] +disabled = true +``` + +## Lua + +The `lua` module shows the currently installed version of Lua. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains a `.lua-version` file +- The current directory contains a `lua` directory +- The current directory contains a file with the `.lua` extension + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ------------ | ------------------------------------ | -------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | +| `style` | `"bold blue"` | Kiểu cho module. | +| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `lua` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------- | -------------------------------- | +| version | `v5.4.0` | The version of `lua` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[lua] +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. + +::: thử thuật + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ----------- | --------------------------------------------- | -------------------------------------------------------- | +| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | +| `format` | `"via $symbol [${ram}( | ${swap})]($style) "` | Định dạng cho module. | +| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | +| `style` | `"bold dimmed white"` | Kiểu cho module. | +| `disabled` | `true` | Disables the `memory_usage` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| ---------------- | ------------- | ------------------------------------------------------------------ | +| 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 | `🐏` | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `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 + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[memory_usage] +disabled = false +threshold = -1 +symbol = " " +style = "bold dimmed green" +``` + +## Mercurial Branch + +The `hg_branch` module shows the active branch of the repo in your current directory. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | +| `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 X graphemes | +| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `disabled` | `true` | Disables the `hg_branch` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------- | -------------------------------- | +| branch | `master` | The active mercurial branch | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[hg_branch] +format = "on [🌱 $branch](bold purple)" +truncation_length = 4 +truncation_symbol = "" +``` + +## Nim + +The `nim` module shows the currently installed version of Nim. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- 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 + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module | +| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | +| `style` | `"bold yellow"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `nim` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------- | -------------------------------- | +| version | `v1.2.0` | The version of `nimc` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[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. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ------------ | ---------------------------------------------- | ----------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | Định dạng cho module. | +| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | +| `style` | `"bold blue"` | Kiểu cho 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. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ------- | -------------------------------- | +| state | `pure` | The state of the nix-shell | +| name | `lorri` | The name of the nix-shell | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[nix_shell] +disabled = true +impure_msg = "[impure shell](bold red)" +pure_msg = "[pure shell](bold green)" +format = 'via [☃️ $state( \($name\))](bold blue) ' +``` + +## NodeJS + +The `nodejs` module shows the currently installed version of NodeJS. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- 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`, `.mjs` or `.cjs` extension +- The current directory contains a file with the `.ts` extension + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `symbol` | `"⬢ "` | A format string representing the symbol of NodeJS. | +| `style` | `"bold green"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `nodejs` module. | +| `not_capable_style` | `bold red` | The style for the module when an engines property in Packages.json does not match the NodeJS version. | + +###  Variables + +| Biến | Ví dụ | Mô tả | +| --------- | ---------- | -------------------------------- | +| version | `v13.12.0` | The version of `node` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[nodejs] +format = "via [🤖 $version](bold green) " +``` + +## OCaml + +The `ocaml` module shows the currently installed version of OCaml. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains a file with `.opam` extension or `_opam` directory +- The current directory contains a `esy.lock` directory +- The current directory contains a `dune` or `dune-project` file +- The current directory contains a `jbuild` or `jbuild-ignore` file +- The current directory contains a `.merlin` file +- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | +| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | +| `style` | `"bold yellow"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `ocaml` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | --------- | -------------------------------- | +| version | `v4.10.0` | The version of `ocaml` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[ocaml] +format = "via [🐪 $version]($style) " +``` + +## OpenStack + +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. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | --------------------------------------------------- | -------------------------------------------------------------- | +| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | Định dạng cho module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | +| `style` | `"bold yellow"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `OpenStack` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ------ | -------------------------------- | +| cloud | `corp` | The current OpenStack cloud | +| project | `dev` | The current OpenStack project | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[openstack] +format = "on [$symbol$cloud(\\($project\\))]($style) " +style = "bold yellow" +symbol = "☁️ " +``` + +## 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`, `mix` and `helm` packages. + +- **npm** – The `npm` package version is extracted from the `package.json` present in the current directory +- **cargo** – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory +- **poetry** – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory +- **composer** – The `composer` package version is extracted from the `composer.json` present in the current directory +- **gradle** – The `gradle` package version is extracted from the `build.gradle` present +- **julia** - The package version is extracted from the `Project.toml` present +- **mix** - The `mix` package version is extracted from the `mix.exs` present +- **helm** - The `helm` chart version is extracted from the `Chart.yaml` present +- **maven** - The `maven` package version is extracted from the `pom.xml` present +- **meson** - The `meson` package version is extracted from the `meson.build` present + +> ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ----------------- | --------------------------------- | ---------------------------------------------------------- | +| `format` | `"is [$symbol$version]($style) "` | Định dạng cho module. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `style` | `"bold 208"` | Kiểu cho module. | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------- | -------------------------------- | +| version | `v1.0.0` | The version of your package | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[package] +format = "via [🎁 $version](208 bold) " +``` + +## Perl + +The `perl` module shows the currently installed version of Perl. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains a `Makefile.PL` or `Build.PL` file +- The current directory contains a `cpanfile` or `cpanfile.snapshot` file +- The current directory contains a `META.json` file or `META.yml` file +- The current directory contains a `.perl-version` file +- The current directory contains a `.pl`, `.pm` or `.pod` + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | +| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | +| `style` | `"bold 149"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `perl` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | --------- | -------------------------------- | +| version | `v5.26.1` | The version of `perl` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[perl] +format = "via [🦪 $version]($style) " +``` + +## PHP + +The `php` module shows the currently installed version of PHP. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains a `composer.json` file +- The current directory contains a `.php-version` file +- The current directory contains a `.php` file + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `style` | `"147 bold"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `php` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------- | -------------------------------- | +| version | `v7.3.8` | The version of `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 + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[php] +format = "via [🔹 $version](147 bold) " +``` + +## PureScript + +The `purescript` module shows the currently installed version of PureScript version. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains a `spago.dhall` file +- The current directory contains a \*.purs files + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `purescript` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------- | -------------------------------- | +| version | `0.13.5` | The version of `purescript` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[purescript] +format = "via [$symbol$version](bold white)" +``` + +## Python + +The `python` module shows the currently installed version of Python and the current Python virtual environment 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`. + +Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains a `.python-version` file +- 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 +- Đường dẫn hiện tại chứa một tập tin `tox.ini` +- Đường dẫn hiện tại chứa một tập tin `setup.py` +- The current directory contains a `__init__.py` file +- A virtual environment is currently activated + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | Định dạng cho module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | Kiểu cho 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 | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | + +::: thử thuật + +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. + +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. + +::: + +### Các biến + +| Biến | Ví dụ | Mô tả | +| ------------ | --------------- | ------------------------------------------ | +| version | `"v3.8.1"` | The version of `python` | +| symbol | `"🐍 "` | Giá trị ghi đè tuỳ chọn `symbol` | +| style | `"yellow bold"` | Giá trị ghi đè của `style` | +| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | +| virtualenv | `"venv"` | The current `virtualenv` name | + + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[python] +symbol = "👾 " +pyenv_version_name = true +``` + +```toml +# ~/.config/starship.toml + +[python] +# Only use the `python3` binary to get the version. +python_binary = "python3" +``` + +## Ruby + +The `ruby` module shows the currently installed version of Ruby. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains a `Gemfile` file +- The current directory contains a `.ruby-version` file +- The current directory contains a `.rb` file + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `ruby` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------- | -------------------------------- | +| version | `v2.5.1` | The version of `ruby` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[ruby] +symbol = "🔺 " +``` + +## Rust + +The `rust` module shows the currently installed version of Rust. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains a `Cargo.toml` file +- The current directory contains a file with the `.rs` extension + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `rust` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ----------------- | -------------------------------- | +| version | `v1.43.0-nightly` | The version of `rustc` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[rust] +format = "via [⚙️ $version](red bold)" +``` + +## SHLVL + +The `shlvl` module shows the current SHLVL ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ----------- | ---------------------------- | ----------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `"[$symbol$shlvl]($style) "` | Định dạng cho module. | +| `symbol` | `"↕️ "` | The symbol used to represent the SHLVL. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current SHLVL amount. | +| `style` | `"bold yellow"` | Kiểu cho module. | +| `disabled` | `true` | Disables the `shlvl` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ----- | -------------------------------- | +| shlvl | `3` | The current value of SHLVL | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[shlvl] +disabled = false +format = "$shlvl level(s) down" +threshold = 3 +``` + +## Singularity + +The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set. + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | -------------------------------- | ------------------------------------------------ | +| `format` | `'[$symbol\[$env\]]($style) '` | Định dạng cho module. | +| `symbol` | `""` | A format string displayed before the image name. | +| `style` | `"bold dimmed blue"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `singularity` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ------------ | -------------------------------- | +| env | `centos.img` | The current singularity image | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[singularity] +format = '[📦 \[$env\]]($style) ' +``` + +## Status + +The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. + +::: thử thuật + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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"` | Kiểu cho module. | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| -------------- | ------- | -------------------------------------------------------------------- | +| status | `127` | The exit code of the last command | +| 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 | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml + +# ~/.config/starship.toml + +[status] +style = "bg:blue" +symbol = "🔴" +format = '[\[$symbol $status_common_meaning$status_signal_name$status_maybe_int\]]($style) ' +map_symbol = true +disabled = false + +``` + +## Swift + +The `swift` module shows the currently installed version of Swift. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains a `Package.swift` file +- The current directory contains a file with the `.swift` extension + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `swift` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------- | -------------------------------- | +| version | `v5.2.4` | The version of `swift` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[swift] +format = "via [🏎 $version](red bold)" +``` + +## Terraform + +The `terraform` module shows the currently selected terraform workspace and version. + +::: thử thuật + +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-version). + +::: + +Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains a `.terraform` folder +- Current directory contains a file with the `.tf` or `.hcl` extensions + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | +| `symbol` | `"💠 "` | A format string shown before the terraform workspace. | +| `style` | `"bold 105"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `terraform` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ---------- | -------------------------------- | +| version | `v0.12.24` | The version of `terraform` | +| workspace | `mặc định` | The current terraform workspace | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +#### With Version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $version$workspace]($style) " +``` + +#### Without version + +```toml +# ~/.config/starship.toml + +[terraform] +format = "[🏎💨 $workspace]($style) " +``` + +## 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. + +::: thử thuật + +This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. + +::: + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `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"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ---------- | -------------------------- | +| 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 + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[time] +disabled = false +format = '🕙[\[ $time \]]($style) ' +time_format = "%T" +utc_time_offset = "-5" +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 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 + +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. + +::: + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ------------- | ----------------------- | ------------------------------------- | +| `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 "` | Định dạng cho module. | +| `show_always` | `false` | Always shows the `username` module. | +| `disabled` | `false` | Disables the `username` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| ------- | ------------ | ------------------------------------------------------------------------------------------- | +| `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. | + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[username] +style_user = "white bold" +style_root = "black bold" +format = "user: [$user]($style) " +disabled = false +show_always = true +``` + +## Zig + +The `zig` module shows the currently installed version of Zig. Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains a `.zig` file + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | Kiểu cho module. | +| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | +| `disabled` | `false` | Disables the `zig` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | -------- | -------------------------------- | +| version | `v0.6.0` | The version of `zig` | +| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | +| style\* | | Giá trị ghi đè của `style` | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[zig] +symbol = "⚡️ " +``` + +## Custom commands + +The `custom` modules show the output of some arbitrary commands. + +These modules will be shown if any of the following conditions are met: + +- The current directory contains a file whose name is in `files` +- The current directory contains a directory whose name is in `directories` +- The current directory contains a file whose extension is in `extensions` +- The `when` command returns 0 + +::: thử thuật + +Multiple custom modules can be defined by using a `.`. + +::: + +::: thử thuật + +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 + +[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! + +::: + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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`. | +| `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"` | Kiểu cho module. | +| `format` | `"[$symbol($output )]($style)"` | Định dạng cho module. | +| `disabled` | `false` | Disables this `custom` module. | + +### Các biến + +| Biến | Mô tả | +| --------- | -------------------------------------- | +| output | The output of shell command in `shell` | +| 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 + +#### 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. + +The `command` will be passed in on stdin. + +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. + +::: + +### Ví dụ + +```toml +# ~/.config/starship.toml + +[custom.foo] +command = "echo foo" # shows output of command +files = ["foo"] # can specify filters +when = """ test "$HOME" == "$PWD" """ +format = " transcending [$output]($style)" + +[custom.time] +command = "time /T" +files = ["*.pst"] +shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] +``` diff --git a/docs/vi-VN/faq/README.md b/docs/vi-VN/faq/README.md new file mode 100644 index 000000000..fb538a43f --- /dev/null +++ b/docs/vi-VN/faq/README.md @@ -0,0 +1,92 @@ +# CÂU HỎI THƯỜNG GẶP + +## Cấu hình sử dụng trong demo GIF là gì? + +- **Terminal Emulator**: [iTerm2](https://iterm2.com/) + - **Theme**: Minimal + - **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy) + - **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads) +- **Shell**: [Fish Shell](https://fishshell.com/) + - **Cấu hình**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish) + - **Prompt**: [Starship](https://starship.rs/) + +## Làm thế nào tôi có được hoàn thiện câu lệnh như được hiển thị trong demo GIF? + +Hỗ trợ hoàn thiện, hoặc tự động hoàn thiện, được cung cấp bởi shell của bạn lựa chọn. Trong trường hợp của demo, demo đã thực hiện với [Fish Shell](https://fishshell.com/), thứ mặc định cung cấp những completion. Nếu bạn sử dụng Z Shell (zsh), tôi muốn gợi ý xem qua [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). + +## Có phải level trên cùng `format` và `.disable` thực hiện cùng một thứ giống nhau? + +Vâng, chúng có thể cùng được sử dụng để vô hiệu hoá các module trong prompt. Nếu tất cả bạn những việc bạn làm để vô hiệu hoá các module, `.disabled` là các được ưa thích hơn để thực hiện với những lí do sau: + +- Các module vô hiệu là ro ràng hơn sót chúng từ level trên cùng `format` +- Những module mới tạo sẽ được thêm bào prompt khi Starship được cập nhật + +## Các tài liệu nói Starship là cross-shell. Tại sao shell ưa thích của tôi không được hỗ trợ? + +Cách Starship được xây dựng, nó nên khả thi để thêm hỗ trợ với bất kì shell ảo nào. Starship nhị phân là phi trạng thái và bất khả tri của shell, vì vậy, miễn là shell của bạn hỗ trợ tùy chỉnh nhanh chóng và mở rộng shell, thì Starship có thể được sử dụng. + +Đây là một ví dụ nhỏ để Starship là việc với bash: + +```sh +# Lấy mã trạng thái từ câu lệnh cuối đã được thực thi +STATUS=$? + +# Lấy số lượng job đang chạy. +NUM_JOBS=$(jobs -p | wc -l) + +# Thiết lập prompt thành đầu ra của `starship prompt` +PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)" +``` + +[Bản cài đặt Bash](https://github.com/starship/starship/blob/master/src/init/starship.bash) xây dựng bên trong Starship phực tạp hơn một chút để cho phép thực hiện các tính năng nâng cao hơn một chứt như [Command Duration module](https://starship.rs/config/#Command-Duration) và chắc chắn rằng Starship là tương thích với cấu hình Bash đã cài đặt trước đó. + +Với một danh sách tất cả các cờ đã được chấp nhận bởi `starship prompt`, sử dụng lệnh sau: + +```sh +starship prompt --help +``` + +Prompt sẽ sử dụng nhiều ngữ cảnh được cung câos, nhưng không có cờ nào là "yêu cầu". + +## Làm thế nào để tôi chạy Starship trên các bản phân phối Linux với các phiên bản cũ của glibc? + +Nếu bạn nhận được một lỗi giống như "_version 'GLIBC_2.18' not found (required by starship)_" khi sử dụng prebuilt binary (ví dụ trên CentOS 6 hoặc 7), bạn có thể sử dụng tập tin đã được dịch với `musl` thay vì `glibc`: + +```sh +curl -fsSL https://starship.rs/install.sh | bash -s -- --platform unknown-linux-musl +``` + +## Tại sao tôi không tình thấy một kí hiệu glyph trong prompt? + +Đa số nguyên nhân phổ biến của việc này là cấu hình hệ thống sai. Một số bản phân phối Linux đặc biệt không có hỗ trợ phông chữ ngay lập tức. Bạn cần chắc chắn rằng: + +- Mã ngôn ngữ của bạn được thiết lập là một giá trị UTF-8, giống như `de_DE.UTF-8` or `ja_JP.UTF-8`. Nếu `LO_ALL` không phải là một giá trị UTF-8, [ bạn sẽ cần thay đổi nó](https://www.tecmint.com/set-system-locales-in-linux/). +- Bạn đã cài đặt phông chữ biểu tượng cảm xúc. Đa số hệ thống đi kèm với một phông biểu tượng cảm xúc mặc định, nhưng một vài (đáng chú ý là Arch Linux) thì không. Bạn có thể thường cài đặt thông qua một trình quản lí gói hệ thống của bạn--[noto emoji](https://www.google.com/get/noto/help/emoji/) là một lựa chọn phổ biến. +- Bạn đang sử dụng một [Nerd Font](https://www.nerdfonts.com/). + +Để kiểm tra hệ thống của bạn, chạy các câu lệnh sau trong một terminal: + +```sh +echo -e "\xf0\x9f\x90\x8d" +echo -e "\xee\x82\xa0" +``` + +Dòng đầu tiên nên sinh ra một [snake emoji](https://emojipedia.org/snake/), trong khi dòng thứ hai nên sinh ra một [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). + +Nếu một trong hai biểu tượng không hiển thị chính xác, hệ thống của bạn vẫn bị cấu hình sai. Thật không may, việc lấy đúng cấu hình phông chữ đôi khi rất khó. Những người dùng trên Discord có thể giúp đỡ. Nếu cả hai kí hiệu hiển thị đúng, nhưng bạn vẫn không thấy chúng trong starship, [nộp một báo cáo lỗi!](https://github.com/starship/starship/issues/new/choose) + +## Làm cách nào để tôi gỡ cài đặt Starship? + +Starship thì dễ dàng gỡ cài đặt như cài đặt ngay từ đầu. + +1. Gỡ mọi tập tin trong cấu hình shell của bạn (e.g. `~/.bashrc`) đã sử dụng để khởi tạo Starship. +1. Xoá tập tin Starship nhị phân. + +Nếu Starship đã được cài đặt bằng việc sử dụng một trình quản lí gói, vui lòng tham khảo tài liệu của chúng để gỡ cài đặt. + +Nếu Starship đã được càu đặt bằng việc sử dụng `curl | bash`, theo câu lệnh sau để xoá tập tin nhị phân: + +```sh +# Xác định vị trí và xóa tập tin nhị phân của starship +rm "$(which starship)" +``` diff --git a/docs/vi-VN/guide/README.md b/docs/vi-VN/guide/README.md new file mode 100644 index 000000000..66356f313 --- /dev/null +++ b/docs/vi-VN/guide/README.md @@ -0,0 +1,267 @@ +

+ Starship – Cross-shell prompt +

+ +

+ Trạng thái GitHub Actions workflow + Phiên bản Crates.io + Trạng thái đóng gói
+ Trò chuyện trên Discord + Theo dõi @StarshipPrompt trên Twitter +

+ +

+ Website + · + Cài đặt + · + Cấu hình +

+ +

+ Tiếng Anh +   + Tiếng Nhật +   + Tiếng Trung hiện đại +   + Tiếng Nga +   + Tiếng Đức +   + Tiếng Trung giản thể +   + Tiếng Tây Ban Nha +   + Thiếng Pháp +

+ +

+ +Starship với iTerm2 and chủ đề Snazzy + +**Nhỏ gọn, cực nhanh, và khả năng tuỳ chỉnh vô hạn prompt cho bất kì shell nào!** + +- **Nhanh:** nó có tốc độ nhanh – _thực sự_ nhanh! 🚀 +- **Khả năng tuỳ chỉnh:** cấu hình mọi thứ trên prompt của bạn. +- **Độ phổ biến:** làm việc trên mọi shell, bất kì hệ điều hành nào. +- **Thông minh:** hiển thị thông tin liên quan dưới một cái nhìn. +- **Tính năng phong phú:** hỗ trợ tất cả các công cụ yêu thích của bạn. +- **Dễ dàng:** cài đặt nhanh chóng – bắt đầu sử dụng nó trong vài phút. + +

+Khám phá tài liệu của Starship  ▶ +

+ + + +## 🚀 Cài đặt + +### Yêu cầu + +- Đã cài đặt m [Nerd Font](https://www.nerdfonts.com/) và đã kích hoạt trong giao diện dòng lệnh của bạn (ví dụ, thử [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). + +### Bắt đầu + +**Lưu ý**: do sự gia tăng của các nền tảng khác nhau, chỉ một tập con các nền tảng hỗ trợ được hiển thị bên dưới. Không thể tìm thấy nền tảng phù hợp của bạn? Hãy xem một [hướng dẫn bổ sung cho các nền tảng khác](https://starship.rs/installing/). + +1. Cài đặt **starship** nhị phân: + + + #### Cài đặt phiên bản cuối cùng + + + ##### Từ bản nhị phân có sẵn, với Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + #### Cài đặt thông qua Trình quản lí gói + + + ##### Ví dụ: [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + + ##### Với [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +2. Thêm đoạn mã khởi tạo vào tệp tin cấu hình shell của bạn: + + + #### Bash + + Thêm đoạn sau vào cuối tệp tin `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Thêm đoạn sau vào cuối tệp tin `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Thêm đoạn sau vào cuối tệp tin `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### PowerShell + + Thêm đoạn sau vào cuối tệp tin `Microsoft.PowerShell_profile.ps1`. Bạn có thể kiểm tra vị trí tệp tin này bằng việc truy xuất biến `$PROFILE` trong PowerShell. Thông thường, đường dẫn là `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` hoặc `~/.config/powershell/Microsoft.PowerShell_profile.ps1` trên -Nix. + + ```powershell + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Thêm đoạn sau vào cuối tệp tin `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` + +## 🤝 Đóng góp + +Chúng tôi luôn luôn tìm kiếm những cộng tác viên ở **tất cả các các mức độ về kĩ năng**! Nếu bạn đang tìm kiếm cách dễ dàng để tham gia vào dự án, thử một [good issue đầu tiên](https://github.com/starship/starship/labels/🌱%20good%20first%20issue). + +Nếu bạn thành thạo một ngôn ngữ không phải Tiếng Anh, chúng tôi đánh giá cao mọi sự giúp đỡ của bạn trong việc dịch tài liệu của chúng tôi và cập nhật các ngôn ngữ khác. Nếu bạn muốn giúp đỡ, những bản dịch có thể được đóng góp trên [Starship Crowdin](https://translate.starship.rs/). + +Nếu bạn thích thú trong việc giúp đỡ đóng góp cho starship, xin hãy xem [Hướng dẫn đóng góp](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) của chúng tôi. Ngoài ra, vui lòng truy cập vào [máy chủ Discord](https://discord.gg/8Jzqu3T) và nói xin chào. 👋 + +### Cộng tác viên + +Dự án này tồn tại là nhờ tất cả những cộng tác viên. [[Cộng tác viên](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. + + +### Những cộng tác viên về tài chính + +Trở thành một cộng tác viên tài tài về tài chính và giúp chúng ta duy trì cộng đồng của chúng ta. [[Cộng tác viên](https://opencollective.com/starship/contribute)] + +#### Cá nhân + + + +#### Tổ chức + +Hỗ trợ dự án này với tổ chức của bạn. Biểu tượng của bạn sẽ hiển thị ở đây với một liên kết tới website của bạn. [[Cộng tác viên](https://opencollective.com/starship/contribute)] + + + + + + + + + + + + +## Cảm hứng + +Xin hãy xem qua những công việc này trước đây, những thứ đã giúp truyền cảm hứng để tạo ra starship. 🙏 + +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt cho những phi hành gia. + +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme được viết bằng JavaScript. + +- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell có khả năng tuỳ biến giống powerline prompt với các icon. + +

+
+ Starship rocket icon +

+ +## 📝 Giấy phép + +Bản quyền © 2019-nay, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
Dự án này được [ISC](https://github.com/starship/starship/blob/master/LICENSE) cấp phép. diff --git a/docs/vi-VN/installing/README.md b/docs/vi-VN/installing/README.md new file mode 100644 index 000000000..9c322db60 --- /dev/null +++ b/docs/vi-VN/installing/README.md @@ -0,0 +1,46 @@ +# 🚀 Cài đặt nâng cao + +Để cài đặt starship, bạn cần làm 2 thứ: + +1. Lấy tệp tin **starship** nhị phân về máy tính của bạn +1. Nói với shell của bạn để sử dụng tệp tin starship nhị phân như là prompt của nó bằng việc chỉnh sửa những đoạn mã khởi tạo của nó + +Đối với đa số người dùng, các hướng dẫn trên [trang chính](/guide/#🚀-installation) sẽ làm việc tốt. Tuy nhiên, với một vài nền tảng đặc biệt hơn, các hướng dẫn khác nhau là cần thiết. + +Có rất nhiều nền tảng bên ngoài, rằng chúng đã không khớp như trong tệp tin README.md, do đó đây là vài hướng dẫn cài đặt cho những nền tảng khác đến từ cộng đồng. Của bạn không có ở đây? Xin hãy thêm nó vào đây nếu bạn tìm ra nó! + +## [Nix](https://nixos.wiki/wiki/Nix) + +### Lấy tệp tin nhị phân + +#### Lệnh + +```sh +nix-env -iA nixos.starship +``` + +#### Khai báo, người dùng đơn, thông qua [home-manager](home-manager) + +Thêm `pkgs.starship` vào `home.packages` trong tệp tin `home.nix` của bạn, sau đó chạy + +```sh +home-manager switch +``` + +#### Khai báo, system-wide, với NixOS + +Thêm `pkgs.starship` vào `environment.packages` trong `configuration.nix` của bạn, sau đó chạy + +```sh +sudo nixos-rebuild switch +``` + +### Sửa những đoạn mã khởi tạo + +#### Với Nix và home-manager, sử dụng zsh: + +Thêm phần sau vào `programs.zsh.initExtra` trong tệp tin `home.nix` của bạn, sau đó chạy + +```sh +home-manager switch +``` diff --git a/docs/vi-VN/migrating-to-0.45.0/README.md b/docs/vi-VN/migrating-to-0.45.0/README.md new file mode 100644 index 000000000..95a847bf2 --- /dev/null +++ b/docs/vi-VN/migrating-to-0.45.0/README.md @@ -0,0 +1,267 @@ +# Migrating to v0.45.0 + +Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization. + +This guide is intended to walk you through the breaking changes. + +## `prompt_order` has been replaced by a root-level `format` + +Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship. + +Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves. + +**Example pre-v0.45.0 configuration** + +```toml +prompt_order = [ + "username", + "hostname", + "directory", + "git_branch", + "git_commit", + "git_state", + "git_status", + "cmd_duration", + "custom", + "line_break", + "jobs", + "battery", + "time", + "character", +] +``` + +**Example v0.45.0 configuration** + +```toml +format = """\ + $username\ + $hostname\ + $directory\ + $git_branch\ + $git_commit\ + $git_state\ + $git_status\ + $cmd_duration\ + $custom\ + $line_break\ + $jobs\ + $battery\ + $time\ + $character\ + """ +``` + +## Module `prefix` and `suffix` have been replaced by `format` + +Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered. + +Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output. + +**Example pre-v0.45.0 configuration** + +```toml +[cmd_duration] +prefix = "took " +``` + +**Example v0.45.0 configuration** + +```toml +[cmd_duration] +# $duration – The command duration (e.g. "15s") +# $style – The default style of the module (e.g. "bold yellow") +format = "took [$duration]($style) " +``` + +### Affected Modules + +#### Character + +| Removed Property | Replacement | +| ----------------------- | ---------------- | +| `symbol` | `success_symbol` | +| `use_symbol_for_status` | `error_symbol` | +| `style_success` | `success_symbol` | +| `style_failure` | `error_symbol` | + +**Changes to the Default Configuration** + +```diff +[character] +-- symbol = "❯" +-- error_symbol = "✖" +-- use_symbol_for_status = true +-- vicmd_symbol = "❮" +++ success_symbol = "[❯](bold green)" +++ error_symbol = "[❯](bold red)" +++ vicmd_symbol = "[❮](bold green)" +``` + +Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code. + +With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties. + +To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file: + +```toml +[character] +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. + +#### Command Duration + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[cmd_duration] +-- prefix = "took " +++ format = "took [$duration]($style) " +``` + +#### Directory + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | + +**Changes to the Default Configuration** + +```diff +[directory] +-- prefix = "in " +++ format = "[$path]($style)[$read_only]($read_only_style) " +``` + +#### Environment Variable + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[env_var] +-- prefix = "" +-- suffix = "" +++ format = "with [$env_value]($style) " +``` + +#### Git Commit + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_commit] +-- prefix = "(" +-- suffix = ")" +++ format = '[\($hash\)]($style) ' +``` + +#### Git Status + +| Removed Property | Replacement | +| ----------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | +| `show_sync_count` | `format` | + +**Changes to the Default Configuration** + +```diff +[git_status] +-- prefix = "[" +-- suffix = "]" +-- show_sync_count = false +++ format = '([\[$all_status$ahead_behind\]]($style) )' +``` + +Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch. + +With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`. + +To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file: + +```toml +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" +``` + +#### Hostname + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[hostname] +-- prefix = "" +-- suffix = "" +++ format = "[$hostname]($style) in " +``` + +#### Singularity + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `label` | `format` | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[singularity] +-- prefix = "" +-- suffix = "" +++ format = '[$symbol\[$env\]]($style) ' +``` + +#### Time + +| Removed Property | Replacement | +| ---------------- | ------------- | +| `format` | `time_format` | + +**Changes to the Default Configuration** + +```diff +[time] +-- format = "🕙[ %T ]" +++ time_format = "%T" +++ format = "at 🕙[$time]($style) " +``` + +#### Custom Commands + +| Removed Property | Replacement | +| ---------------- | ----------- | +| `prefix` | `format` | +| `suffix` | `format` | + +**Changes to the Default Configuration** + +```diff +[custom.example] +-- prefix = "" +-- suffix = "" +++ format = "[$symbol$output]($style) " +``` diff --git a/docs/vi-VN/presets/README.md b/docs/vi-VN/presets/README.md new file mode 100644 index 000000000..24aca7fba --- /dev/null +++ b/docs/vi-VN/presets/README.md @@ -0,0 +1,89 @@ +# Mẫu thiết lập + +Đây là một bộ sưu tập các cấu hình được gửi tới từ cộng đồng cho Starship. Nếu bạn có một bản preset trước để chia sẻ, xin hãy [gửi một PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) cập nhật tập tin này! 😊 + +## Những kí tự Nerd Font + +Preset này không thay đổi bất kể thứ gì ngoại trừ các kí hiệu sử dụng cho mỗi module. Nếu các emojis không phải thứ của bạn, cái này có thể thu hút bạn! + +![Bản chụp màn hình của Nerd Font Symbols preset](/presets/nerd-font-symbols.png) + +### Yêu cầu + +- Một [Nerd Font](https://www.nerdfonts.com/) đã cài đặt và đã cho kích hoạt trong terminal của bạn (ví dụ sử dụng Fira Code Nerd Font) + +### Cấu hình + +```toml +[aws] +symbol = " " + +[conda] +symbol = " " + +[dart] +symbol = " " + +[directory] +read_only = " " + +[docker] +symbol = " " + +[elixir] +symbol = " " + +[elm] +symbol = " " + +[git_branch] +symbol = " " + +[golang] +symbol = " " + +[haskell] +symbol = " " + +[hg_branch] +symbol = " " + +[java] +symbol = " " + +[julia] +symbol = " " + +[memory_usage] +symbol = " " + +[nim] +symbol = " " + +[nix_shell] +symbol = " " + +[nodejs] +symbol = " " + +[package] +symbol = " " + +[perl] +symbol = " " + +[php] +symbol = " " + +[python] +symbol = " " + +[ruby] +symbol = " " + +[rust] +symbol = " " + +[swift] +symbol = "ﯣ " +``` diff --git a/docs/zh-CN/advanced-config/README.md b/docs/zh-CN/advanced-config/README.md index 881617ee9..508b255da 100644 --- a/docs/zh-CN/advanced-config/README.md +++ b/docs/zh-CN/advanced-config/README.md @@ -1,8 +1,8 @@ -# Advanced Configuration +# 高级配置 `Starship 功能繁多,有时您必须在编辑 starship.toml` 之外做更多工作才能实现某些效果。 此页面详细介绍了一些在 starship 中使用的高级配置技巧。 -::: warning +::: 警告 本节所述的配置内容可能随 Starship 未来版本的更新而改变。 @@ -10,7 +10,7 @@ ## 在 Bash 中自定义预提示和预执行命令 -Bash 没有像大多数其它 shell 一样的正式预执行/预命令框架。 因此,很难在 `bash` 中提供完全可自定义的 hook 机制。 然而,Starship 确实能使您有限地在提示符渲染过程中插入自己的函数执行: +Bash 并没有类似大多数其它 shell 的正式预执行/预命令框架。 因此,很难在 `bash` 中提供完全可自定义的 hook 机制。 然而,Starship 确实能使您有限地在提示符渲染过程中插入自己的函数执行: - 若要在提示符显示之前运行自定义函数,需要定义此函数,然后将函数名赋值给 `starship_reserved_user_func`。 例如,要在提示符之前绘制一枚火箭,您应该写 diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md index 7d7ffb9a7..a43ec41aa 100644 --- a/docs/zh-CN/config/README.md +++ b/docs/zh-CN/config/README.md @@ -29,7 +29,7 @@ export STARSHIP_CONFIG=~/.starship 在 PowerShell (Windows) 中,在 `$PROFILE` 中添加下面的代码行能达到同样的效果: -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -43,7 +43,7 @@ export STARSHIP_CACHE=~/.starship/cache 在 PowerShell (Windows) 中,在 `$PROFILE` 中添加下面的代码行能达到同样的效果: -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -427,12 +427,12 @@ The `cmake` module shows the currently installed version of CMake if any of the ### 配置项 -| Option | 默认值 | 描述 | -| ---------- | ---------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | 组件格式化模板。 | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | -| `style` | `"bold blue"` | 此组件的样式。 | -| `disabled` | `false` | Disables the `cmake` module. | +| Option | 默认值 | 描述 | +| ---------- | ------------------------------------ | -------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | 此组件的样式。 | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -542,12 +542,12 @@ The `crystal` module shows the currently installed version of Crystal. 此组件 ### 配置项 -| Option | 默认值 | 描述 | -| ---------- | ---------------------------------- | --------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `style` | `"bold red"` | 此组件的样式。 | -| `format` | `"via [$symbol$version]($style) "` | 组件格式化模板。 | -| `disabled` | `false` | Disables the `crystal` module. | +| Option | 默认值 | 描述 | +| ---------- | ------------------------------------ | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | 此组件的样式。 | +| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables @@ -578,12 +578,12 @@ The `dart` module shows the currently installed version of Dart. 此组件将在 ### 配置项 -| Option | 默认值 | 描述 | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | 组件格式化模板。 | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `style` | `"bold blue"` | 此组件的样式。 | -| `disabled` | `false` | Disables the `dart` module. | +| Option | 默认值 | 描述 | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | 此组件的样式。 | +| `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -624,6 +624,7 @@ format = "via [🔰 $version](bold red) " | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
此组件有几个高级配置选项来控制当前目录路径的显示方式。 @@ -671,13 +672,13 @@ The `docker_context` module shows the currently active [Docker context](https:// ### 配置项 -| Option | 默认值 | 描述 | -| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | 组件格式化模板。 | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `style` | `"blue bold"` | 此组件的样式。 | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | Disables the `docker_context` module. | +| Option | 默认值 | 描述 | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | 组件格式化模板。 | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | 此组件的样式。 | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -722,13 +723,13 @@ The module will also show the Target Framework Moniker ( "` | The symbol used before displaying the version of PureScript. | -| `style` | `"bold white"` | 此组件的样式。 | -| `disabled` | `false` | Disables the `purescript` module. | +| Option | 默认值 | 描述 | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | 此组件的样式。 | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -1958,16 +1959,16 @@ format = "via [$symbol$version](bold white)" ### 配置项 -| Option | 默认值 | 描述 | -| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | 组件格式化模板。 | -| `symbol` | `"🐍 "` | 用于表示Python的格式化字符串。 | -| `style` | `"yellow bold"` | 此组件的样式。 | -| `pyenv_version_name` | `false` | 使用 pyenv 获取 Python 版本 | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `scan_for_pyfiles` | `true` | 如果设置为false, 在本目录下的Python文件将不会在本组件中显示。 | -| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `disabled` | `false` | 禁用 `python` 组件。 | +| Option | 默认值 | 描述 | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | 组件格式化模板。 | +| `symbol` | `"🐍 "` | 用于表示Python的格式化字符串。 | +| `style` | `"yellow bold"` | 此组件的样式。 | +| `pyenv_version_name` | `false` | 使用 pyenv 获取 Python 版本 | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | 如果设置为false, 在本目录下的Python文件将不会在本组件中显示。 | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | 禁用 `python` 组件。 | ::: tip @@ -2016,12 +2017,12 @@ python_binary = "python3" ### 配置项 -| Option | 默认值 | 描述 | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | 组件格式化模板。 | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold red"` | 此组件的样式。 | -| `disabled` | `false` | 禁用 `ruby` 组件。 | +| Option | 默认值 | 描述 | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | 此组件的样式。 | +| `disabled` | `false` | 禁用 `ruby` 组件。 | ### Variables @@ -2051,12 +2052,12 @@ symbol = "🔺 " ### 配置项 -| Option | 默认值 | 描述 | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | 组件格式化模板。 | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold red"` | 此组件的样式。 | -| `disabled` | `false` | 禁用 `rust` 组件。 | +| Option | 默认值 | 描述 | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | 此组件的样式。 | +| `disabled` | `false` | 禁用 `rust` 组件。 | ### Variables @@ -2157,18 +2158,18 @@ The `status` module displays the exit code of the previous command. The module w ### 配置项 -| Option | 默认值 | 描述 | -| ----------------------- | -------------------------- | ---------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `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"` | 此组件的样式。 | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `disabled` | `true` | Disables the `status` module. | +| Option | 默认值 | 描述 | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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"` | 此组件的样式。 | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables @@ -2209,12 +2210,12 @@ The `swift` module shows the currently installed version of Swift. 此组件将 ### 配置项 -| Option | 默认值 | 描述 | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | 组件格式化模板。 | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `style` | `"bold 202"` | 此组件的样式。 | -| `disabled` | `false` | Disables the `swift` module. | +| Option | 默认值 | 描述 | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | 此组件的样式。 | +| `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -2237,7 +2238,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). 此组件将在符合以下任意条件之一时显示: +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +此组件将在符合以下任意条件之一时显示: - 当前目录包含 `.terraform` 目录 - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2381,12 +2390,12 @@ The `zig` module shows the currently installed version of Zig. 此组件将在 ### 配置项 -| Option | 默认值 | 描述 | -| ---------- | ---------------------------------- | ----------------------------------------------------- | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | 此组件的样式。 | -| `format` | `"via [$symbol$version]($style) "` | 组件格式化模板。 | -| `disabled` | `false` | Disables the `zig` module. | +| Option | 默认值 | 描述 | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | 此组件的样式。 | +| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | +| `disabled` | `false` | Disables the `zig` module. | ### Variables @@ -2438,19 +2447,19 @@ The order in which custom modules are shown can be individually set by including ### 配置项 -| Option | 默认值 | 描述 | -| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `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`. | -| `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"` | 此组件的样式。 | -| `format` | `"[$symbol$output]($style) "` | 组件格式化模板。 | -| `disabled` | `false` | Disables this `custom` module. | +| Option | 默认值 | 描述 | +| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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`. | +| `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"` | 此组件的样式。 | +| `format` | `"[$symbol($output )]($style)"` | 组件格式化模板。 | +| `disabled` | `false` | Disables this `custom` module. | ### Variables diff --git a/docs/zh-CN/guide/README.md b/docs/zh-CN/guide/README.md index 93e593575..303ce8ccc 100644 --- a/docs/zh-CN/guide/README.md +++ b/docs/zh-CN/guide/README.md @@ -196,7 +196,7 @@ 将以下内容添加到 `Microsoft.PowerShell_profile.ps1`。 你可以在 PowerShell 通过 `$PROFILE` 变量来查询文件的位置。 对于 -Nix 来说,通常文件路径是 `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` 或 `~/.config/powershell/Microsoft.PowerShell_profile.ps1`。 - ```sh + ```powershell Invoke-Expression (&starship init powershell) ``` diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md index 16faaf5e8..8764de52e 100644 --- a/docs/zh-TW/config/README.md +++ b/docs/zh-TW/config/README.md @@ -29,7 +29,7 @@ export STARSHIP_CONFIG=~/.starship Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship" ``` @@ -43,7 +43,7 @@ export STARSHIP_CACHE=~/.starship/cache Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: -```ps1 +```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` @@ -427,12 +427,12 @@ The `cmake` module shows the currently installed version of CMake if any of the ### 選項 -| Option | 預設 | 說明 | -| ---------- | ---------------------------------- | -------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | -| `style` | `"bold blue"` | 這個模組的風格。 | -| `disabled` | `false` | Disables the `cmake` module. | +| Option | 預設 | 說明 | +| ---------- | ------------------------------------ | -------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | 這個模組的風格。 | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables @@ -542,12 +542,12 @@ format = "[$symbol$environment](dimmed green) " ### 選項 -| Option | 預設 | 說明 | -| ---------- | ---------------------------------- | --------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `style` | `"bold red"` | 這個模組的風格。 | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `crystal` module. | +| Option | 預設 | 說明 | +| ---------- | ------------------------------------ | --------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `style` | `"bold red"` | 這個模組的風格。 | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables @@ -578,12 +578,12 @@ The `dart` module shows the currently installed version of Dart. 這個模組在 ### 選項 -| Option | 預設 | 說明 | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `style` | `"bold blue"` | 這個模組的風格。 | -| `disabled` | `false` | Disables the `dart` module. | +| Option | 預設 | 說明 | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `style` | `"bold blue"` | 這個模組的風格。 | +| `disabled` | `false` | Disables the `dart` module. | ### Variables @@ -624,6 +624,7 @@ format = "via [🔰 $version](bold red) " | `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: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
這個模組有些進階設定選項可以控制顯示資料夾。 @@ -671,13 +672,13 @@ The `docker_context` module shows the currently active [Docker context](https:// ### 選項 -| Option | 預設 | 說明 | -| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `style` | `"blue bold"` | 這個模組的風格。 | -| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. | -| `disabled` | `true` | Disables the `docker_context` module. | +| Option | 預設 | 說明 | +| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | +| `style` | `"blue bold"` | 這個模組的風格。 | +| `only_with_files` | `true` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. | +| `disabled` | `false` | Disables the `docker_context` module. | ### Variables @@ -722,13 +723,13 @@ The module will also show the Target Framework Moniker ( "` | The symbol used before displaying the version of PureScript. | -| `style` | `"bold white"` | 這個模組的風格。 | -| `disabled` | `false` | Disables the `purescript` module. | +| Option | 預設 | 說明 | +| ---------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `style` | `"bold white"` | 這個模組的風格。 | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables @@ -1958,16 +1959,16 @@ If `pyenv_version_name` is set to `true`, it will display the pyenv version name ### 選項 -| Option | 預設 | 說明 | -| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}${version}( \($virtualenv\))]($style) '` | The format for the module. | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | -| `style` | `"yellow bold"` | 這個模組的風格。 | -| `pyenv_version_name` | `false` | 使用 pyenv 取得 Python 的版本。 | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | -| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `disabled` | `false` | 停用 `python` 模組。 | +| Option | 預設 | 說明 | +| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'` | The format for the module. | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | 這個模組的風格。 | +| `pyenv_version_name` | `false` | 使用 pyenv 取得 Python 的版本。 | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. | +| `python_binary` | `["python", "python3, "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `disabled` | `false` | 停用 `python` 模組。 | ::: tip @@ -2016,12 +2017,12 @@ python_binary = "python3" ### 選項 -| Option | 預設 | 說明 | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `style` | `"bold red"` | 這個模組的風格。 | -| `disabled` | `false` | 停用 `ruby` 模組。 | +| Option | 預設 | 說明 | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `style` | `"bold red"` | 這個模組的風格。 | +| `disabled` | `false` | 停用 `ruby` 模組。 | ### Variables @@ -2051,12 +2052,12 @@ symbol = "🔺 " ### 選項 -| Option | 預設 | 說明 | -| ---------- | ---------------------------------- | ----------------------------------------------- | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `style` | `"bold red"` | 這個模組的風格。 | -| `disabled` | `false` | 停用 `rust` 模組。 | +| Option | 預設 | 說明 | +| ---------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `style` | `"bold red"` | 這個模組的風格。 | +| `disabled` | `false` | 停用 `rust` 模組。 | ### Variables @@ -2157,18 +2158,18 @@ The `status` module displays the exit code of the previous command. The module w ### 選項 -| Option | 預設 | 說明 | -| ----------------------- | -------------------------- | ---------------------------------------------------- | -| `format` | `[$symbol$status]($style)` | The format of the module | -| `symbol` | `"✖"` | The symbol displayed on program error | -| `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"` | 這個模組的風格。 | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `disabled` | `true` | Disables the `status` module. | +| Option | 預設 | 說明 | +| ----------------------- | ----------------------------- | ---------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | The format of the module | +| `symbol` | `"✖"` | The symbol displayed on program error | +| `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"` | 這個模組的風格。 | +| `recognize_signal_code` | `true` | Enable signal mapping from exit code | +| `map_symbol` | `false` | Enable symbols mapping from exit code | +| `disabled` | `true` | Disables the `status` module. | ### Variables @@ -2209,12 +2210,12 @@ The `swift` module shows the currently installed version of Swift. 這個模組 ### 選項 -| Option | 預設 | 說明 | -| ---------- | ---------------------------------- | ------------------------------------------------ | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `style` | `"bold 202"` | 這個模組的風格。 | -| `disabled` | `false` | Disables the `swift` module. | +| Option | 預設 | 說明 | +| ---------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `style` | `"bold 202"` | 這個模組的風格。 | +| `disabled` | `false` | Disables the `swift` module. | ### Variables @@ -2237,7 +2238,15 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected terraform workspace and version. By default the terraform version is not shown, since this is slow on 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-version). 這個模組在下列其中一個條件達成時顯示: +The `terraform` module shows the currently selected terraform workspace and version. + +::: 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-version). + +::: + +這個模組在下列其中一個條件達成時顯示: - The current directory contains a `.terraform` folder - Current directory contains a file with the `.tf` or `.hcl` extensions @@ -2284,7 +2293,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. +`time` 模組顯示目前的**當地**時間. `format` 設定值被 [`chrono`](https://crates.io/crates/chrono) crate 用來控制時間如何顯示。 請看 [chrono 的 strftime 文件](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)來了解有那些選項可以使用。 ::: tip @@ -2304,7 +2313,7 @@ The `time` module shows the current **local** time. The `format` configuration v | `disabled` | `true` | 停用 `time` 模組。 | | `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format | -If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it defaults to `"%T"`. Manually setting `time_format` will override the `use_12hr` setting. +If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. 不然的話,它會被預設為 `"%T"`。 Manually setting `time_format` will override the `use_12hr` setting. ### Variables @@ -2330,7 +2339,7 @@ time_range = "10:00:00-14:00:00" ## 使用者名稱 -The `username` module shows active user's username. 這個模組在下列其中一個條件達成時顯示: +`username` 模組顯示現在使用中的使用者名稱。 這個模組在下列其中一個條件達成時顯示: - 目前使用者為 root - 目前使用者並非登入時的使用者 @@ -2381,12 +2390,12 @@ The `zig` module shows the currently installed version of Zig. 這個模組在 ### 選項 -| Option | 預設 | 說明 | -| ---------- | ---------------------------------- | ----------------------------------------------------- | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | 這個模組的風格。 | -| `format` | `"via [$symbol$version]($style) "` | The format for the module. | -| `disabled` | `false` | Disables the `zig` module. | +| Option | 預設 | 說明 | +| ---------- | ------------------------------------ | ----------------------------------------------------- | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | 這個模組的風格。 | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables the `zig` module. | ### Variables @@ -2438,19 +2447,19 @@ The order in which custom modules are shown can be individually set by including ### 選項 -| Option | 預設 | 說明 | -| ------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `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`. | -| `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"` | 這個模組的風格。 | -| `format` | `"[$symbol$output]($style) "` | The format for the module. | -| `disabled` | `false` | Disables this `custom` module. | +| Option | 預設 | 說明 | +| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `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`. | +| `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"` | 這個模組的風格。 | +| `format` | `"[$symbol($output )]($style)"` | The format for the module. | +| `disabled` | `false` | Disables this `custom` module. | ### Variables diff --git a/docs/zh-TW/guide/README.md b/docs/zh-TW/guide/README.md index 1225d38dc..8a7897e2e 100644 --- a/docs/zh-TW/guide/README.md +++ b/docs/zh-TW/guide/README.md @@ -196,7 +196,7 @@ Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. - ```sh + ```powershell Invoke-Expression (&starship init powershell) ```