diff --git a/docs/ar-SA/README.md b/docs/ar-SA/README.md index 6b4bbaefa..ffc403eb1 100644 --- a/docs/ar-SA/README.md +++ b/docs/ar-SA/README.md @@ -3,17 +3,17 @@ home: true heroImage: /logo.svg heroText: tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell! -actionText: Get Started → +actionText: البدء مع Starship ← actionLink: ./guide/ features: - - title: Compatibility First - details: Works on the most common shells on the most common operating systems. Use it everywhere! + title: التوافق أولاً + details: يعمل على أكثر موجهات الأوامر شيوعاً في أكثر نظم التشغيل شيوعاً. استخدمه في كل مكان! - 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 + title: قابل للتخصيص 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 @@ -28,45 +28,45 @@ description: Starship is the minimal, blazing fast, and extremely customizable p -### Prerequisites +### المتطلبات الأساسية -- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal. +- تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في موجه الأوامر الخاصة بك. -### Quick Install +### تثبيت سريع -1. Install the **starship** binary: +1. تثبيت **starship**: - #### Install Latest Version + #### تثبيت أحدث إصدار - With Shell: + بإستخدام Shell: ```sh sh -c "$(curl -fsSL https://starship.rs/install.sh)" ``` - To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration. + لتحديث Starship نفسه، أعد تشغيل البرنامج النصي أعلاه. سيتم استبدال الإصدار الحالي بدون لمس تكوين Starship. - #### Install via Package Manager + #### التثبيت عبر مدير الحزم - With [Homebrew](https://brew.sh/): + بإستخدام [Homebrew](https://brew.sh/): ```sh brew install starship ``` - With [Scoop](https://scoop.sh): + بإستخدام [Scoop](https://scoop.sh): ```powershell scoop install starship ``` -1. Add the init script to your shell's config file: +1. أضف البرنامج النصي إلى ملف تهيئة موجه الأوامر: #### Bash - Add the following to the end of `~/.bashrc`: + أضف ما يلي إلى نهاية `~/.bashrc`: ```sh # ~/.bashrc @@ -77,7 +77,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Fish - Add the following to the end of `~/.config/fish/config.fish`: + أضف ما يلي إلى نهاية `~/.config/fish/config.fish`: ```sh # ~/.config/fish/config.fish @@ -88,7 +88,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Zsh - Add the following to the end of `~/.zshrc`: + أضف ما يلي إلى نهاية `~/.zshrc`: ```sh # ~/.zshrc @@ -108,7 +108,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Ion - Add the following to the end of `~/.config/ion/initrc`: + أضف ما يلي إلى نهاية `~/.config/ion/initrc`: ```sh # ~/.config/ion/initrc @@ -119,9 +119,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Elvish - ::: warning Only elvish v0.15 or higher is supported. ::: + ::: تحذير يدعم فقط elvish v0.15 أو أعلى. ::: - Add the following to the end of `~/.elvish/rc.elv`: + أضف ما يلي إلى نهاية `~/.elvish/rc.elv`: ```sh # ~/.elvish/rc.elv @@ -132,7 +132,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Tcsh - Add the following to the end of `~/.tcshrc`: + أضف ما يلي إلى نهاية `~/.tcshrc`: ```sh # ~/.tcshrc @@ -143,7 +143,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Nushell - ::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu. + ::: تحذير هذا سوف يتغير في المستقبل. فقط إصدار nu v0.33 أو أعلى مدعوم. ::: أضف ما يلي إلى ملف تكوين nu الخاص بك. يمكنك التحقق من موقع هذا الملف عن طريق تشغيل `config path` في nu. ```toml startup = [ @@ -157,7 +157,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Xonsh - Add the following to the end of `~/.xonshrc`: + أضف ما يلي إلى نهاية `~/.xonshrc`: ```sh # ~/.xonshrc diff --git a/docs/ar-SA/advanced-config/README.md b/docs/ar-SA/advanced-config/README.md index cabf9cdfc..cc5de9d73 100644 --- a/docs/ar-SA/advanced-config/README.md +++ b/docs/ar-SA/advanced-config/README.md @@ -2,7 +2,7 @@ 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. @@ -31,6 +31,18 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship eval $(starship init bash) ``` +## Custom pre-prompt and pre-execution Commands in PowerShell + +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +Create a function named `Invoke-Starship-PreCommand` + +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") +} +``` + ## 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`. @@ -68,6 +80,17 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. @@ -76,7 +99,7 @@ Note: The right prompt is a single line following the input location. To right a `right_format` is currently supported for the following shells: elvish, fish, zsh. -### Example +### مثال ```toml # ~/.config/starship.toml diff --git a/docs/ar-SA/config/README.md b/docs/ar-SA/config/README.md index 2fb31aa12..d5158be2d 100644 --- a/docs/ar-SA/config/README.md +++ b/docs/ar-SA/config/README.md @@ -77,7 +77,7 @@ The first part, which is enclosed in a `[]`, is a [format string](#format-string In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to 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. @@ -142,7 +142,7 @@ This is the list of prompt-wide configuration options. ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ----------------- | ------------------------------ | ---------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | | `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | @@ -151,7 +151,7 @@ This is the list of prompt-wide configuration options. | `add_newline` | `true` | Inserts blank line between shell prompts. | -### Example +### مثال ```toml # ~/.config/starship.toml @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -262,7 +263,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | -------------------------------------------------------------------- | ----------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\])]($style)'` | The format for the module. | | `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | @@ -273,7 +274,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | ---------------- | ------------------------------------------- | | region | `ap-northeast-1` | The current AWS region | | profile | `astronauts` | The current AWS profile | @@ -330,7 +331,7 @@ The `battery` module shows how charged the device's battery is and its current c ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | -------------------- | --------------------------------- | --------------------------------------------------- | | `full_symbol` | `" "` | The symbol shown when the battery is full. | | `charging_symbol` | `" "` | The symbol shown when the battery is charging. | @@ -368,7 +369,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r The `display` option is an array of the following table. -| Option | Default | Description | +| Option | الافتراضي | الوصف | | -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | The upper bound for the display option. | | `style` | `bold red` | The style used if the display option is in use. | @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -402,13 +403,13 @@ The character will tell you whether the last command was successful or not. It c By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). -::: warning +::: تحذير `error_symbol` is not supported on elvish and nu shell. ::: -::: warning +::: تحذير `vicmd_symbol` is only supported in fish and zsh. @@ -416,7 +417,7 @@ By default it only changes color. If you also want to change its shape take a lo ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ---------------- | ------------------- | -------------------------------------------------------------------------------- | | `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. | @@ -426,7 +427,7 @@ By default it only changes color. If you also want to change its shape take a lo ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | -------- | ------- | --------------------------------------------------------------------- | | symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | @@ -470,7 +471,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -483,7 +484,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | --------- | ------------------------------------ | | version | `v3.17.3` | The version of cmake | | symbol | | Mirrors the value of option `symbol` | @@ -500,7 +501,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | @@ -513,7 +514,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | ---------- | ------------------------------------ | | version | `v3.1.2.0` | The version of `cobol` | | symbol | | Mirrors the value of option `symbol` | @@ -535,7 +536,7 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | -------------------- | ----------------------------- | ---------------------------------------------------------- | | `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | | `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | @@ -553,7 +554,7 @@ Showing desktop notifications requires starship to be built with `rust-notify` s ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | --------------------------------------- | | duration | `16m40s` | The time it took to execute the command | | style\* | | Mirrors the value of option `style` | @@ -582,7 +583,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | @@ -593,7 +594,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | ----------- | ------------ | ------------------------------------ | | environment | `astronauts` | The current conda environment | | symbol | | Mirrors the value of option `symbol` | @@ -619,7 +620,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | @@ -632,7 +633,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | --------- | ------------------------------------ | | version | `v0.32.1` | The version of `crystal` | | symbol | | Mirrors the value of option `symbol` | @@ -659,7 +660,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -672,7 +673,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | ------------------------------------ | | version | `v2.8.4` | The version of `dart` | | symbol | | Mirrors the value of option `symbol` | @@ -696,7 +697,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -709,7 +710,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | ------------------------------------ | | version | `v1.8.3` | The version of `deno` | | symbol | | Mirrors the value of option `symbol` | @@ -734,7 +735,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | | `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | | `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | @@ -749,11 +750,11 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
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` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. | +| Advanced Option | الافتراضي | الوصف | +| --------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. | `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. @@ -769,7 +770,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | --------------------- | ----------------------------------- | | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Mirrors the value of option `style` | @@ -788,11 +789,11 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | | `format` | `"via [$symbol$context]($style) "` | The format for the module. | | `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | @@ -805,7 +806,7 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------------- | ------------------------------------ | | context | `test_context` | The current docker context | | symbol | | Mirrors the value of option `symbol` | @@ -845,7 +846,7 @@ The module will also show the Target Framework Moniker ( `symbol` is shown. - 2 jobs or more -> `symbol` + `number` are shown. -::: warning +::: تحذير This module is not supported on tcsh and nu. ::: -::: warning +::: تحذير The `threshold` option is deprecated, but if you want to use it, the module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running. @@ -1572,7 +1574,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------ | ----------------------------- | ------------------------------------------------------------------------ | | `threshold`\* | `1` | Show number of jobs if exceeded. | | `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | @@ -1587,7 +1589,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | ------- | ------------------------------------ | | number | `1` | The number of jobs | | symbol | | Mirrors the value of option `symbol` | @@ -1616,7 +1618,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -1629,7 +1631,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | ------------------------------------ | | version | `v1.4.0` | The version of `julia` | | symbol | | Mirrors the value of option `symbol` | @@ -1654,7 +1656,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -1668,7 +1670,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | --------- | ------------------------------------ | | version | `v1.4.21` | The version of `kotlin` | | symbol | | Mirrors the value of option `symbol` | @@ -1705,7 +1707,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | @@ -1715,7 +1717,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------------------- | ---------------------------------------- | | context | `starship-cluster` | The current kubernetes context | | namespace | `starship-namespace` | If set, the current kubernetes namespace | @@ -1765,9 +1767,9 @@ 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. | +| Option | الافتراضي | الوصف | +| ---------- | --------- | ------------------------------------------------------------------ | +| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | ### Example @@ -1788,7 +1790,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -1802,7 +1804,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | ------------------------------------ | | version | `v5.4.0` | The version of `lua` | | symbol | | Mirrors the value of option `symbol` | @@ -1833,7 +1835,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ----------- | ----------------------------------------------- | -------------------------------------------------------- | | `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | | `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. | @@ -1843,7 +1845,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | ---------------- | ------------- | ------------------------------------------------------------------ | | ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | | ram_pct | `48%` | The percentage of the current system memory. | @@ -1872,7 +1874,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | | `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. | @@ -1883,7 +1885,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | ------------------------------------ | | branch | `master` | The active mercurial branch | | symbol | | Mirrors the value of option `symbol` | @@ -1913,7 +1915,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -1926,7 +1928,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | ------------------------------------ | | version | `v1.2.0` | The version of `nimc` | | symbol | | Mirrors the value of option `symbol` | @@ -1950,7 +1952,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------ | ---------------------------------------------- | ----------------------------------------------------- | | `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | | `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | @@ -1961,7 +1963,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | ------- | ------------------------------------ | | state | `pure` | The state of the nix-shell | | name | `lorri` | The name of the nix-shell | @@ -1995,7 +1997,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -2009,7 +2011,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | ---------- | ------------------------------------ | | version | `v13.12.0` | The version of `node` | | symbol | | Mirrors the value of option `symbol` | @@ -2039,7 +2041,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -2054,7 +2056,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | ---------------- | ------------ | ----------------------------------------------------------------- | | version | `v4.10.0` | The version of `ocaml` | | switch_name | `my-project` | The active OPAM switch | @@ -2079,7 +2081,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ---------- | --------------------------------------------------- | -------------------------------------------------------------- | | `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. | | `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | @@ -2088,7 +2090,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | ------- | ------------------------------------ | | cloud | `corp` | The current OpenStack cloud | | project | `dev` | The current OpenStack project | @@ -2110,7 +2112,7 @@ 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`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2124,13 +2126,14 @@ The `package` module is shown when the current directory is the repository for a - [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present - [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present - [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present - [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` 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 | +| Option | الافتراضي | الوصف | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | | `format` | `"is [$symbol$version]($style) "` | The format for the module. | | `symbol` | `"📦 "` | The symbol used before displaying the version the package. | @@ -2141,7 +2144,7 @@ The `package` module is shown when the current directory is the repository for a ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | ------------------------------------ | | version | `v1.0.0` | The version of your package | | symbol | | Mirrors the value of option `symbol` | @@ -2170,7 +2173,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -2183,7 +2186,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | --------- | ------------------------------------ | | version | `v5.26.1` | The version of `perl` | | symbol | | Mirrors the value of option `symbol` | @@ -2208,7 +2211,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -2221,7 +2224,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | ------------------------------------ | | version | `v7.3.8` | The version of `php` | | symbol | | Mirrors the value of option `symbol` | @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### Options + +| Option | الافتراضي | الوصف | +| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | The style for the module. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variables + +| Variable | Example | الوصف | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| 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 Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: @@ -2247,7 +2307,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -2260,7 +2320,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | ------------------------------------ | | version | `0.13.5` | The version of `purescript` | | symbol | | Mirrors the value of option `symbol` | @@ -2297,7 +2357,7 @@ By default the module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -2321,7 +2381,7 @@ The default values and order for `python_binary` was chosen to first identify th ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | ------------ | --------------- | ------------------------------------------ | | version | `"v3.8.1"` | The version of `python` | | symbol | `"🐍 "` | Mirrors the value of option `symbol` | @@ -2380,7 +2440,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -2393,7 +2453,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | -------- | ------------- | ------------------------------------ | | version | `v4.0.5` | The version of `R` | | symbol | | Mirrors the value of option `symbol` | @@ -2416,7 +2476,7 @@ By default the `red` module shows the currently installed version of [Red](https ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -2429,7 +2489,7 @@ By default the `red` module shows the currently installed version of [Red](https ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | ------------------------------------ | | version | `v2.5.1` | The version of `red` | | symbol | | Mirrors the value of option `symbol` | @@ -2456,7 +2516,7 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -2469,7 +2529,7 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | ------------------------------------ | | version | `v2.5.1` | The version of `ruby` | | symbol | | Mirrors the value of option `symbol` | @@ -2495,7 +2555,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -2508,7 +2568,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | ----------------- | ------------------------------------ | | version | `v1.43.0-nightly` | The version of `rustc` | | symbol | | Mirrors the value of option `symbol` | @@ -2535,7 +2595,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | | `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -2548,7 +2608,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | ------------------------------------ | | version | `2.13.5` | The version of `scala` | | symbol | | Mirrors the value of option `symbol` | @@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | The format for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | الافتراضي | الوصف | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | The format for the module. | +| `style` | `"white bold"` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables -| Variable | Default | Description | -| --------- | ------- | ---------------------------------------------------------- | -| indicator | | Mirrors the value of `indicator` for currently used shell. | +| Variable | الافتراضي | الوصف | +| --------- | --------- | ---------------------------------------------------------- | +| indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: This variable can only be used as a part of a style string ### Examples @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2615,7 +2680,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ----------- | ---------------------------- | ------------------------------------------------------------- | | `threshold` | `2` | Display threshold. | | `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | @@ -2626,7 +2691,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | ------- | ------------------------------------ | | shlvl | `3` | The current value of `SHLVL` | | symbol | | Mirrors the value of option `symbol` | @@ -2651,7 +2716,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ---------- | -------------------------------- | ------------------------------------------------ | | `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | | `symbol` | `""` | A format string displayed before the image name. | @@ -2660,7 +2725,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | ------------ | ------------------------------------ | | env | `centos.img` | The current Singularity image | | symbol | | Mirrors the value of option `symbol` | @@ -2691,7 +2756,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- | | `format` | `"[$symbol$status]($style) "` | The format of the module | | `symbol` | `"✖"` | The symbol displayed on program error | @@ -2710,7 +2775,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | -------------- | ------- | ------------------------------------------------------------------------------------------- | | status | `127` | The exit code of the last command | | int | `127` | The exit code of the last command | @@ -2748,7 +2813,7 @@ By default the `swift` module shows the currently installed version of [Swift](h ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -2761,7 +2826,7 @@ By default the `swift` module shows the currently installed version of [Swift](h ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | ------------------------------------ | | version | `v5.2.4` | The version of `swift` | | symbol | | Mirrors the value of option `symbol` | @@ -2791,16 +2856,16 @@ By default the Terraform version is not shown, since this is slow for current ve By default 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 +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | | `style` | `"bold 105"` | The style for the module. | @@ -2808,7 +2873,7 @@ By default the module will be shown if any of the following conditions are met: ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | ---------- | ------------------------------------ | | version | `v0.12.24` | The version of `terraform` | | workspace | `default` | The current Terraform workspace | @@ -2849,7 +2914,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `format` | `"at [$time]($style) "` | The format string for the module. | | `use_12hr` | `false` | Enables 12 hour formatting | @@ -2863,7 +2928,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | ---------- | ----------------------------------- | | time | `13:08:10` | The current time. | | style\* | | Mirrors the value of option `style` | @@ -2900,7 +2965,7 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------- | ----------------------- | ------------------------------------- | | `style_root` | `"bold red"` | The style used when the user is root. | | `style_user` | `"bold yellow"` | The style used for non-root users. | @@ -2910,7 +2975,7 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | -------- | ------------ | ------------------------------------------------------------------------------------------- | | `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. | @@ -2936,7 +3001,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -2949,7 +3014,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | ---------------- | ------------------------------------ | | version | `Vagrant 2.2.10` | The version of `Vagrant` | | symbol | | Mirrors the value of option `symbol` | @@ -2974,7 +3039,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -2987,7 +3052,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | ------- | ------------------------------------ | | version | `v0.2` | The version of `v` | | symbol | | Mirrors the value of option `symbol` | @@ -3007,7 +3072,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ---------- | -------------------------------- | ------------------------------------------------------ | | `symbol` | | The symbol used before displaying the repository name. | | `style` | `"bold yellow"` | The style for the module. | @@ -3016,7 +3081,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | ------------------------------------------- | ------------------------------------ | | repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name | | symbol | | Mirrors the value of option `symbol` | @@ -3041,7 +3106,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -3054,7 +3119,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h ### Variables -| Variable | Example | Description | +| Variable | Example | الوصف | | --------- | -------- | ------------------------------------ | | version | `v0.6.0` | The version of `zig` | | symbol | | Mirrors the value of option `symbol` | @@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### Options -| Option | Default | Description | +| Option | الافتراضي | الوصف | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3120,7 +3193,7 @@ The order in which custom modules are shown can be individually set by including ### Variables -| Variable | Description | +| Variable | الوصف | | --------- | -------------------------------------- | | output | The output of shell command in `shell` | | symbol | Mirrors the value of option `symbol` | @@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/ar-SA/faq/README.md b/docs/ar-SA/faq/README.md index 2b3096c17..8422ee2e3 100644 --- a/docs/ar-SA/faq/README.md +++ b/docs/ar-SA/faq/README.md @@ -56,10 +56,36 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` +## Why do I see `Executing command "..." timed out.` warnings? + +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. + ## I see symbols I don't understand or expect, what do they mean? If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + ## 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: diff --git a/docs/ar-SA/guide/README.md b/docs/ar-SA/guide/README.md index b91ef6c44..cf25256e5 100644 --- a/docs/ar-SA/guide/README.md +++ b/docs/ar-SA/guide/README.md @@ -15,7 +15,7 @@ Crates.io version Chat on Discord Follow @StarshipPrompt on Twitter

- Website + الموقع · - Installation + التثبيت · - Configuration + الإعدادات

@@ -134,33 +134,33 @@ **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  ▶ +تصفّح مستندات Starship  ▶

-## 🚀 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)). +- تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في موجه الأوامر الخاصة بك (على سبيل المثال، جرب [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)). -### Getting Started +### البدء مع Starship **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: @@ -169,37 +169,37 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" ``` - To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration. + لتحديث Starship نفسه، أعد تشغيل البرنامج النصي أعلاه. سيتم استبدال الإصدار الحالي بدون لمس تكوين Starship. - **Note** - The defaults of the install script can be overridden see the built-in help. + **ملاحظة** - يمكن تجاوز الإعدادات الافتراضية لنص التثبيت لرؤية المساعدة المدمجة. ```sh sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help ``` - #### Install via Package Manager + #### التثبيت عبر مدير الحزم - ##### Example: [Homebrew](https://brew.sh/): + ##### بإستخدام [Homebrew](https://brew.sh/): ```sh brew install starship ``` - ##### With [Scoop](https://scoop.sh): + ##### بإستخدام [Scoop](https://scoop.sh): ```powershell scoop install starship ``` -2. Add the init script to your shell's config file: +2. أضف ما يلي إلى ملف تكوين موجه الأوامر الخاص بك: #### Bash - Add the following to the end of `~/.bashrc`: + أضف ما يلي إلى نهاية `~/.bashrc`: ```sh # ~/.bashrc @@ -210,7 +210,7 @@ #### Fish - Add the following to the end of `~/.config/fish/config.fish`: + أضف ما يلي إلى نهاية `~/.config/fish/config.fish`: ```sh # ~/.config/fish/config.fish @@ -221,7 +221,7 @@ #### Zsh - Add the following to the end of `~/.zshrc`: + أضف ما يلي إلى نهاية `~/.zshrc`: ```sh # ~/.zshrc @@ -241,7 +241,7 @@ #### Ion - Add the following to the end of `~/.config/ion/initrc`: + أضف ما يلي إلى نهاية `~/.config/ion/initrc`: ```sh # ~/.config/ion/initrc @@ -252,7 +252,7 @@ #### Elvish - **Warning** Only elvish v0.15 or higher is supported. Add the following to the end of `~/.elvish/rc.elv`: + **تحذير** يدعم فقط v0.15 أو أعلى. أضف ما يلي إلى نهاية `~/.elvish/rc.elv`: ```sh # ~/.elvish/rc.elv @@ -263,7 +263,7 @@ #### Tcsh - Add the following to the end of `~/.tcshrc`: + أضف ما يلي إلى نهاية `~/.tcshrc`: ```sh # ~/.tcshrc @@ -274,7 +274,7 @@ #### Xonsh - Add the following to the end of `~/.xonshrc`: + أضف ما يلي إلى نهاية `~/.xonshrc`: ```sh # ~/.xonshrc @@ -285,7 +285,7 @@ #### Nushell - **Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu. + **تحذير** هذا سوف يتغير في المستقبل. فقط إصدار nu v0.33 أو أعلى مدعوم. أضف ما يلي إلى ملف تكوين nu الخاص بك. يمكنك التحقق من موقع هذا الملف عن طريق تشغيل `config path` في nu. ```toml startup = [ @@ -296,43 +296,15 @@ prompt = "starship_prompt" ``` -## 🤝 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). +نبحث دائماً عن مساهمين من **جميع المستويات**! إذا كنت تتطلع إلى تسهيل طريقك إلى المشروع، جرب [إنشاء اول مشكلة](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/). +إذا كنت تتحدث بطلاقة بلغة غير إنجليزية، فإننا نقدر أي مساعدة للحفاظ على ترجمة المستندات وتحديثها بلغات أخرى. إذا كنت ترغب في المساعدة، يمكن المساهمة بالترجمة على [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. 👋 +إذا كنت مهتما بالمساهمة في starship، يرجى إلقاء نظرة على [دليل المساهمة](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) لدينا. أيضا، لا تتردد في أن تنضم لنا في [Discord](https://discord.gg/8Jzqu3T) وقُل مرحبا. 👋 -### 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. 🙏 @@ -347,6 +319,6 @@ Please check out these previous works that helped inspire the creation of starsh 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/ar-SA/installing/README.md b/docs/ar-SA/installing/README.md index 6bb768504..c0553eec8 100644 --- a/docs/ar-SA/installing/README.md +++ b/docs/ar-SA/installing/README.md @@ -1,4 +1,4 @@ -# 🚀 Advanced Installation +# 🚀 التثبيت المتقدم To install starship, you need to do two things: @@ -11,7 +11,7 @@ There are so many platforms out there that they didn't fit into the main README. ## [Chocolatey](https://chocolatey.org) -### Prerequisites +### المتطلبات الأساسية Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey. @@ -23,7 +23,7 @@ choco install starship ## [termux](https://termux.com) -### Prerequisites +### المتطلبات الأساسية ```sh pkg install getconf @@ -35,6 +35,16 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Installation + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) ### Getting the Binary diff --git a/docs/ar-SA/presets/README.md b/docs/ar-SA/presets/README.md index 61165f5b7..37db35b51 100644 --- a/docs/ar-SA/presets/README.md +++ b/docs/ar-SA/presets/README.md @@ -8,7 +8,7 @@ This preset doesn't change anything except for the symbols used for each module. ![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) @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### Configuration + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/ckb-IR/advanced-config/README.md b/docs/ckb-IR/advanced-config/README.md index 903a9edc2..b222faa29 100644 --- a/docs/ckb-IR/advanced-config/README.md +++ b/docs/ckb-IR/advanced-config/README.md @@ -1,16 +1,16 @@ # ڕێکخستنی پێشکەوتوو -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. +لەگەڵ ئەوەی Starship شێڵێکە بەکارهێنانی زۆرە، هەندێک جار دەسکاری کردنی `starship.toml` بەس نییە بۆ ئەوەی وای لێبکەی هەندێک شتی دیاریکراو ئەنجام بدات. ئەم پەڕەیە ووردەکاری زیاتر ئەدات لەسەر هەندێک لە شێوازە ڕێکخستنە پێشکەوتووترەکان کە لە Starshipـدا بەکارهاتووە. -::: warning +::: ئاگادارکردنەوە -The configurations in this section are subject to change in future releases of Starship. +ڕێکخستنەکانی ئەم بەشە شایەنی گۆڕانن لە وەشانەکانی داهاتووی Starshipدا. ::: -## Custom pre-prompt and pre-execution Commands in Bash +## فرمانە کڕیاڕخوازەکانی pre-prompt و pre-execution لە 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: +بەپێچەوانەی شێلەکانی دیکە Bash هیچ چوارچێوەیەکی فەرمی preexec/precmdـی نییە. لەبەر ئەوە، دابین کردنی قولابە تەواو کڕیارخوازکراوەکان ئاسان نییە لە `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 @@ -31,6 +31,18 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship eval $(starship init bash) ``` +## Custom pre-prompt and pre-execution Commands in PowerShell + +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +Create a function named `Invoke-Starship-PreCommand` + +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") +} +``` + ## 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`. @@ -68,6 +80,17 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. @@ -76,7 +99,7 @@ Note: The right prompt is a single line following the input location. To right a `right_format` is currently supported for the following shells: elvish, fish, zsh. -### Example +### نموونە ```toml # ~/.config/starship.toml @@ -99,15 +122,15 @@ Produces a prompt like the following: 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` - - `italic` - - `underline` - - `dimmed` - - `inverted` + - `تۆخ` + - `لار` + - `بنهێڵ` + - `کاڵ کراو` + - `پێچەوانە کراو` - `bg:` - `fg:` - `` - - `none` + - `هیچ` where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. diff --git a/docs/ckb-IR/config/README.md b/docs/ckb-IR/config/README.md index 2fb31aa12..ac1d82139 100644 --- a/docs/ckb-IR/config/README.md +++ b/docs/ckb-IR/config/README.md @@ -1,12 +1,12 @@ -# Configuration +# ڕێکخستن -To get started configuring starship, create the following file: `~/.config/starship.toml`. +بۆ دەسکردن بە ڕێکخستنی Starship، پەڕگەیەک دروست بکە بەم جۆرە: `~/.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: +هەموو ڕێکخستنەکان بۆ Starship ئەنجام ئەدرێن لەم پەڕگەی [TOML](https://github.com/toml-lang/toml)ـەدا: ```toml # Inserts a blank line between shell prompts @@ -59,17 +59,17 @@ By convention, most modules have a prefix of default terminal color (e.g. `via` 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. @@ -77,7 +77,7 @@ The first part, which is enclosed in a `[]`, is a [format string](#format-string In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used to 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. @@ -100,7 +100,7 @@ Note that what styling looks like will be controlled by your terminal emulator. 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` or empty string, otherwise `@` followed by the value of region. - `(some text)` will always show nothing since there are no variables wrapped in the braces. @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -402,13 +403,13 @@ The character will tell you whether the last command was successful or not. It c By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). -::: warning +::: ئاگادارکردنەوە `error_symbol` is not supported on elvish and nu shell. ::: -::: warning +::: ئاگادارکردنەوە `vicmd_symbol` is only supported in fish and zsh. @@ -788,7 +789,7 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### Options @@ -983,7 +984,7 @@ default = "unknown user" | Option | Default | Description | | ---------- | ------------------------------ | ---------------------------------------------------------------------------- | -| `symbol` | | The symbol used before displaying the variable value. | +| `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. | @@ -1065,10 +1066,11 @@ The `fill` module fills any extra space on the line with a symbol. If multiple ` ### Options -| Option | Default | Description | -| -------- | -------------- | --------------------------------- | -| `symbol` | `"."` | The symbol used to fill the line. | -| `style` | `"bold black"` | The style for the module. | +| Option | Default | Description | +| ---------- | -------------- | --------------------------------- | +| `symbol` | `"."` | The symbol used to fill the line. | +| `style` | `"bold black"` | The style for the module. | +| `disabled` | `false` | Disables the `fill` module | ### Example @@ -1558,13 +1560,13 @@ The default functionality is: - 1 job -> `symbol` is shown. - 2 jobs or more -> `symbol` + `number` are shown. -::: warning +::: ئاگادارکردنەوە This module is not supported on tcsh and nu. ::: -::: warning +::: ئاگادارکردنەوە The `threshold` option is deprecated, but if you want to use it, the module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running. @@ -2110,7 +2112,7 @@ 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`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a - [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present - [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present - [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present - [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present > ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### Options + +| Option | Default | Description | +| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | The style for the module. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| 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 Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: @@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | The format for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | The format for the module. | +| `style` | `"white bold"` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables | Variable | Default | Description | | --------- | ------- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: This variable can only be used as a part of a style string ### Examples @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve By default 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 +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### Options @@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met: | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | | `style` | `"bold 105"` | The style for the module. | @@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### Options | Option | Default | Description | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/ckb-IR/faq/README.md b/docs/ckb-IR/faq/README.md index ae66747e4..955e95572 100644 --- a/docs/ckb-IR/faq/README.md +++ b/docs/ckb-IR/faq/README.md @@ -56,10 +56,36 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` +## Why do I see `Executing command "..." timed out.` warnings? + +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. + ## I see symbols I don't understand or expect, what do they mean? If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + ## 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: diff --git a/docs/ckb-IR/guide/README.md b/docs/ckb-IR/guide/README.md index 9aaf119ad..70a47137d 100644 --- a/docs/ckb-IR/guide/README.md +++ b/docs/ckb-IR/guide/README.md @@ -83,7 +83,7 @@ >Português do Brasil   - -### بەژداریکەرە داراییەکان - -ببە بەژداریکەرێکی دارایی و یارمەتیمان بدە بەردەوامبین لە کۆمەڵگەکەماندا. [[بەژداربە](https://opencollective.com/starship/contribute)] - -#### تاکە کەسەکان - - - -#### ڕێکخراوەکان - -پشتگیری ئەم پڕۆژەیە بکە لەڕێی ڕێکخراوەکەتەوە. لۆگۆکەت لێرە دەردەکەوێ لەگەڵ بەستەرێک بۆ ماڵپەڕەکەت. [[بەژداربە](https://opencollective.com/starship/contribute)] - - - - - - - - - - - - ## 💭 ئیلهامبەخشەکان -تکایە ئەم کارە کۆنانە سەیربکەوە کە ئیلهامی دروستکردنی starship دا. 🙏 +Please check out these previous works that helped inspire the creation of starship. 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - یەکێ لە promptـەکانی ZSH بۆ ئاسمانەوانان. @@ -340,9 +312,9 @@


- ئایکۆنی مووشەکی Starship + Starship rocket icon

## 📝 مۆڵەتنامە -هەموو مافێکی پارێزراوە © 2019-ئێستا، [بەژداریکەرانی Starship](https://github.com/starship/starship/graphs/contributors).
ئەم پڕۆژەیە لە ژێر مۆڵەتنامەی [ISC](https://github.com/starship/starship/blob/master/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 index 77286b51f..b12cf29cf 100644 --- a/docs/ckb-IR/installing/README.md +++ b/docs/ckb-IR/installing/README.md @@ -35,6 +35,16 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Installation + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) ### Getting the Binary diff --git a/docs/ckb-IR/presets/README.md b/docs/ckb-IR/presets/README.md index 90e6b314d..3f7456aac 100644 --- a/docs/ckb-IR/presets/README.md +++ b/docs/ckb-IR/presets/README.md @@ -1,18 +1,18 @@ -# 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! 😊 +ئەمە کۆکراوەیەکە لەو پێش ڕێکخستنانەی کە لەلایەن کۆمەڵگاوە نێردراون بۆ Starship. ئەگەر پێش ڕێکخستنێکت هەیە بۆ هاوبەشکردن، تکایە [PRـێک بنێرە](https://github.com/starship/starship/edit/master/docs/presets/README.md) کە ئەم پەڕگەیە نوێبکاتەوە! 😊 -## Nerd Font Symbols +## هێماکانی Nerd Font -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! +ئەم پێش ڕێکخستنە هیچ شتێک ناگۆڕێت جگە لە هێماکان کە بەکارهاتوون بۆ هەر moduleـێک. ئەگەر ئیمۆجیەکان ئەو شتە نین تۆ حەزت لێیە، ئەمە ڕەنگە سەرنجت ڕاکێشێت! -![Screenshot of Nerd Font Symbols preset](/presets/nerd-font-symbols.png) +![ڕوونماوێنەیەکی پێش ڕێکخستنی هێماکانی فۆنتی Nerd](/presets/nerd-font-symbols.png) ### پێشمەرجەکان -- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font) +- [Nerd Font](https://www.nerdfonts.com/)ـێک دامەزرێنراوە و چالاککراوە لە تێرمیناڵەکەتدا (بۆ نموونە Fira Code Nerd Font بەکاردەهێنێ) -### Configuration +### ڕێکخستن ```toml [aws] @@ -88,19 +88,19 @@ symbol = " " symbol = "ﯣ " ``` -## Bracketed Segments +## پارچە کەوانەکراوەکان This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.). -Before: +پێشتر: -![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png) +![ڕوونماوێنەی ڕێکخستنی بنەڕەتی Starship](/presets/bracketed-segments-before.png) -After: +دواتر: -![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png) +![ڕوونماوێنەی پێشڕێکخستنی Bracketed Segments](/presets/bracketed-segments-after.png) -### Configuration +### ڕێکخستن ```toml [aws] @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -242,19 +245,19 @@ format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]' ``` -## Plain Text Symbols +## هێما نووسینەکییە ئاساییەکان -This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset! +ئەم پێش ڕێکخستنە هێماکان دەگۆڕێت بۆ نووسینی ئاسایی. ئەگەر تێرمیناڵ/فۆنتەکەت ناتوانێ NerdFonts/ئیمۆجییەکان دەربخات، لەوانەیە پیویست بکا ئەم پێش ڕێکخستنە بەکاربهێنیت! -Before (default setting with Fixedsys font): +پێشتر (ڕێکخستنی بنەڕەتی لەگەڵ فۆنتی Fixedsys): ![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png) -After (Plain Text Symbols): +دواتر (هێما نووسینەکییە ئاساییەکان): ![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png) -### Configuration +### ڕێکخستن ```toml [character] @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -369,13 +375,13 @@ symbol = "scala " symbol = "swift " ``` -## Hide Runtime Versions +## شاردنەوەی وەشانەکانی کاتی جێبەجێکردن -This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you! +ئەم پێش ڕێکخستنە وەشانی کاتی جێبەجێکردنی زمانەکان دەشارێتەوە. ئەگەر کاردەکەیت لەگەڵ containerو ژینگە خەیاڵییەکان، ئەمە بۆ تۆیە! ![Screenshot of Hide Runtime Versions preset](/presets/hide-runtime-versions.png) -### Configuration +### ڕێکخستن ```toml [cmake] @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## بێخەوش + +ئەم پێش ڕێکخستنە لاسایی شێواز و ڕەفتاری [Pure](https://github.com/sindresorhus/pure) دەکاتەوە. + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### ڕێکخستن + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/de-DE/README.md b/docs/de-DE/README.md index 7d44bcf09..da82348a6 100644 --- a/docs/de-DE/README.md +++ b/docs/de-DE/README.md @@ -143,7 +143,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P #### Nushell - ::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu. + ::: warning Dies wird sich in der Zukunft ändern. Es wird nur nu Version v0.33 oder höher unterstützt. ::: Füge Folgendes zu deiner nu Konfigurationsdatei hinzu. Du kannst den Speicherort dieser Datei überprüfen, indem du `config path` in nu ausführst. ```toml startup = [ @@ -157,7 +157,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P #### Xonsh - Add the following to the end of `~/.xonshrc`: + Füge folgendes an das Ende von `~/.xonshrc` hinzu: ```sh # ~/.xonshrc diff --git a/docs/de-DE/advanced-config/README.md b/docs/de-DE/advanced-config/README.md index 88daed46f..3bb20de31 100644 --- a/docs/de-DE/advanced-config/README.md +++ b/docs/de-DE/advanced-config/README.md @@ -21,7 +21,7 @@ function blastoff(){ 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/). Allerdings **muss** das DEBUG Signal *vor* der Initialisierung von Starship getrapped werden! Starship kann den Wert der DEBUG-trap speichern. Wenn der Wert der DEBUG-trap überschrieben wird nachdem Starship gestartet ist kann es zu Fehlern im Bezug auf die verwendete DEBUG-trap kommen. +- Um eine benutzerdefinierte Funktion direkt vor der Ausführung eines Befehls auszulösen, kann man den [`DEBUG` trap](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/) Mechanismus verwenden. Allerdings **muss** das DEBUG Signal *vor* der Initialisierung von Starship getrapped werden! Starship kann den Wert der DEBUG-trap speichern. Wenn der Wert der DEBUG-trap überschrieben wird nachdem Starship gestartet ist kann es zu Fehlern im Bezug auf die verwendete DEBUG-trap kommen. ```bash function blastoff(){ @@ -31,27 +31,39 @@ trap blastoff DEBUG # DEBUG-Trap *bevor* Starship läuft eval $(starship init bash) ``` -## Fenstertitel anpassen +## Custom pre-prompt and pre-execution Commands in PowerShell -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish ist standardmäßig so konfiguriert. Starship ändert standardmäßig den Fenstertitel nicht, aber es ist sehr einfach die Funktion zu `bash` oder `zsh` hinzuzufügen. +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Starship bietet daher die begrenzte Möglichkeit, eigene Funktionen in das prompt rendering Verfahren einzufügen: -Zuerst wird eine Funktion definiert um den Fenstertitel zu ändern ( für bash und zsh ist die Funktion identisch): +Create a function named `Invoke-Starship-PreCommand` -```bash -function set_win_title(){ - echo -ne "\033]0; DEIN_FENSTERTITEL_HIER \007" +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") } ``` -Sie können Variablen verwenden, um diesen Titel anzupassen (`$USER`, `$HOSTNAME`, `$PWD`). +## Change Window Title -Für `bash` muss die Funktion als "precmd starship"-Funktion gesetzt werden: +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" ``` -Füge dies in `Zsh` zum `precmd_functions`-Array hinzu: +In `zsh`, add this to the `precmd_functions` array: ```bash precmd_functions+=(set_win_title) @@ -59,7 +71,7 @@ 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. -Zum Beispiel, wenn sie ihr aktuelles Verzeichnis als Terminal Title anzeigen wollen, fügen Sie folgenden Code-Schnipsel zu ihrer `~/.bashrc` oder `~/.zshrc` hinzu: +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(){ @@ -68,6 +80,17 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. diff --git a/docs/de-DE/config/README.md b/docs/de-DE/config/README.md index 66620076d..b767810cf 100644 --- a/docs/de-DE/config/README.md +++ b/docs/de-DE/config/README.md @@ -6,42 +6,42 @@ Um mit der Konfiguration von Starship zu beginnen, musst du die folgende Datei e mkdir -p ~/.config && touch ~/.config/starship.toml ``` -Die gesamte Konfiguration von Starship wird über diese [TOML](https://github.com/toml-lang/toml)-Datei durchgeführt: +Die gesamte Konfiguration von Starship erfolgt in dieser [TOML](https://github.com/toml-lang/toml)-Datei: ```toml -# Inserts a blank line between shell prompts +# Füge eine Leerzeile zwischen den Eingabeaufforderungen ein add_newline = true -# Replace the "❯" symbol in the prompt with "➜" -[character] # The name of the module we are configuring is "character" -success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" +# Ersetze das "❯" Symbol der Eingabeaufforderung mit "➜" +[character] # Der Name des Moduls, welches wir konfigurieren ist "character" +success_symbol = "[➜](bold green)" # Das "succes_symbol" Segment wird zu "➜" eingestellt und ist "bold green" (fettgedrucktes grün) gefärbt -# Disable the package module, hiding it from the prompt completely +# Deaktiviere das "package" Modul, damit es aus der Eingabeaufforderung komplett verschwindet [package] disabled = true ``` -You can change default configuration file location with `STARSHIP_CONFIG` environment variable: +Du kannst die voreingestellte Konfigurations-Datei mit der `STARSHIP_CONFIG` Umgebungsvariable verändern: ```sh export STARSHIP_CONFIG=~/.starship/config.toml ``` -Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: +Äquivalent zur PowerShell (Windows) würdest du diese Zeile zu `$PROFILE` hinzufügen: ```powershell $ENV:STARSHIP_CONFIG = "$HOME\.starship\config.toml" ``` -### Logging +### Protokollierung -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: +Standardmäßig protokolliert Starship Warnungen und Fehler in einer Datei names `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, wobei der session key zu der Instanz deines Terminals korrespondiert. Das kann jedoch durch die Nutzung der `STARSHIP_CACHE` Umgebungsvariable verändert werden: ```sh export STARSHIP_CACHE=~/.starship/cache ``` -Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: +Äquivalent zur PowerShell (Windows) würdest du diese Zeile zu `$PROFILE` hinzufügen: ```powershell $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" @@ -49,49 +49,49 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ### Terminologie -**Module**: Eine Komponente in der Konsole, die auf kontextualisierte Informationen des OS basiert. For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project. +**Modul**: Eine Komponente in der Eingabeaufforderung, welche Informationen basierend auf Kontextinformationen deines Betriebssystems angibt. Beispielsweise zeigt das "nodejs" Module die Version von Node.js, welches derzeitig auf deinem Computer installiert ist, an, falls dein derzeitiger Ordner ein Node.js Projekt ist. -**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 Node.js. +**Variable**: Eine kleinere Unterkomponente, welche Information des Moduls enthält. Zum Beispiel enthält die Variable "version" im Modul "nodejs" die aktuelle Version von Node.js. -By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. +Die meisten Module haben einen Präfix der standardmäßigen terminal-Farbe (z.B. `via` in "nodejs") und ein Leerzeichen als Suffix. -### Format Strings +### Formatierte 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. +Formatierte Strings sind das Format, mit dem ein Modul all seine Variablen ausgibt. Die meisten Module haben den Eintrag `format`, welcher das anzeige-Format des Moduls konfiguriert. Du kannst Texte, Variablen und Textgruppen in einem formatierten string benutzen. #### Variable -A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`. +Eine Variable besteht aus dem `$` Symbol und dem Namen der Variable. Der Name der Variable darf nur Buchstaben, Nummern und `_` enthalten. -For example: +Hier sind ein paar Beispiele: -- `$version` is a format string with a variable named `version`. -- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`. -- `$git_branch $git_commit` has the two variables separated with a space. +- `$version` ist ein formatierter string mit dem Namen `version`. +- `$git_branch$git_commit` ist ein formatierter string mit zwei Variablen, nämlich `git_branch` und `git_commit`. +- `$git_branch $git_commit` hat die zwei Variablen mit einem Leerzeichen getrennt. -#### Text Group +#### Textgruppe -A text group is made up of two different parts. +Eine Textgruppe besteht aus zwei verschiedenen Teilen. -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. +Der erste Teil, welcher innerhalb eckiger Klammern `[]` ist, ist ein [formatierter string](#format-strings). Du kannst ihm Texte, Variablen oder sogar verschachtelte Textgruppen hinzufügen. -In the second part, which is enclosed in a `()`, is a [style string](#style-strings). Dies kann verwendet werden, um den ersten Teil zu gestalten. +Der zweite Teil ist innerhalb normaler Klammern `()` und ist ein[style string](#style-strings). Dies kann verwendet werden, um den ersten Teil zu gestalten. -For example: +Hier sind ein paar Beispiele: -- `[on](red bold)` will print a string `on` with bold text colored red. -- `[⌘ $version](bold green)` will print a symbol `⌘` followed by the content of variable `version`, with bold text colored green. -- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. +- `[on](red bold)` wird einen string `on` mit fettgedrucktem roten Text ausgeben. +- `[⌘ $version](bold green)` wird ein Symbol `⌘` gefolgt von dem Inhalt der Variable `version` mit fettgedrucktem grünen Text ausgeben. +- `[a [b](red) c](green)` wird `a b c` ausgeben, wobei `b` rot ist und `a` und `c` grün sind. #### Style-Strings -Die meisten Module in Starship lassen dich den Darstellungsstil verändern. Dies passiert meistens an einem bestimmten Eintrag (gewöhnlich `style` genannt), der einen String mit den Einstellungen darstellt. Es folgen ein paar Beispiele für solche Strings zusammen mit Beschreibungen was sie bewirken. Details zur vollen Syntax findest du im [Erweiterten Konfigurationshandbuch](/advanced-config/). +Die meisten Module in Starship lassen dich den Darstellungsstil verändern. Dies passiert meistens an einem bestimmten Eintrag (gewöhnlich `style` genannt), der einen String mit den Einstellungen darstellt. Es folgen ein paar Beispiele für solche Strings zusammen der mit Beschreibungen, was sie bewirken. Details zur vollen Syntax findest du im [Erweiterten Konfigurationshandbuch](/advanced-config/). -- `"fg:green bg:blue"` setzt grünen Text auf blauen Hintergrund -- `"bg:blue fg:bright-green"` setzt hell-grünen Text auf blauen Hintergrund -- `"bold fg:27"` setzt dicke Schrift auf [ANSI Farbe](https://i.stack.imgur.com/KTSQa.png) 27 +- `"fg:green bg:blue"` setzt grünen Text auf einem blauen Hintergrund +- `"bg:blue fg:bright-green"` setzt hell-grünen Text auf einen blauen Hintergrund +- `"bold fg:27"` setzt färbt fettgedruckten Text in die [ANSI Farbe](https://i.stack.imgur.com/KTSQa.png) 27 - `"underline bg:#bf5700"` setzt unterstrichenen Text auf einen orangenen Hintergrund -- `"bold italic fg:purple"` setzt dicke lila Kursivschrift +- `"bold italic fg:purple"` setzt lilane fett-kursive Schrift - `""` deaktiviert explizit jeden Stil Wie genau sich diese Konfiguration auswirkt liegt an deinem Terminal-Emulator. Einige Emulatoren zum Beispiel werden die Farben erhellen statt Text dick zu machen, und ein paar Farbthemen benutzen dieselben Werte für normale und helle Farben. Für kursiven Text muss dein Terminal Kursivschrift unterstützen. @@ -100,7 +100,7 @@ Wie genau sich diese Konfiguration auswirkt liegt an deinem Terminal-Emulator. E A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. -For example: +Hier sind ein paar Beispiele: - `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region. - `(some text)` will always show nothing since there are no variables wrapped in the braces. @@ -146,7 +146,7 @@ Dies ist eine Liste mit Prompt-weiten Konfigurationsoptionen. | ----------------- | ------------------------------ | ---------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configure the format of the prompt. | | `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | -| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | +| `scan_timeout` | `30` | Timeout für das Scannen von Dateien (in Millisekunden). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | @@ -156,16 +156,16 @@ Dies ist eine Liste mit Prompt-weiten Konfigurationsoptionen. ```toml # ~/.config/starship.toml -# Use custom format +# Verwende benutzerdefiniertes Format format = """ [┌───────────────────>](bold green) [│](bold green)$directory$rust$package [└─>](bold green) """ -# Wait 10 milliseconds for starship to check files under the current directory. +# Warte 10 Millisekunden damit Starship die Dateien im aktuellen Ordner überprüfen kann. scan_timeout = 10 -# Disable the blank line at the start of the prompt +# Deaktiviere die Leerzeile am Anfang der Eingabeaufforderung add_newline = false ``` @@ -176,7 +176,7 @@ The default `format` is used to define the format of the prompt, if empty or no ```toml format = "$all" -# Which is equivalent to +# Ist das gleiche wie format = """ $username\ $hostname\ @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -252,7 +253,7 @@ format="$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +Das `aws`-Modul zeigt das aktuelle AWS-Profil an. Dies basiert auf den Umgebungsvariablen: `AWS_REGION`, `AWS_DEFAULT_REGION`, `AWS_PROFILE` und der `~/.aws/config` Datei. This module also shows an expiration timer when using temporary credentials. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -262,30 +263,30 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL ### Optionen -| Option | Standardwert | Beschreibung | -| ------------------- | -------------------------------------------------------------------- | ----------------------------------------------------------------- | -| `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\])]($style)'` | The format for the module. | -| `symbol` | `"☁️ "` | Symbol das vor dem aktuellen AWS-Profil angezeigt wird. | -| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | -| `style` | `"bold yellow"` | Stil für dieses Modul. | -| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | -| `disabled` | `false` | Deaktiviert das `aws`-Modul. | +| Option | Standardwert | Beschreibung | +| ------------------- | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\])]($style)'` | Das Format für das Modul. | +| `symbol` | `"☁️ "` | Symbol das vor dem aktuellen AWS-Profil angezeigt wird. | +| `region_aliases` | | Tabelle der Regionaliasen, die zusätzlich zum AWS-Namen angezeigt werden sollen. | +| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `expiration_symbol` | `X` | Das Symbol, das angezeigt wird, wenn die temporären Anmeldeinformationen abgelaufen sind. | +| `disabled` | `false` | Deaktiviert das `aws`-Modul. | ### Variables -| Variable | Beispiel | Beschreibung | -| --------- | ---------------- | ------------------------------------------- | -| region | `ap-northeast-1` | The current AWS region | -| profile | `astronauts` | The current AWS profile | -| duration | `2h27m20s` | The temporary credentials validity duration | -| symbol | | Mirrors the value of option `symbol` | -| style\* | | Mirrors the value of option `style` | +| Variable | Beispiel | Beschreibung | +| --------- | ---------------- | ---------------------------------------------------- | +| region | `ap-northeast-1` | Die aktuelle AWS-Region | +| profile | `astronauts` | Das aktuelle AWS Profil | +| duration | `2h27m20s` | Gültigkeitsdauer der temporären Anmeldeinformationen | +| symbol | | Spiegelt den Wert der Option `symbol` | +| style\* | | Spiegelt den Wert der Option `style` | \*: This variable can only be used as a part of a style string -### Examples +### Beispiele -#### Display everything +#### Alles anzeigen ```toml # ~/.config/starship.toml @@ -299,7 +300,7 @@ ap-southeast-2 = "au" us-east-1 = "va" ``` -#### Display region +#### Region anzeigen ```toml # ~/.config/starship.toml @@ -313,7 +314,7 @@ ap-southeast-2 = "au" us-east-1 = "va" ``` -#### Display profile +#### Profil anzeigen ```toml # ~/.config/starship.toml @@ -326,7 +327,7 @@ symbol = "🅰 " ## Akkustand -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%. +Das `battery` Modul zeigt, wie hoch der Akku des Geräts geladen ist und den aktuellen Ladestatus. Das Modul ist nur sichtbar, wenn der Akku des Geräts unter 10% geladen ist. ### Optionen @@ -335,9 +336,9 @@ The `battery` module shows how charged the device's battery is and its current c | `full_symbol` | `" "` | Das Symbol das angezeigt wird wenn der Akku voll geladen ist. | | `charging_symbol` | `" "` | Das Symbol das angezeigt wird wenn der Akku aufgeladen wird. | | `discharging_symbol` | `" "` | Das Symbol, das angezeigt wird, wenn die Batterie entladen wird. | -| `unknown_symbol` | `" "` | 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. | +| `unknown_symbol` | `" "` | Das Symbol, das angezeigt wird, wenn der Batteriezustand unbekannt ist. | +| `empty_symbol` | `" "` | Das Symbol, das angezeigt wird, wenn die Batterie leer ist. | +| `format` | `"[$symbol$percentage]($style) "` | Das Format für das Modul. | | `display` | [link](#battery-display) | Stellt den Grenzwert ein ab dem der Ladezustand (das battery-Modul) angezeigt wird. | | `disabled` | `false` | Wenn der Wert auf `true` steht, wird das Akkustand-Modul deaktiviert. | @@ -354,7 +355,7 @@ discharging_symbol = "💀 " ### Anzeige des Akkustandes -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. Die Standardwerte sind folgende: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). Wenn `display` nicht angegeben ist. Die Standardwerte sind folgende: ```toml [[battery.display]] @@ -366,7 +367,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### Optionen -The `display` option is an array of the following table. +Die `display`-Option beinhaltet ein Array mit den folgenden Werten. | Option | Standardwert | Beschreibung | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -393,9 +394,9 @@ discharging_symbol = 💦 ## Zeichen -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +Das `character` Modul zeigt ein Zeichen ( meistens einen Pfeil "❯") vor der Texteingabe an. -The character will tell you whether the last command was successful or not. It can do this in two ways: +Das Zeichen zeigt an ob der letzte Befehl erfolgreich war, oder einen Fehler erzeugt hat. It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -430,7 +431,7 @@ By default it only changes color. If you also want to change its shape take a lo | -------- | -------- | --------------------------------------------------------------------- | | symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | -### Examples +### Beispiele #### With custom error shape @@ -472,7 +473,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | Option | Standardwert | Beschreibung | | ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"△ "` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this module | @@ -503,7 +504,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `"bold blue"` | Stil für dieses Modul. | | `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. | @@ -523,27 +524,27 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ## Befehlsdauer -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. +Das `cmd_duration` Modul zeigt an wie lange der letzte Befehl ausgeführt wurde. Das Modul wird nur angezeigt wenn der letzte Befehl länger als zwei Sekunden ausgeführt wurde. Mit der `min_time` Option kann die Zeit eingestellt werden ab der <0>cmd_duration angezeigt wird. -::: warning Do not hook the DEBUG trap in Bash +::: warning Nicht die DEBUG-trap in der Bash hooken -If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. +Ist `bash` die Konsole der Wahl, dann nicht die `DEBUG`-trap nach der Ausführung von `eval $(starship init $0)` hooken, andernfalls **wird** dieses Modul unweigerlich untergehen. ::: -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. +Bash Nutzer, die eine "preexec" ähnliche Funktion benötigen, können [rcaloras bash_preexec Framework](https://github.com/rcaloras/bash-preexec) verwenden. Definieren Sie einfach die Arrays `preexec_functions` und `precmd_functions` bevor sie `eval $(starship init $0)` ausführen, und fahren Sie dann wie gewohnt fort. ### Optionen -| Option | Standardwert | Beschreibung | -| -------------------- | ----------------------------- | ---------------------------------------------------------- | -| `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"` | Stil für dieses Modul. | -| `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). | +| Option | Standardwert | Beschreibung | +| -------------------- | ----------------------------- | ------------------------------------------------------------------ | +| `min_time` | `2_000` | Schwellwert für kleinste anzuzeigende Laufzeit (in Millisekunden). | +| `show_milliseconds` | `false` | Zeige Millisekunden zusätzlich zu Sekunden. | +| `format` | `"took [$duration]($style) "` | Das Format für das Modul. | +| `style` | `"bold yellow"` | Stil für dieses Modul. | +| `disabled` | `false` | Deaktiviert das `cmd_duration`-Modul. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | ::: tip @@ -576,20 +577,20 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e ::: tip -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +Hinweis: Dies unterdrückt nicht conda's eigenen Prompt-Modifikator, sie können jedoch conda mit `conda config --set changeps1 False` konfigurieren, um die Ausgabe von conda selbst auszuschalten. ::: ### Optionen -| Option | Standardwert | Beschreibung | -| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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"` | Stil für dieses Modul. | -| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | Disables the `conda` module. | +| Option | Standardwert | Beschreibung | +| ------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | Die Anzahl der Verzeichnisse, auf die der Verzeichnisspfad abgeschnitten werden soll, wenn die Umgebung über `conda erstellt wurde -p [path]`. `0` bedeutet keine Kürzung. Beachte auch die Beschreibung für das [`directory`](#directory) Modul. | +| `symbol` | `"🅒 "` | Symbol das vor dem Umgebungsnamen angezeigt wird. | +| `style` | `"bold green"` | Stil für dieses Modul. | +| `format` | `"via [$symbol$environment]($style) "` | Das Format für das Modul. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Deaktiviert das `conda`-Modul. | ### Variables @@ -614,7 +615,7 @@ format = "[$symbol$environment](dimmed green) " The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default the module will be shown if any of the following conditions are met: -- The current directory contains a `shard.yml` file +- Das aktuelle Verzeichnis enthält eine `shard.yml`-Datei - The current directory contains a `.cr` file ### Optionen @@ -622,7 +623,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `"bold red"` | Stil für dieses Modul. | | `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | @@ -655,13 +656,13 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d - The current directory contains a file with `.dart` extension - The current directory contains a `.dart_tool` directory -- The current directory contains a `pubspec.yaml`, `pubspec.yml` or `pubspec.lock` file +- Das aktuelle Verzeichnis enthält `pubspec.yaml`, `pubspec.yml` oder `pubspec.lock` ### Optionen | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"🎯 "` | A format string representing the symbol of Dart | | `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | @@ -698,7 +699,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d | Option | Standardwert | Beschreibung | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"🦕 "` | A format string representing the symbol of Deno | | `detect_extensions` | `[]` | Which extensions should trigger this module. | @@ -726,7 +727,7 @@ format = "via [🦕 $version](green bold) " ## Verzeichnis -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. +Das `directory` -Modul zeigt den Pfad zu Ihrem aktuellen Verzeichnis an, abgeschnitten auf drei übergeordnete Ordner. Your directory will also be truncated to the root of the git repo that you're currently in. 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. @@ -736,18 +737,18 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Option | Standardwert | Beschreibung | | ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | -| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | +| `truncation_length` | `3` | Die Anzahl der übergeordneten Ordner, die angezeigt werden. | | `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Das Format für das Modul. | | `style` | `"bold cyan"` | Stil für dieses Modul. | -| `disabled` | `false` | Disables the `directory` module. | +| `disabled` | `false` | Deaktiviert das `directory`-Modul. | | `read_only` | `"🔒"` | The symbol indicating current directory is read only. | | `read_only_style` | `"red"` | The style for the read only symbol. | | `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | | `home_symbol` | `"~"` | The symbol indicating home directory. |
-This module has a few advanced configuration options that control how the directory is displayed. +Dieses Modul hat einige erweiterte Konfigurationsoptionen, welche die Darstellung von Verzeichnissen steuern. | Advanced Option | Standardwert | Beschreibung | | --------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -788,13 +789,13 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### Optionen | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | The format for the module. | +| `format` | `"via [$symbol$context]($style) "` | Das Format für das Modul. | | `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | | `only_with_files` | `true` | Only show when there's a match | | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | @@ -847,15 +848,15 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$cluster" ``` -## Line Break +## Zeilenumbruch -The `line_break` module separates the prompt into two lines. +Das `line_break`-Modul unterteilt den Prompt in zwei Zeilen. ### Optionen -| Option | Standardwert | Beschreibung | -| ---------- | ------------ | ------------------------------------------------------------------ | -| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | +| Option | Standardwert | Beschreibung | +| ---------- | ------------ | ---------------------------------------------------------------------- | +| `disabled` | `false` | Deaktiviert das `line_break`-Modul, wodurch der Prompt einzeilig wird. | ### Beispiel @@ -1790,7 +1792,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | -------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | | `detect_extensions` | `["lua"]` | Which extensions should trigger this module. | @@ -1819,27 +1821,27 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o format = "via [🌕 $version](bold blue) " ``` -## Memory Usage +## Speicherauslastung -The `memory_usage` module shows current system memory and swap usage. +Das `memory_usage` Modul zeigt den aktuellen Systemspeicher und die swap-Nutzung an. -By default the swap usage is displayed if the total system swap is non-zero. +Standardmäßig wird die swap-Nutzung angezeigt, wenn der gesamte System-swap nicht Null ist. ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren. ::: ### Optionen -| Option | Standardwert | Beschreibung | -| ----------- | ----------------------------------------------- | -------------------------------------------------------- | -| `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"` | Stil für dieses Modul. | -| `disabled` | `true` | Disables the `memory_usage` module. | +| Option | Standardwert | Beschreibung | +| ----------- | ----------------------------------------------- | --------------------------------------------------------------------- | +| `threshold` | `75` | Speicherauslastung ausblenden, wenn sie unter diesem Prozentsatz ist. | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Das Format für das Modul. | +| `symbol` | `"🐏"` | Symbol das vor der Speicherauslastung angezeigt wird. | +| `style` | `"bold dimmed white"` | Stil für dieses Modul. | +| `disabled` | `true` | Deaktiviert das `memory_usage`-Modul. | ### Variables @@ -1876,7 +1878,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc | ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | | `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | | `style` | `"bold purple"` | Stil für dieses Modul. | -| `format` | `"on [$symbol$branch]($style) "` | The format for the module. | +| `format` | `"on [$symbol$branch]($style) "` | Das Format für das Modul. | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | | `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | | `disabled` | `true` | Disables the `hg_branch` module. | @@ -1906,7 +1908,7 @@ truncation_symbol = "" The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). By default the module will be shown if any of the following conditions are met: -- The current directory contains a `nim.cfg` file +- Das aktuelle Verzeichnis enthält eine `nim.cfg`-Datei - 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 @@ -1944,20 +1946,20 @@ style = "yellow" symbol = "🎣 " ``` -## Nix-shell +## Nix-Shell -The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. +The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. Das Modul wird angezeigt, wenn es sich in einer nix-Shell-Umgebung befindet. ### Optionen | Option | Standardwert | Beschreibung | | ------------ | ---------------------------------------------- | ----------------------------------------------------- | -| `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | Das Format für das Modul. | | `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | | `style` | `"bold blue"` | Stil für dieses Modul. | | `impure_msg` | `"impure"` | A format string shown when the shell is impure. | | `pure_msg` | `"pure"` | A format string shown when the shell is pure. | -| `disabled` | `false` | Disables the `nix_shell` module. | +| `disabled` | `false` | Deaktiviert das `nix_shell`-Modul. | ### Variables @@ -1986,10 +1988,10 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). By default the module will be shown if any of the following conditions are met: -- The current directory contains a `package.json` file +- Das aktuelle Verzeichnis enthält eine `package.json`-Datei - The current directory contains a `.node-version` file - The current directory contains a `.nvmrc` file -- The current directory contains a `node_modules` directory +- Das aktuelle Verzeichnis enthält ein `node_modules`-Verzeichnis - The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension - The current directory contains a file with the `.ts` extension @@ -1997,14 +1999,14 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `" "` | A format string representing the symbol of Node.js. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. | | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | | `style` | `"bold green"` | Stil für dieses Modul. | -| `disabled` | `false` | Disables the `nodejs` module. | +| `disabled` | `false` | Deaktiviert das `nodejs`-Modul. | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2081,7 +2083,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Option | Standardwert | Beschreibung | | ---------- | --------------------------------------------------- | -------------------------------------------------------------- | -| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. | +| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | Das Format für das Modul. | | `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | | `style` | `"bold yellow"` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `openstack` module. | @@ -2108,9 +2110,9 @@ style = "bold yellow" symbol = "☁️ " ``` -## Package Version +## Paketversion -The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. +Das `Package` Modul wird angezeigt, wenn das aktuelle Verzeichnis das Repository für ein Paket ist, und zeigt dessen aktuelle Version an. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a - [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present - [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present - [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present - [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present > ⚠️ Die angezeigte Version ist die des Pakets, dessen Quellcode im Verzeichnis liegt, nicht die des Paketmanagers. @@ -2132,12 +2135,12 @@ The `package` module is shown when the current directory is the repository for a | Option | Standardwert | Beschreibung | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `format` | `"is [$symbol$version]($style) "` | Das Format für das Modul. | +| `symbol` | `"📦 "` | Symbol das vor der Paketversion angezeigt wird. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `"bold 208"` | Stil für dieses Modul. | | `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | Disables the `package` module. | +| `disabled` | `false` | Deaktiviert das `package`-Modul. | ### Variables @@ -2202,7 +2205,7 @@ format = "via [🦪 $version]($style) " The `php` module shows the currently installed version of [PHP](https://www.php.net/). By default the module will be shown if any of the following conditions are met: -- The current directory contains a `composer.json` file +- Das aktuelle Verzeichnis enthält eine `composer.json`-Datei - The current directory contains a `.php-version` file - The current directory contains a `.php` extension @@ -2210,14 +2213,14 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `symbol` | `"🐘 "` | Symbol das vor der PHP-Version angezeigt wird. | | `detect_extensions` | `["php"]` | Which extensions should trigger this module. | | `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `style` | `"147 bold"` | Stil für dieses Modul. | -| `disabled` | `false` | Disables the `php` module. | +| `disabled` | `false` | Deaktiviert das `php`-Modul. | ### Variables @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### Optionen + +| Option | Standardwert | Beschreibung | +| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | Stil für dieses Modul. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variables + +| Variable | Beispiel | Beschreibung | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| 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 + +### Beispiel + +#### With Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: @@ -2249,7 +2309,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | | `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | @@ -2299,7 +2359,7 @@ By default the module will be shown if any of the following conditions are met: | Option | Standardwert | Beschreibung | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"🐍 "` | A format string representing the symbol of Python | | `style` | `"yellow bold"` | Stil für dieses Modul. | @@ -2382,7 +2442,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"📐"` | A format string representing the symbol of R. | | `style` | `"blue bold"` | Stil für dieses Modul. | @@ -2418,7 +2478,7 @@ By default the `red` module shows the currently installed version of [Red](https | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"🔺 "` | A format string representing the symbol of Red. | | `detect_extensions` | `["red"]` | Which extensions should trigger this module. | @@ -2458,7 +2518,7 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | | `detect_extensions` | `["rb"]` | Which extensions should trigger this module. | @@ -2497,7 +2557,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"🦀 "` | A format string representing the symbol of Rust | | `detect_extensions` | `["rs"]` | Which extensions should trigger this module. | @@ -2537,7 +2597,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | Option | Standardwert | Beschreibung | | ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | +| `format` | `"via [${symbol}(${version} )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | | `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | @@ -2571,33 +2631,37 @@ The `shell` module shows an indicator for currently used shell. ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren. ::: ### Optionen -| Option | Standardwert | Beschreibung | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | The format for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Standardwert | Beschreibung | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | Das Format für das Modul. | +| `style` | `"white bold"` | Stil für dieses Modul. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables | Variable | Standardwert | Beschreibung | | --------- | ------------ | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | -### Examples +\*: This variable can only be used as a part of a style string + +### Beispiele ```toml # ~/.config/starship.toml @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2618,7 +2683,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | Option | Standardwert | Beschreibung | | ----------- | ---------------------------- | ------------------------------------------------------------- | | `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. | +| `format` | `"[$symbol$shlvl]($style) "` | Das Format für das Modul. | | `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. | | `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. | | `style` | `"bold yellow"` | Stil für dieses Modul. | @@ -2653,7 +2718,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | Option | Standardwert | Beschreibung | | ---------- | -------------------------------- | ------------------------------------------------ | -| `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | +| `format` | `'[$symbol\[$env\]]($style) '` | Das Format für das Modul. | | `symbol` | `""` | A format string displayed before the image name. | | `style` | `"bold dimmed blue"` | Stil für dieses Modul. | | `disabled` | `false` | Disables the `singularity` module. | @@ -2683,7 +2748,7 @@ The `status` module displays the exit code of the previous command. The module w ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren. ::: @@ -2750,7 +2815,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"🐦 "` | A format string representing the symbol of Swift | | `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | @@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve By default 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 +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### Optionen @@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met: | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | | `style` | `"bold 105"` | Stil für dieses Modul. | @@ -2843,7 +2908,7 @@ The `time` module shows the current **local** time. The `format` configuration v ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `disabled` auf `false` um es zu aktivieren. ::: @@ -2904,7 +2969,7 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | ------------- | ----------------------- | ------------------------------------- | | `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. | +| `format` | `"[$user]($style) in "` | Das Format für das Modul. | | `show_always` | `false` | Always shows the `username` module. | | `disabled` | `false` | Disables the `username` module. | @@ -2938,7 +3003,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | @@ -2976,7 +3041,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla | Option | Standardwert | Beschreibung | | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"V "` | A format string representing the symbol of V | | `detect_extensions` | `["v"]` | Which extensions should trigger this module. | @@ -3011,7 +3076,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | ---------- | -------------------------------- | ------------------------------------------------------ | | `symbol` | | The symbol used before displaying the repository name. | | `style` | `"bold yellow"` | Stil für dieses Modul. | -| `format` | `"vcsh [$symbol$repo]($style) "` | The format for the module. | +| `format` | `"vcsh [$symbol$repo]($style) "` | Das Format für das Modul. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables @@ -3043,7 +3108,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Option | Standardwert | Beschreibung | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | | `style` | `"bold yellow"` | Stil für dieses Modul. | @@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### Optionen | Option | Standardwert | Beschreibung | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3114,7 +3187,7 @@ The order in which custom modules are shown can be individually set by including | `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. | +| `format` | `"[$symbol($output )]($style)"` | Das Format für das Modul. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | @@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/de-DE/faq/README.md b/docs/de-DE/faq/README.md index 2f9b06654..1e10c4ec0 100644 --- a/docs/de-DE/faq/README.md +++ b/docs/de-DE/faq/README.md @@ -21,7 +21,7 @@ Ja, beide können benutzt werden, um Module in der Prompt zu deaktivieren. Wenn - Disabling modules is more explicit than omitting them from the top level `format` - Mit der Aktualisierung von Starship werden neu erstellte Module an die Eingabezeile angefügt -## The docs say Starship is cross-shell. Why isn't my preferred shell supported? +## Die Dokumentation sagt, dass die Starship interkompatibel ist. Warum wird meine bevorzugte Shell nicht unterstützt? Starship ist auf so eine Weise gebaut, das die Unterstützung so gut wie jeder Shell möglch sein sollte. Die Starship Binärdatei läuft völlig unabhängig von der Shell, und sollte auf jeder benutzt werden können, die eine Anpassung des Stils erlaubt. @@ -56,15 +56,41 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` +## Why do I see `Executing command "..." timed out.` warnings? + +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. + ## I see symbols I don't understand or expect, what do they mean? If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + ## 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/). +- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. Wenn `LC_ALL` kein UTF-8-Wert ist, [müssen Sie ihn ändern](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/). @@ -79,18 +105,18 @@ The first line should produce a [snake emoji](https://emojipedia.org/snake/), wh 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) -## Wie deinstalliere ich Starship? +## 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. +1. Löschen Sie die Starship-Binary. If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. -Wenn Starship mit Hilfe des Installationsscripts installiert wurde, entfernt der folgende Befehl Starship: +If Starship was installed using the install script, the following command will delete the binary: ```sh -# Starship binary suchen und löschen +# Locate and delete the starship binary sh -c 'rm "$(which starship)"' ``` diff --git a/docs/de-DE/guide/README.md b/docs/de-DE/guide/README.md index 5a12f618b..b03c86c31 100644 --- a/docs/de-DE/guide/README.md +++ b/docs/de-DE/guide/README.md @@ -87,7 +87,7 @@ >Português do Brasil   Русский   Tiếng Việt   -**Der minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!** +**Der minimalistische, super schnelle und unendlich anpassbare Prompt für jede 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. +- **Schnell:** sie ist schnell – _sehr, sehr_ schnell! 🚀 +- **Konfigurierbar:** konfiguriere jedes Detail der Prompt. +- **Universal:** funktioniert mit jeder Shell, auf jedem Betriebssystem. +- **Intelligent:** zeigt relevante Informationen auf einen Blick. +- **Funktionsreich:** unterstützt alle deine Lieblingswerkzeuge. +- **Einfach:** schnell zu installieren – Betriebsbereit in nur wenigen Minuten.

-Explore the Starship docs  ▶ +Schau dir die Starship-Dokumentation an  ▶

@@ -171,7 +171,7 @@ Um Starship selbst zu aktualisieren, lasse das Skript oben nochmal laufen. Es wird die vorhandene Version ersetzen, ohne die Konfiguration von Starship zu berühren. - **Note** - The defaults of the install script can be overridden see the built-in help. + **Hinweis** - Die Standardwerte des Installationsskripts können überschrieben werden, sehen Sie die integrierte Hilfe. ```sh sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help @@ -181,7 +181,7 @@ #### Installation mithilfe eines Paket-Managers - ##### Beispiel: [Homebrew](https://brew.sh/): + ##### Mit [Homebrew](https://brew.sh/): ```sh brew install starship @@ -252,7 +252,7 @@ #### Elvish - **Warning** Only elvish v0.15 or higher is supported. Trage folgendes am Ende von `~/.config/fish/rc.elv` ein: + **Warnung** Nur elvish v0.15 oder höher wird unterstützt. Trage folgendes am Ende von `~/.config/fish/rc.elv` ein: ```sh # ~/.elvish/rc.elv @@ -274,7 +274,7 @@ #### Xonsh - Add the following to the end of `~/.xonshrc`: + Füge folgendes an das Ende von `~/.xonshrc` hinzu: ```sh # ~/.xonshrc @@ -285,7 +285,7 @@ #### Nushell - **Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu. + **Warnung** Dies wird sich in Zukunft ändern. Es wird nur nu Version v0.33 oder höher unterstützt. Füge folgendes zu deiner nu Konfigurationsdatei hinzu. Du kannst den Speicherort dieser Datei überprüfen, indem du `config path` in nu ausführst. ```toml startup = [ @@ -304,37 +304,9 @@ Wenn du eine andere Sprache flüssig sprichts, würden wir uns sehr freuen wenn Falls du an Starship mitwirken willst, wirf bitte einen Blick auf den [Leitfaden zum Mitwirken](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Schau auch gerne auf unserem [Discord-Server](https://discord.gg/8Jzqu3T) vorbei. 👋 -### Mitwirkenden - -Das Projekt existiert dank aller der, die Mitwirken. [[Mitmachen](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. - - -### Finanzielle Unterstützung - -Become a financial contributor and help us sustain our community. [[Mitmachen](https://opencollective.com/starship/contribute)] - -#### Individuals - - - -#### Organisationen - -Support this project with your organization. Your logo will show up here with a link to your website. [[Mitmachen](https://opencollective.com/starship/contribute)] - - - - - - - - - - - - ## 💭 Inspiriert durch -Bitte schaue dir diese früheren Projekte an, die dazu beigetragen haben, Starship zu kreieren. 🙏 +Please check out these previous works that helped inspire the creation of starship. 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Ein ZSH-Prompt für Astronauten. @@ -344,9 +316,9 @@ Bitte schaue dir diese früheren Projekte an, die dazu beigetragen haben, Starsh


- Starship Raketen-Symbol + Starship rocket icon

## 📝 Lizenz -Copyright © 2019-heute [Starship-Mitwirkende](https://github.com/starship/starship/graphs/contributors).
Dieses Projekt ist [ISC](https://github.com/starship/starship/blob/master/LICENSE) lizenziert. +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/de-DE/installing/README.md b/docs/de-DE/installing/README.md index 1ffd12014..5a0c5d21f 100644 --- a/docs/de-DE/installing/README.md +++ b/docs/de-DE/installing/README.md @@ -35,9 +35,19 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Installation + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) -### Das Binary holen +### Getting the Binary #### Imperativ @@ -47,7 +57,7 @@ nix-env -iA nixos.starship #### Deklarativ, Einzel-Benutzer, über [home-manager](https://github.com/nix-community/home-manager) -Aktivieren Sie das Modul `programs.starship` in Ihrer `home.nix`-Datei und fügen Sie Ihre Einstellungen hinzu +Enable the `programs.starship` module in your `home.nix` file, and add your settings ```nix { @@ -69,7 +79,7 @@ Aktivieren Sie das Modul `programs.starship` in Ihrer `home.nix`-Datei und füge } ``` -und führen Sie dann folgendes aus +then run ```sh home-manager switch @@ -77,7 +87,7 @@ home-manager switch #### Deklarativ, systemweit, mit NixOS -Fügen Sie `pkgs.starship` zu `environment.systemPackages` in Ihrer `configuration.nix` hinzu, und führen Sie folgendes aus +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch diff --git a/docs/de-DE/presets/README.md b/docs/de-DE/presets/README.md index c265f7df5..824fa19ec 100644 --- a/docs/de-DE/presets/README.md +++ b/docs/de-DE/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### Konfiguration + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/es-ES/advanced-config/README.md b/docs/es-ES/advanced-config/README.md index d40b72b79..b5dafca2f 100644 --- a/docs/es-ES/advanced-config/README.md +++ b/docs/es-ES/advanced-config/README.md @@ -31,6 +31,18 @@ trap blastoff DEBUG # Trampa DEBUG *antes* de la ejecución de Starship eval $(starship init bash) ``` +## Comandos pre-prompt y pre-ejecución personalizados en PowerShell + +Powershell no posee un framework oficial de preexec/precmd como la mayoría de los demás intérpretes de comandos. Debido a esto, es difícil proporcionar "hooks" totalmente personalizables en `Powershell`. Sin embargo, Starship te da la posibilidad de insertar de forma limitada tus propias funciones en el proceso de renderizado del prompt: + +Crea una función llamada `Invoke-Starship-PreCommand` + +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") +} +``` + ## Cambiar el Título de la Ventana Algunos intérpretes de comandos van a cambiar automáticamente el título de la ventana por ti (p. ej., para mostrar tu directorio actual). Fish incluso lo hace por defecto. Starship no hace esto, pero es bastante sencillo añadir esta funcionalidad a `Bash` o `zsh`. @@ -39,7 +51,7 @@ Primero, define una función para el cambio de título de la ventana (idéntico ```bash function set_win_title(){ - echo -ne "\033]0; TU_TÍTULO_DE_VENTANA_AQUÍ \007" + echo -ne "\033]0; TU_TITULO_DE_VENTANA_AQUI \007" } ``` @@ -68,9 +80,20 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` -## Gabilitar Prompt Derecho +También puede establecer una salida similar con PowerShell creando una función llamada `Invoke-Starship-PreCommand`. -Algunos intérpretes de órdenes soportan un prompt derecho que se renderiza en la misma línea que la entrada. Starship puede establecer el contenido del prompt correcto usando la opción `right_format`. Cualquier módulo que pueda ser usado en `format` también es soportado en `right_format`. La variable `$all` solo contendrá módulos no utilizados explícitamente en `format` o `right_format`. +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + +## Habilitar Prompt a la Derecha + +Algunos intérpretes de comandos soportan un prompt derecho que se renderiza en la misma línea que la entrada. Starship puede establecer el contenido del prompt derecho usando la opción `right_format`. Cualquier módulo que pueda ser usado en `format` también es soportado en `right_format`. La variable `$all` solo contendrá módulos no utilizados explícitamente en `format` o `right_format`. Nota: El prompt derecho es una sola línea siguiendo la ubicación de entrada. Para alinear módulos arriba de la línea de entrada en un prompt multi-línea, vea el [módulo fill](/config/#fill). diff --git a/docs/es-ES/config/README.md b/docs/es-ES/config/README.md index c1438aaaa..63c52da7f 100644 --- a/docs/es-ES/config/README.md +++ b/docs/es-ES/config/README.md @@ -176,7 +176,7 @@ La varieble `format` por defecto se utiliza para definir el formato del prompt, ```toml format = "$all" -# Which is equivalent to +# El cual es equivalente a format = """ $username\ $hostname\ @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -726,36 +727,36 @@ format = "via [🦕 $version](green bold) " ## 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. +El módulo `directory` muestra la ruta hasta el directorio actual, mostrando tres directorios padre como máximo. Tu directorio se truncará a la raíz del repositorio git en el que estés. -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. +Cuando usas el estilo fish de la opción pwd, en lugar de ocultar la ruta truncada, verás una versión acortada del nombre de cada directorio basada en el número que activa la opción. -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`. +Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repositorio y el valor de la opción es `1`. En ese caso, verás `~/D/N/nixpkgs/pkgs`, cuando antes hubiera sido `nixpkgs/pkgs`. ### Opciones -| Opción | Por defecto | Descripción | -| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | -| `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) "` | El formato del módulo. | -| `style` | `"bold cyan"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita el módulo `directory`. | -| `read_only` | `"🔒"` | El símbolo que indica 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. p. ej.: "…/" | -| `home_symbol` | `"~"` | El símbolo que indica el directorio de inicio. | +| Opción | Por defecto | Descripción | +| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------ | +| `truncation_length` | `3` | El número de directorios padre a los que se debe truncar el directorio actual. | +| `truncate_to_repo` | `true` | Trunca o no hasta la raíz del repositorio git en el que estés. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | El formato del módulo. | +| `style` | `"bold cyan"` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `directory`. | +| `read_only` | `"🔒"` | El símbolo que indica 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. p. ej.: "…/" | +| `home_symbol` | `"~"` | El símbolo que indica el directorio de inicio. |
Este módulo tiene algunas opciones avanzadas de configuración que controlan cómo se muestra el directorio. -| Opción avanzada | Por defecto | Descripción | -| --------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sustituciones` | | 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` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. | +| Opción avanzada | Por defecto | Descripción | +| --------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sustituciones` | | Una tabla de sustituciones que se deben hacer a la ruta. | +| `fish_style_pwd_dir_length` | `0` | El número de caracteres a usar al aplicar la lógica de ruta pwd de la shell de fish. | +| `use_logical_path` | `true` | Si `true` renderiza la ruta lógica originada desde el intérprete de comandos a través de `PWD` o `--logical-path`. Si `false` en su lugar renderiza la ruta física del sistema de archivos con enlaces simbólicos resueltos. | -`substitutions` 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. +`substitutions` permite definir reemplazos arbitrarios para cadenas literales que ocurren en la ruta, por ejemplo prefijos largos de red o directorios de desarrollo (p. ej. Java). Ten en cuenta que esto desactivará el estilo PWD de fish. ```toml [directory.substitutions] @@ -763,7 +764,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an "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`. +`fish_style_pwd_dir_length` interactúa con las opciones de truncamiento estándar de una manera que puede sorprenderse primero: si no es cero, los componentes de la ruta que normalmente se truncarían se muestran con esa cantidad de caracteres. Por ejemplo, la ruta `/built/this/city/on/rock/and/roll`, que normalmente se mostraría como `rock/and/roll`, se mostraría como `/b/t/c/o/rock/and/roll` con `fish_style_pwd_dir_length = 1`--los componentes de ruta que normalmente se eliminarían se muestran con un solo carácter. Para `fish_style_pwd_dir_length = 2`, sería `/bu/th/ci/on/rock/and/roll`.
@@ -788,20 +789,20 @@ truncation_symbol = "…/" ## Contexto de Docker -The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### Opciones -| Opción | Por defecto | Descripción | -| ------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | El formato del módulo. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `only_with_files` | `true` | Mostrar solo cuando haya una coincidencia | -| `detect_extensions` | `[]` | Qué extensiones deben activar este módulo (necesita `solly_with_files` para ser verdadero). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | -| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | El estilo del módulo. | -| `disabled` | `false` | Deshabilita 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. | +| `only_with_files` | `true` | Mostrar solo cuando haya una coincidencia | +| `detect_extensions` | `[]` | Qué extensiones deben activar este módulo (necesita `solly_with_files` para ser verdadero). | +| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Qué nombres de archivo deberían activar este módulo (necesita que `solly_with_files` sea verdadero, con un valor "true"). | +| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo (necesita que `solly_with_files` sea verdadero, con un valor "true"). | +| `style` | `"blue bold"` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `docker_context`. | ### Variables @@ -824,9 +825,9 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -El módulo `dotnet` muestra la versión relevante del [.NET Core SDK](https://dotnet.microsoft.com/) para el directorio actual. Si el SDK ha sido anclado en el directorio actual, se mostrará la versión fijada. Otherwise the module shows the latest installed version of the SDK. +El módulo `dotnet` muestra la versión relevante del [.NET Core SDK](https://dotnet.microsoft.com/) para el directorio actual. Si el SDK ha sido anclado en el directorio actual, se mostrará la versión fijada. De lo contrario, el módulo muestra la última versión instalada del SDK. -By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: +Por defecto, este módulo solo se mostrará en tu prompt cuando uno o más de de los siguientes archivos estén presentes en el directorio actual: - `global.json` - `project.json` @@ -837,11 +838,11 @@ By default this module will only be shown in your prompt when one or more of the - `*.fsproj` - `*.xproj` -You'll also need the .NET Core SDK installed in order to use it correctly. +También necesitará tener instalado .NET Core SDK para poder usarlo correctamente. -Internamente, este módulo utiliza su propio mecanismo para la detección de versiones. 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. +Internamente, este módulo utiliza su propio mecanismo para la detección de versiones. Normalmente es el doble de rápido que ejecutar `dotnet --version`, pero puede mostrar una versión incorrecta si tu proyecto .NET tiene un diseño de directorio inusual. Si la precisión es más importante que la velocidad, puede desactivar el mecanismo estableciendo `heuristic = false` en las opciones del módulo. -The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. +El módulo también mostrará el Target Framework Moniker ([https://docs.microsoft. om/es/dotnet/standard/frameworks#supported-target-framework-versions](https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions)) cuando exista un archivo csproj en el directorio actual. ### Opciones @@ -849,22 +850,22 @@ The module will also show the Target Framework Moniker ( Nothing is shown. -- 1 job -> `symbol` is shown. -- 2 jobs or more -> `symbol` + `number` are shown. +- 0 tareas -> Nada se muestra. +- 1 tarea -> `symbol` se muestra. +- 2 tareas o más -> `symbol` + `number` son mostrados. ::: aviso -This module is not supported on tcsh and nu. +Este módulo no está soportado por tcsh y nu. ::: ::: aviso -The `threshold` option is deprecated, but if you want to use it, the module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running. +La opción `threshold` está obsoleta, pero si deseas usarla, el módulo mostrará el número de tareas en ejecución si hay más de 1 tarea, o más que el valor de configuración `threshold`, si existe. Si `threshold` se establece en 0, entonces el módulo también se mostrará cuando haya 0 tareas en ejecución. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ------------------ | ----------------------------- | ------------------------------------------------------------------------ | -| `threshold`\* | `1` | Show number of jobs if exceeded. | -| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | -| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | -| `format` | `"[$symbol$number]($style) "` | El formato del módulo. | -| `symbol` | `"✦"` | The string used to represent the `symbol` variable. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `jobs` module. | - \*: This option is deprecated, please use the +| Opción | Por defecto | Descripción | +| ------------------ | ----------------------------- | ---------------------------------------------------------------------------------- | +| `threshold`\* | `1` | Muestra el número de tareas si se exceden. | +| `symbol_threshold` | `1` | Muestra `symbol` si el conteo de tareas es al menos `symbol_threshold`. | +| `number_threshold` | `2` | Muestra el número de tareas si el conteo de tareas es al menos `symbol_threshold`. | +| `format` | `"[$symbol$number]($style) "` | El formato del módulo. | +| `symbol` | `"✦"` | La cadena utilizada para representar la variable `symbol`. | +| `style` | `"bold blue"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `jobs`. | + \*: Esta opción está desaprobada, por favor utiliza las opciones -`number_threshold` and `symbol_threshold` options instead. +`number_threshold` y `symbol_threshold` en su lugar. ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| número | `1` | The number of jobs | +| número | `1` | El número de tareas | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1608,11 +1610,11 @@ symbol_threshold = 0 ## Julia -The `julia` module shows the currently installed version of [Julia](https://julialang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `julia` muestra la versión instalada de [Julia](https://julialang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The 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 +- El directorio actual contiene un archivo `Project.toml` +- El directorio actual contiene un archivo `Manifest.toml` +- El directorio actual contiene un archivo con la extensión `.jl` ### Opciones @@ -1623,15 +1625,15 @@ The `julia` module shows the currently installed version of [Julia](https://juli | `detect_extensions` | `["jl"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["Project.toml", "Manifest.toml"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | +| `symbol` | `"ஃ "` | Una cadena de formato que representa el símbolo de Julia. | | `style` | `"bold purple"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `julia` module. | +| `disabled` | `false` | Desactiva el módulo `julia`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v1.4.0` | The version of `julia` | +| version | `v1.4.0` | La versión de `julia` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1648,7 +1650,7 @@ symbol = "∴ " ## Kotlin -The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `kotlin` muestra la versión instalada de [Kotlin](https://kotlinlang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: - El directorio actual contiene un archivo `.kt` o un `.kts` @@ -1661,10 +1663,10 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko | `detect_extensions` | `["kt", "kts"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. | -| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | +| `symbol` | `"🅺 "` | Una cadena de formato que representa el símbolo de 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. | +| `kotlin_binary` | `"kotlin"` | Configura el binario kotlin que Starship ejecuta al obtener la versión. | +| `disabled` | `false` | Deshabilita el módulo `kotlin`. | ### Variables @@ -1689,38 +1691,38 @@ 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" ``` ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Muestra el nombre actual del [contexto de Kubernetes](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) y, si se establece, el espacio de nombres del archivo kubeconfig. El espacio de nombres necesita establecerse en el archivo kubeconfig, esto puede hacerse mediante `kubectl config set-context starship-cluster --namespace astronaut`. Si se establece la variable de entorno `$KUBECONFIG`, el módulo usará eso si no usará el `~/.kube/config`. ::: consejo -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | -| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | -| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | El formato del módulo. | -| `style` | `"cyan bold"` | El estilo del módulo. | -| `context_aliases` | | Table of context aliases to display. | -| `disabled` | `true` | Disables the `kubernetes` module. | +| Opción | Por defecto | Descripción | +| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------------- | +| `symbol` | `"☸ "` | Una cadena de formato que representa el símbolo mostrado antes del Cluster. | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | El formato del módulo. | +| `style` | `"cyan bold"` | El estilo del módulo. | +| `context_aliases` | | Tabla de alias de contexto a mostrar. | +| `disabled` | `true` | Desactiva el módulo `kubernetes`. | ### Variables -| Variable | Ejemplo | Descripción | -| --------- | -------------------- | ---------------------------------------- | -| context | `starship-cluster` | The current kubernetes context | -| namespace | `starship-namespace` | If set, the current kubernetes namespace | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | -------------------- | ----------------------------------------------------------- | +| context | `starship-cluster` | El contexto actual de kubernetes | +| namespace | `starship-namespace` | Si se establece, el espacio de nombres actual de kubernetes | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | \*: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -1738,36 +1740,36 @@ disabled = false "gke_.*_(?P[\\w-]+)" = "gke-$cluster" ``` -#### Regex Matching +#### Busqueda por Regex -Additional to simple aliasing, `context_aliases` also supports extended matching and renaming using regular expressions. +Adicional al alias simple, `context_aliases` también soporta coincidencias extendidas y renombradas usando expresiones regulares. -The regular expression must match on the entire kube context, capture groups can be referenced using `$name` and `$N` in the replacement. This is more explained in the [regex crate](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace) documentation. +La expresión regular debe coincidir en todo el contexto de kube. los grupos de captura pueden ser referenciados usando `$name` y `$N` en el reemplazo. Esto está más explicado en la documentación del [crate regex](https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.replace). -Long and automatically generated cluster names can be identified and shortened using regular expressions: +Los nombres de cluster generados de forma larga y automática pueden ser identificados y abreviados usando expresiones regulares: ```toml [kubernetes.context_aliases] -# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: +# los contextos de OpenShift llevan el espacio de nombres y el usuario en el contexto de kube: `namespace/name/user`: ".*/openshift-cluster/.*" = "openshift" # Or better, to rename every OpenShift cluster at once: ".*/(?P[\\w-]+)/.*" = "$cluster" -# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. -# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) -# and renames every matching kube context into a more readable format (`gke-cluster-name`): +# Los contextos de GKE, AWS y otros proveedores de nube normalmente llevan información adicional, como la región/zona. +# La siguiente entrada coincide con el formato GKE (`gke_projectname_zone_cluster-name`) +# y renombra cada contexto de kube coincidente a un formato más legible (`gke-cluster-name`): "gke_.*_(?P[\\w-]+)" = "gke-$cluster" ``` -## Line Break +## Salto de línea -The `line_break` module separates the prompt into two lines. +El módulo `line_break` separa el indicador en dos líneas. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | ----------- | ------------------------------------------------------------------ | -| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | +| Opción | Por defecto | Descripción | +| ---------- | ----------- | ------------------------------------------------------------------------------- | +| `disabled` | `false` | Deshabilita el módulo `line_break`, haciendo que el mensaje sea una sola línea. | ### Ejemplo @@ -1780,11 +1782,11 @@ disabled = true ## Lua -The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `lua` muestra la versión instalada de [Lua](http://www.lua.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The current directory contains a `.lua-version` file -- The current directory contains a `lua` directory -- The current directory contains a file with the `.lua` extension +- El directorio actual contiene un archivo `.lua-version` +- El directorio actual contiene un directorio `lua` +- El directorio actual contiene un archivo con la extensión `.lua` ### Opciones @@ -1792,19 +1794,19 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | +| `symbol` | `"🌙 "` | Una cadena de formato que representa el símbolo de Lua. | | `detect_extensions` | `["lua"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[".lua-version"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `["lua"]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold blue"` | El estilo del módulo. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | -| `disabled` | `false` | Disables the `lua` module. | +| `lua_binary` | `"lua"` | Configura el binario de lua que Starship ejecuta al obtener la versión. | +| `disabled` | `false` | Desactiva el módulo `lua`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v5.4.0` | The version of `lua` | +| version | `v5.4.0` | La versión de `lua` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1819,40 +1821,40 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o format = "via [🌕 $version](bold blue) " ``` -## Memory Usage +## Memoria utilizada -The `memory_usage` module shows current system memory and swap usage. +El módulo `memory_usage` muestra la memoria del sistema actual y el uso de memoria de intercambio. -By default the swap usage is displayed if the total system swap is non-zero. +Por defecto, el uso de swap se muestra si el intercambio total del sistema no es cero. ::: consejo -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ----------- | ----------------------------------------------- | -------------------------------------------------------- | -| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | El formato del módulo. | -| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | -| `style` | `"bold dimmed white"` | El estilo del módulo. | -| `disabled` | `true` | Disables the `memory_usage` module. | +| Opción | Por defecto | Descripción | +| ----------- | ----------------------------------------------- | ------------------------------------------------------------- | +| `threshold` | `75` | Ocultar el uso de memoria a menos que supere este porcentaje. | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | El formato del módulo. | +| `symbol` | `"🐏"` | El símbolo usado antes de mostrar el uso de memoria. | +| `style` | `"bold dimmed white"` | El estilo del módulo. | +| `disabled` | `true` | Desactiva el módulo `memory_usage`. | ### Variables -| Variable | Ejemplo | Descripción | -| ---------------- | ------------- | ------------------------------------------------------------------ | -| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | -| ram_pct | `48%` | The percentage of the current system memory. | -| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. | -| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. | -| symbol | `🐏` | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| ---------------- | ------------- | ---------------------------------------------------------------------------------- | +| ram | `31GiB/65GiB` | La memoria RAM usada/total del sistema actual. | +| ram_pct | `48%` | El porcentaje de la memoria actual del sistema. | +| swap\*\* | `1GiB/4GiB` | El tamaño de la memoria de intercambio del archivo de memoria del sistema actual. | +| swap_pct\*\* | `77%` | El porcentaje de memoria de intercambio del archivo de memoria del sistema actual. | +| symbol | `🐏` | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | -\*: 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 +\*: Esta variable sólo puede utilizarse como parte de una cadena de estilo \*\*: La información del archivo SWAP sólo se muestra si se detecta en el sistema actual ### Ejemplo @@ -1868,18 +1870,18 @@ style = "bold dimmed green" ## Mercurial Branch -The `hg_branch` module shows the active branch of the repo in your current directory. +El módulo `hg_branch` muestra la rama activa del repositorio en su directorio actual. ### Opciones -| Opción | Por defecto | Descripción | -| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | -| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | -| `style` | `"bold purple"` | El estilo del módulo. | -| `format` | `"on [$symbol$branch]($style) "` | El formato del módulo. | -| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | -| `disabled` | `true` | Deshabilita el módulo `hg_branch`. | +| Opción | Por defecto | Descripción | +| ------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | El símbolo usado antes del marcador hg o nombre de la rama del repositorio en su directorio actual. | +| `style` | `"bold purple"` | El estilo del módulo. | +| `format` | `"on [$symbol$branch]($style) "` | El formato del módulo. | +| `truncation_length` | `2^63 - 1` | Trunca el nombre de la rama hg a `N` grafemas | +| `truncation_symbol` | `"…"` | El símbolo usado para indicar que un nombre de rama fue truncado. | +| `disabled` | `true` | Deshabilita el módulo `hg_branch`. | ### Variables @@ -1904,12 +1906,12 @@ truncation_symbol = "" ## Nim -The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `nim` muestra la versión instalada de [Nim](https://nim-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The 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 +- El directorio actual contiene un archivo `nim.cfg` +- El directorio actual contiene un archivo con la extensión `.nim` +- El directorio actual contiene un archivo con la extensión `.nims` +- El directorio actual contiene un archivo con la extensión `.nimble` ### Opciones @@ -1917,12 +1919,12 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | El formato del módulo | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | +| `symbol` | `"👑 "` | El símbolo usado antes de mostrar la versión de Nim. | | `detect_extensions` | `["nim", "nims", "nimble"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["nim.cfg"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `nim` module. | +| `disabled` | `false` | Desactiva el módulo `nim`. | ### Variables @@ -1946,25 +1948,25 @@ symbol = "🎣 " ## Nix-shell -The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. +El módulo `nix_shell` muestra el entorno [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html). El módulo se mostrará dentro de un entorno nix-shell. ### Opciones -| Opción | Por defecto | Descripción | -| ------------ | ---------------------------------------------- | ----------------------------------------------------- | -| `format` | `'via [$symbol$state( \($name\))]($style) '` | El formato del módulo. | -| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | -| `style` | `"bold blue"` | El estilo del módulo. | -| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | -| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | -| `disabled` | `false` | Disables the `nix_shell` module. | +| Opción | Por defecto | Descripción | +| ------------ | ---------------------------------------------- | -------------------------------------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | El formato del módulo. | +| `symbol` | `"❄️ "` | Una cadena de formato que representa el símbolo de nix-shell. | +| `style` | `"bold blue"` | El estilo del módulo. | +| `impure_msg` | `"impure"` | Una cadena de formato que se muestra cuando el intérprete de comandos es impuro. | +| `pure_msg` | `"pure"` | Una cadena de formato que se muestra cuando el intérprete de comandos es puro. | +| `disabled` | `false` | Desactiva el módulo `nix_shell`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| state | `pure` | The state of the nix-shell | -| name | `lorri` | The name of the nix-shell | +| state | `pure` | El estado de nix-shell | +| name | `lorri` | El nombre de nix-shell | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -1984,28 +1986,28 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' ## Node.js -The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `nodejs` muestra la versión instalada de [Node.js](https://nodejs.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The current directory contains a `package.json` file -- The current directory contains a `.node-version` file -- The current directory contains a `.nvmrc` 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 +- El directorio actual contiene un archivo `package.json` +- El directorio actual contiene un archivo `.node-version` +- El directorio actual contiene un archivo `.nvmrc` +- El directorio actual contiene un directorio `node_modules` +- El directorio actual contiene un archivo con la extensión `.js`, `.mjs` o `.cjs` +- El directorio actual contiene un archivo con la extensión `.ts` ### Opciones -| Opción | Por defecto | Descripción | -| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | -| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | -| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `["package.json", ".node-version"]` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `["node_modules"]` | Qué carpetas deberían activar este módulo. | -| `style` | `"bold green"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `nodejs` module. | -| `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | +| Opción | Por defecto | Descripción | +| ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | +| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | Una cadena de formato que representa el símbolo de Node.js. | +| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `["package.json", ".node-version"]` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `["node_modules"]` | Qué carpetas deberían activar este módulo. | +| `style` | `"bold green"` | El estilo del módulo. | +| `disabled` | `false` | Desactiva el módulo `nodejs`. | +| `not_capable_style` | `bold red` | El estilo para el módulo cuando una propiedad de motores en package.json no coincide con la versión de Node.js. | ### Variables @@ -2028,39 +2030,39 @@ format = "via [🤖 $version](bold green) " ## OCamlz -The `ocaml` module shows the currently installed version of [OCaml](https://ocaml.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `ocaml` muestra la versión instalada de [OCaml](https://ocaml.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The 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 +- El directorio actual contiene un archivo con extensión `.opam` o directorio `_opam` +- El directorio actual contiene un directorio `esy.lock` +- El directorio actual contiene un archivo `dune` o `dune-project` +- El directorio actual contiene un archivo `jbuild` o `jbuild-ignore` +- El directorio actual contiene un archivo `.merlin` +- El directorio actual contiene un archivo con la extensión `.ml`, `.mli`, `.re` o `.rei` ### Opciones | Opción | Por defecto | Descripción | | ------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | +| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | La cadena de formato para el módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | +| `symbol` | `"🐫 "` | El símbolo usado antes de mostrar la versión de OCaml. | +| `global_switch_indicator` | `""` | La cadena de formato usada para representar el interruptor global de OPAM. | +| `local_switch_indicator` | `"*"` | La cadena de formato usada para representar el interruptor local de OPAM. | | `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `["_opam", "esy.lock"]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `ocaml` module. | +| `disabled` | `false` | Desactiva el módulo `ocaml`. | ### Variables -| Variable | Ejemplo | Descripción | -| ---------------- | ------------ | ----------------------------------------------------------------- | -| version | `v4.10.0` | La versión de `ocaml` | -| switch_name | `my-project` | The active OPAM switch | -| switch_indicator | | Mirrors the value of `indicator` for currently active OPAM switch | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| ---------------- | ------------ | --------------------------------------------------------------------------- | +| version | `v4.10.0` | La versión de `ocaml` | +| switch_name | `my-project` | El interruptor OPAM activo | +| switch_indicator | | Refleja el valor de `indicator` para el interruptor OPAM activo actualmente | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | \*: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -2075,23 +2077,23 @@ 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. +El módulo `openstack` muestra la nube OpenStack actual y el proyecto. El módulo solo está activo cuando la variable env `OS_CLOUD` está definida en cuyo caso leerá el archivo `nubes. aml` desde cualquiera de las [ubicaciones por defecto](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files) para obtener el proyecto actual en uso. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | --------------------------------------------------- | -------------------------------------------------------------- | -| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | El formato del módulo. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `openstack` module. | +| Opción | Por defecto | Descripción | +| ---------- | --------------------------------------------------- | ----------------------------------------------------------- | +| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | El formato del módulo. | +| `symbol` | `"☁️ "` | El símbolo usado antes de mostrar la nube OpenStack actual. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `openstack`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| cloud | `corp` | The current OpenStack cloud | -| proyecto | `dev` | The current OpenStack project | +| cloud | `corp` | La nube OpenStack actual | +| proyecto | `dev` | El proyecto OpenStack actual | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2110,20 +2112,21 @@ symbol = "☁️ " ## Versión del paquete -The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. +El módulo `package` se muestra cuando el directorio actual es el repositorio de un paquete, y muestra su versión actual. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages. -- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory -- [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory -- [**Nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command -- [**Poetry**](https://python-poetry.org/) – The `poetry` package version is extracted from the `pyproject.toml` present in the current directory -- [**Python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory -- [**Composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present in the current directory -- [**Gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present -- [**Julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - The package version is extracted from the `Project.toml` present -- [**Mix**](https://hexdocs.pm/mix/) - The `mix` package version is extracted from the `mix.exs` present -- [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present -- [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present -- [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present +- [**npm**](https://docs.npmjs.com/cli/commands/npm) – La versión del paquete `npm` se extrae del `package.json` presente en el directorio actual +- [**Cargo**](https://doc.rust-lang.org/cargo/) – La versión del paquete `cargo` se extrae del `Cargo.toml` presente en el directorio actual +- [**Nimble**](https://github.com/nim-lang/nimble) - La versión del paquete `nimble` se extrae del archivo `*.nimble` presente en el directorio actual con el comando `nimble dump` +- [**Poetry**](https://python-poetry.org/) – La versión del paquete `poetry` se extrae del `pyproject.toml` presente en el directorio actual +- [**Python**](https://www.python.org) – La versión del paquete `python` se extrae del `setup.cfg` presente en el directorio actual +- [**Composer**](https://getcomposer.org/) – La versión del paquete `composer` se extrae del `composer.json` presente en el directorio actual +- [**Gradle**](https://gradle.org/) – La versión del paquete `gradle` se extrae del `build.gradle` presente en directorio actual +- [**Julia**](https://docs.julialang.org/en/v1/stdlib/Pkg/) - La versión del paquete se extrae del `Project.toml` presente en el directorio actual +- [**Mix**](https://hexdocs.pm/mix/) - La versión del paquete `mix` se extrae del `mix.exs` presente en el directorio actual +- [**Help**](https://helm.sh/docs/helm/helm_package/) - La versión del paquete `helm` se extrae del `Chart.yaml` presente en el directorio actual +- [**Maven**](https://maven.apache.org/) - La versión de paquete `maven` se extrae del `pom.xml` presente en el directorio actual +- [**Meson**](https://mesonbuild.com/) - La versión del paquete `meson` se extrae del `meson.build` presente en el directorio actual +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present - [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present > ⚠️ 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. @@ -2133,11 +2136,11 @@ The `package` module is shown when the current directory is the repository for a | Opción | Por defecto | Descripción | | ----------------- | --------------------------------- | --------------------------------------------------------------------------------------- | | `format` | `"is [$symbol$version]($style) "` | El formato del módulo. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `symbol` | `"📦 "` | El símbolo usado antes de mostrar la versión del paquete. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | | `style` | `"bold 208"` | El estilo del módulo. | -| `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | Disables the `package` module. | +| `display_private` | `false` | Activar la visualización de la versión para los paquetes marcados como privados. | +| `disabled` | `false` | Desactiva el módulo `package`. | ### Variables @@ -2160,21 +2163,21 @@ format = "via [🎁 $version](208 bold) " ## Perl -The `perl` module shows the currently installed version of [Perl](https://www.perl.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `perl` muestra la versión instalada de [Perl](https://www.perl.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The 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` +- El directorio actual contiene un archivo `Makefile.PL` o `Build.PL` +- El directorio actual contiene un archivo `cpanfile` o `cpanfile.snapshot` +- El directorio actual contiene un archivo `META.json` o `META.yml` +- El directorio actual contiene un archivo `.perl-version` +- El directorio actual contiene un `.pl`, `.pm` o `.pod` ### Opciones | Opción | Por defecto | Descripción | | ------------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | +| `format` | `"via [$symbol($version )]($style)"` | La cadena de formato para el módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | +| `symbol` | `"🐪 "` | El símbolo usado antes de mostrar la versión de Perl | | `detect_extensions` | `["pl", "pm", "pod"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | @@ -2200,11 +2203,11 @@ format = "via [🦪 $version]($style) " ## PHP -The `php` module shows the currently installed version of [PHP](https://www.php.net/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `php` muestra la versión instalada de [PHP](https://www.php.net/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The current directory contains a `composer.json` file -- The current directory contains a `.php-version` file -- The current directory contains a `.php` extension +- El directorio actual contiene un archivo `composer.json` +- El directorio actual contiene un archivo `.php-version` +- El directorio actual contiene una extensión `.php` ### Opciones @@ -2212,7 +2215,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `symbol` | `"🐘 "` | El símbolo usado antes de mostrar la versión de PHP. | | `detect_extensions` | `["php"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["composer.json", ".php-version"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | @@ -2238,12 +2241,69 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +El módulo `pulumi` muestra la pila [Pulumi](https://www.pulumi.com/docs/intro/concepts/stack/) y la versión seleccionados actualmente. + +::: consejo + +Por defecto la versión de Pulumi no se muestra, ya que toma un orden de magnitud más largo para cargar que la mayoría de los plugins (~70ms). Si aún deseas activarlo, [sigue el ejemplo que se muestra a continuación](#with-pulumi-version). + +::: + +Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: + +- El directorio actual contiene `Pulumi.yaml` o `Pulumi.yml` +- Un directorio padre contiene `Pulumi.yaml` o `Pulumi.yml` + +### Opciones + +| Opción | Por defecto | Descripción | +| ---------------- | -------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | La cadena de formato para el módulo. | +| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | Una cadena de formato que se muestra antes de la pila de Pulumi. | +| `style` | `"bold 5"` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo `pulumi`. | + +### Variables + +| Variable | Ejemplo | Descripción | +| --------- | ---------- | -------------------------------------- | +| version | `v0.12.24` | La versión de `pulumi` | +| stack | `dev` | La pila actual de Pulumi | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | + +\*: Esta variable sólo puede ser usada como parte de una cadena de estilo + +### Ejemplo + +#### Con la versión de Pulumi + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Sin versión de Pulumi + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript -The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `purescript` muestra la versión instalada de [PureScript](https://www.purescript.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The current directory contains a `spago.dhall` file -- The current directory contains a file with the `.purs` extension +- El directorio actual contiene un archivo `spago.dhall` +- El directorio actual contiene un archivo con la extensión `.purs` ### Opciones @@ -2251,18 +2311,18 @@ The `purescript` module shows the currently installed version of [PureScript](ht | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `symbol` | `"<=> "` | El símbolo usado antes de mostrar la versión de PureScript. | | `detect_extensions` | `["purs"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["spago.dhall"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold white"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `purescript` module. | +| `disabled` | `false` | Deshabilita el módulo `purescript`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `0.13.5` | The version of `purescript` | +| version | `0.13.5` | La versión de `purescript` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2279,21 +2339,21 @@ format = "via [$symbol$version](bold white)" ## Python -The `python` module shows the currently installed version of [Python](https://www.python.org/) and the current [Python virtual environment](https://docs.python.org/tutorial/venv.html) if one is activated. +El módulo `python` muestra la versión instalada de [Python](https://www.python.org/) y el entorno virtual actual [Python](https://docs.python.org/tutorial/venv.html) si uno está activado. -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`. +Si `pyenv_version_name` se establece en `true`, mostrará el nombre de la versión de pyenv. De lo contrario, se mostrará el número de versión de `python --version`. Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The current directory contains a `.python-version` file -- The current directory contains a `Pipfile` file -- The current directory contains a `__init__.py` file -- The current directory contains a `pyproject.toml` file -- The current directory contains a `requirements.txt` file -- The current directory contains a `setup.py` file -- The current directory contains a `tox.ini` file -- The current directory contains a file with the `.py` extension. -- A virtual environment is currently activated +- El directorio actual contiene un archivo `.python-version` +- El directorio actual contiene un archivo `Pipfile` +- El directorio actual contiene un archivo `__init__.py` +- El directorio actual contiene un archivo `pyproject.toml` +- El directorio actual contiene un archivo `requirements.txt` +- El directorio actual contiene un archivo `setup.py` +- El directorio actual contiene un archivo `tox.ini` +- El directorio actual contiene un archivo con la extensión `.py`. +- Un entorno virtual está activado actualmente ### Opciones @@ -2301,33 +2361,33 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes | -------------------- | ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | El formato del módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `symbol` | `"🐍 "` | Una cadena de formato que representa el símbolo de Python | | `style` | `"yellow bold"` | El estilo del módulo. | -| `pyenv_version_name` | `false` | Use pyenv to get Python version | -| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `pyenv_version_name` | `false` | Usar pyenv para obtener la versión de Python | +| `pyenv_prefix` | `pyenv` | Prefijo antes de mostrar la versión de pyenv sólo se utiliza si se utiliza pyenv | +| `python_binary` | `["python", "python3", "python2"]` | Configura los binarios de python que Starship debería ejecutar al obtener la versión. | | `detect_extensions` | `["py"]` | Qué extensiones deben activar este módulo | | `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Qué nombres de archivo deben activar este módulo | | `detect_folders` | `[]` | Qué carpetas deben activar este módulo | -| `disabled` | `false` | Disables the `python` module. | +| `disabled` | `false` | Deshabilita el módulo `python`. | ::: consejo -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. +La variable `python_binary` acepta una cadena o una lista de cadenas. Starship intentará ejecutar cada binario hasta que obtenga un resultado. Ten en cuenta que sólo puedes cambiar el binario que Starship ejecuta para obtener la versión de Python no los argumentos que se utilizan. -The 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. +Los valores por defecto y el orden para `python_binary` fue elegido para identificar primero la versión de Python en un entorno virtualenv/conda (que actualmente añade un `python`, no importa si apunta a `python3` o `python2`). Esto tiene el efecto secundario que si todavía tienes un sistema de Python 2 instalado, puede ser recogido antes de cualquier Python 3 (al menos en las Distros de Linux que siempre enlazan `/usr/bin/python` a Python 2). Si ya no trabajas con Python 2 pero no puedes removerlo del sistema, cambiando esto a `"python3"` ocultará cualquier versión de Python 2, ver ejemplo a continuación. ::: ### Variables -| Variable | Ejemplo | Descripción | -| ------------ | --------------- | ------------------------------------------ | -| version | `"v3.8.1"` | The version of `python` | -| symbol | `"🐍 "` | Refleja el valor de la opción `symbol` | -| style | `"yellow bold"` | Refleja el valor de la opción `style` | -| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | -| virtualenv | `"venv"` | The current `virtualenv` name | +| Variable | Ejemplo | Descripción | +| ------------ | --------------- | -------------------------------------------- | +| version | `"v3.8.1"` | La versión de `python` | +| symbol | `"🐍 "` | Refleja el valor de la opción `symbol` | +| style | `"yellow bold"` | Refleja el valor de la opción `style` | +| pyenv_prefix | `"pyenv "` | Refleja el valor de la opción `pyenv_prefix` | +| virtualenv | `"venv"` | El nombre actual del `virtualenv` | ### Ejemplo @@ -2343,7 +2403,7 @@ pyenv_version_name = true # ~/.config/starship.toml [python] -# Only use the `python3` binary to get the version. +# Solo usa el binario `python3` para obtener la versión. python_binary = "python3" ``` @@ -2351,7 +2411,7 @@ python_binary = "python3" # ~/.config/starship.toml [python] -# Don't trigger for files with the py extension +# No se dispara con archivos con extensión py detect_extensions = [] ``` @@ -2359,24 +2419,24 @@ detect_extensions = [] # ~/.config/starship.toml [python] -# Display the version of python from inside a local venv. +# Muestra la versión de python desde dentro de un entorno virtual local. # -# Note this will only work when the venv is inside the project and it will only -# work in the directory that contains the venv dir but maybe this is ok? +# Ten en cuenta que esto solo funcionará cuando el venv esté dentro del proyecto y sólo +# funcionará en el directorio que contiene el directorio venv dir pero ¿tal vez esté bien? python_binary = ["./venv/bin/python", "python", "python3", "python2"] ``` ## R -The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if any of the following conditions are met: +El módulo `rlang` muestra la versión instalada de [R](https://www.r-project.org/). El módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The current directory contains a file with the `.R` extension. -- The current directory contains a file with the `.Rd` extension. -- The current directory contains a file with the `.Rmd` extension. -- The current directory contains a file with the `.Rproj` extension. -- The current directory contains a file with the `.Rsx` extension. -- The current directory contains a `.Rprofile` file -- The current directory contains a `.Rproj.user` folder +- El directorio actual contiene un archivo con la extensión `.R`. +- El directorio actual contiene un archivo con la extensión `.Rd`. +- El directorio actual contiene un archivo con la extensión `.Rmd`. +- El directorio actual contiene un archivo con la extensión `.Rproj`. +- El directorio actual contiene un archivo con la extensión `.Rsx`. +- El directorio actual contiene un archivo `.Rprofile` +- El directorio actual contiene una carpeta `.Rproj.user` ### Opciones @@ -2384,12 +2444,12 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | +| `symbol` | `"📐"` | Una cadena de formato que representa el símbolo de R. | | `style` | `"blue bold"` | El estilo del módulo. | | `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Qué extensiones deben activar este módulo | | `detect_files` | `[".Rprofile"]` | Qué nombres de archivo deben activar este módulo | | `detect_folders` | `[".Rproj.user"]` | Qué carpetas deben activar este módulo | -| `disabled` | `false` | Disables the `r` module. | +| `disabled` | `false` | Deshabilita el módulo `r`. | ### Variables @@ -2410,9 +2470,9 @@ format = "with [📐 $version](blue bold) " ## Red -By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met: +Por defecto, el módulo `red` muestra la versión actualmente instalada de [Red](https://www.red-lang.org/). El módulo se mostrará si se cumplen alguna de las siguientes condiciones: -- The current directory contains a file with `.red` or `.reds` extension +- El directorio actual contiene un archivo con extensión `.red` o `.Red` ### Opciones @@ -2420,18 +2480,18 @@ By default the `red` module shows the currently installed version of [Red](https | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | +| `symbol` | `"🔺 "` | Una cadena de formato que representa el símbolo de Red. | | `detect_extensions` | `["red"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"red bold"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `red` module. | +| `disabled` | `false` | Deshabilita el módulo `rojo`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v2.5.1` | The version of `red` | +| version | `v2.5.1` | La versión de `red` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2448,11 +2508,11 @@ symbol = "🔴 " ## Ruby -By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met: +Por defecto, el módulo `ruby` muestra la versión actualmente instalada de [Ruby](https://www.ruby-lang.org/). El módulo se mostrará si se cumplen alguna de las siguientes condiciones: -- The current directory contains a `Gemfile` file -- The current directory contains a `.ruby-version` file -- The current directory contains a `.rb` file +- El directorio actual contiene un archivo `Gemfile` +- El directorio actual contiene un archivo `.ruby-version` +- El directorio actual contiene un archivo `.rb` ### Opciones @@ -2460,18 +2520,18 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `symbol` | `"💎 "` | Una cadena de formato que representa el símbolo de Ruby. | | `detect_extensions` | `["rb"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["Gemfile", ".ruby-version"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold red"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `ruby` module. | +| `disabled` | `false` | Deshabilita el módulo `ruby`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v2.5.1` | The version of `ruby` | +| version | `v2.5.1` | La versión de `ruby` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2488,10 +2548,10 @@ symbol = "🔺 " ## Rust -By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met: +Por defecto, el módulo `rust` muestra la versión instalada de [Rust](https://www.rust-lang.org/). El módulo se mostrará si se cumplen alguna de las siguientes condiciones: -- The current directory contains a `Cargo.toml` file -- The current directory contains a file with the `.rs` extension +- El directorio actual contiene un archivo `Cargo.toml` +- El directorio actual contiene un archivo con la extensión `.rs` ### Opciones @@ -2499,7 +2559,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `symbol` | `"🦀 "` | Una cadena de formato que representa el símbolo de Rust | | `detect_extensions` | `["rs"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["Cargo.toml"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | @@ -2510,7 +2570,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | Variable | Ejemplo | Descripción | | --------- | ----------------- | -------------------------------------- | -| version | `v1.43.0-nightly` | The version of `rustc` | +| version | `v1.43.0-nightly` | La versión de `rustc` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2527,11 +2587,11 @@ format = "via [⚙️ $version](red bold)" ## Scala -The `scala` module shows the currently installed version of [Scala](https://www.scala-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `scala` muestra la versión actualmente instalada de [Scala](https://www.scala-lang.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The current directory contains a `build.sbt`, `.scalaenv` or `.sbtenv` file -- The current directory contains a file with the `.scala` or `.sbt` extension -- The current directory contains a directory named `.metals` +- El directorio actual contiene un archivo `build.sbt`, `.scalaenv` o `.sbtenv` +- El directorio actual contiene un archivo con la extensión `.scala` o `.sbt` +- El directorio actual contiene un directorio llamado `.metals` ### Opciones @@ -2542,15 +2602,15 @@ The `scala` module shows the currently installed version of [Scala](https://www. | `detect_extensions` | `["sbt", "scala"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[".metals"]` | Qué carpetas deberían activar estos módulos. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | +| `symbol` | `"🆂 "` | Una cadena de formato que representa el símbolo de Scala. | | `style` | `"red dimmed"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `scala` module. | +| `disabled` | `false` | Deshabilita el módulo `scala`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `2.13.5` | The version of `scala` | +| version | `2.13.5` | La versión de `scala` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2567,35 +2627,39 @@ symbol = "🌟 " ## Shell -The `shell` module shows an indicator for currently used shell. +El módulo `shell` muestra un indicador para el intérprete de comandos actualmente utilizado. ::: consejo -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | El formato del módulo. | -| `disabled` | `true` | Disables the `shell` module. | +| Opción | Por defecto | Descripción | +| ---------------------- | ------------------------- | ----------------------------------------------------------------------- | +| `bash_indicator` | `bsh` | Una cadena de formato usada para representar bash. | +| `fish_indicator` | `fsh` | Una cadena de formato usada para representar fish. | +| `zsh_indicator` | `zsh` | Una cadena de formato usada para representar zsh. | +| `powershell_indicator` | `psh` | Una cadena de formato usada para representar powershell. | +| `ion_indicator` | `ion` | Una cadena de formato usada para representar ion. | +| `elvish_indicator` | `esh` | Una cadena de formato usada para representar elvish. | +| `tcsh_indicator` | `tsh` | Una cadena de formato usada para representar tcsh. | +| `xonsh_indicator` | `xsh` | Una cadena de formato usada para representar xonsh. | +| `unknown_indicator` | | El valor por defecto que se mostrará cuando se desconoce el intérprete. | +| `format` | `"[$indicator]($style) "` | El formato del módulo. | +| `style` | `"white bold"` | El estilo del módulo. | +| `disabled` | `true` | Deshabilita el módulo `shell`. | ### Variables -| Variable | Por defecto | Descripción | -| --------- | ----------- | ---------------------------------------------------------- | -| indicador | | Mirrors the value of `indicator` for currently used shell. | +| Variable | Por defecto | Descripción | +| --------- | ----------- | ------------------------------------------------------------------------------------- | +| indicator | | Refleja el valor de `indicator` para el intérprete de comandos actualmente utilizado. | +| style\* | | Refleja el valor de la opción `style`. | + +\*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplos @@ -2606,29 +2670,30 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` ## SHLVL -The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. +El módulo `shlvl` muestra la variable de entorno [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") actual, si está establecido en un número y reúne o supera el umbral especificado. ### Opciones -| Opción | Por defecto | Descripción | -| ----------- | ---------------------------- | ------------------------------------------------------------- | -| `threshold` | `2` | Display threshold. | -| `format` | `"[$symbol$shlvl]($style) "` | El formato del módulo. | -| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. | -| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `true` | Disables the `shlvl` module. | +| Opción | Por defecto | Descripción | +| ----------- | ---------------------------- | ----------------------------------------------------------------- | +| `threshold` | `2` | Mostrar el umbral. | +| `format` | `"[$symbol$shlvl]($style) "` | El formato del módulo. | +| `symbol` | `"↕️ "` | El símbolo utilizado para representar el `SHLVL`. | +| `repeat` | `false` | Hace que el `symbol` se repita con la cantidad actual de `SHLVL`. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `disabled` | `true` | Deshabilita el módulo `shlvl`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| shlvl | `3` | The current value of `SHLVL` | +| shlvl | `3` | El valor actual de `SHLVL` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2647,22 +2712,22 @@ threshold = 3 ## Singularity -The `singularity` module shows the current [Singularity](https://sylabs.io/singularity/) image, if inside a container and `$SINGULARITY_NAME` is set. +El módulo `singularity` muestra la imagen de [singularity](https://sylabs.io/singularity/) actual, si se encuentra dentro de un contenedor y `$SINGULARITY_NAME` está establecido. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | -------------------------------- | ------------------------------------------------ | -| `format` | `'[$symbol\[$env\]]($style) '` | El formato del módulo. | -| `symbol` | `""` | A format string displayed before the image name. | -| `style` | `"bold dimmed blue"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `singularity` module. | +| Opción | Por defecto | Descripción | +| ---------- | -------------------------------- | ------------------------------------------------------------------- | +| `format` | `'[$symbol\[$env\]]($style) '` | El formato del módulo. | +| `symbol` | `""` | Una cadena de formato que se muestra antes del nombre de la imagen. | +| `style` | `"bold dimmed blue"` | El estilo del módulo. | +| `disabled` | `false` | Deshabilita el módulo de `singularity`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------------ | -------------------------------------- | -| env | `centos.img` | The current Singularity image | +| env | `centos.img` | La imagen de Singularity actual | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2677,50 +2742,50 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu format = '[📦 \[$env\]]($style) ' ``` -## Estado +## 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`. +El módulo `status` muestra el código de salida del comando anterior. El módulo se mostrará sólo si el código de salida no es `0`. ::: consejo -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. ::: -::: warning This module is not supported on elvish and nu shell. ::: +::: advertencia Este módulo no es compatible con los intérpretes de comandos Elvish y Nu. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- | -| `format` | `"[$symbol$status]($style) "` | The format of the module | -| `symbol` | `"✖"` | El símbolo mostrado en un error del programa | -| `success_symbol` | `"✔️"` | The symbol displayed on program success | -| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable | -| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found | -| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) | -| `signal_symbol` | `"⚡"` | The symbol displayed on any signal | -| `style` | `"bold red"` | El estilo del módulo. | -| `recognize_signal_code` | `true` | Enable signal mapping from exit code | -| `map_symbol` | `false` | Enable symbols mapping from exit code | -| `pipestatus` | `false` | Enable pipestatus reporting | -| `pipestatus_separator` | `|` | The symbol that separate in pipe program exit codes | -| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline | -| `disabled` | `true` | Disables the `status` module. | +| Opción | Por defecto | Descripción | +| ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- | +| `format` | `"[$symbol$status]($style) "` | El formato del módulo | +| `symbol` | `"✖"` | El símbolo mostrado en el error del programa | +| `success_symbol` | `"✔️"` | El símbolo mostrado en el éxito del programa | +| `not_executable_symbol` | `"🚫"` | El símbolo mostrado cuando el archivo no es ejecutable | +| `not_found_symbol` | `"🔍"` | El símbolo mostrado cuando no se encuentra el comando | +| `sigint_symbol` | `"🧱"` | El símbolo mostrado en SIGINT (Ctrl + c) | +| `signal_symbol` | `"⚡"` | El símbolo mostrado en cualquier señal | +| `style` | `"bold red"` | El estilo del módulo. | +| `recognize_signal_code` | `true` | Habilita el mapeo de señales desde el código de salida | +| `map_symbol` | `false` | Habilita el mapeo de símbolos desde el código de salida | +| `pipestatus` | `false` | Habilita el reporte de pipstatus | +| `pipestatus_separator` | `|` | El símbolo que se separa en los códigos de salida del programa de tubería | +| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | El formato del módulo cuando el comando es un pipeline | +| `disabled` | `true` | Deshabilita el módulo `status`. | ### Variables -| Variable | Ejemplo | Descripción | -| -------------- | ------- | ------------------------------------------------------------------------------------------- | -| estado | `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 | -| pipestatus | | Rendering of in pipeline programs's exit codes, this is only available in pipestatus_format | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| 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ñalizado | +| signal_name | `KILL` | Nombre de la señal correspondiente al código de salida, sólo si está señalizada | +| maybe_int | `7` | Contiene el número de código de salida cuando no se ha encontrado ningún significado | +| pipestatus | | Renderizado en los códigos de salida de los programas del pipeline, esto sólo está disponible en pipestatus_format | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | \*: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -2741,10 +2806,10 @@ disabled = false ## Swift -By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met: +Por defecto, el módulo `swift` muestra la versión instalada de [Swift](https://swift.org/). El módulo se mostrará si se cumplen alguna de las siguientes condiciones: -- The current directory contains a `Package.swift` file -- The current directory contains a file with the `.swift` extension +- El directorio actual contiene un archivo `Package.swift` +- El directorio actual contiene un archivo con la extensión `.swift` ### Opciones @@ -2752,12 +2817,12 @@ By default the `swift` module shows the currently installed version of [Swift](h | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `symbol` | `"🐦 "` | Una cadena de formato que representa el símbolo de Swift | | `detect_extensions` | `["swift"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["Package.swift"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold 202"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `swift` module. | +| `disabled` | `false` | Deshabilita el módulo `swift`. | ### Variables @@ -2780,46 +2845,46 @@ format = "via [🏎 $version](red bold)" ## Terraform -The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. +El módulo `Terraform` muestra el espacio de trabajo de [Terraform](https://www.terraform.io/docs/language/state/workspaces.html) y la versión seleccionados actualmente. ::: consejo -By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). +Por defecto no se muestra la versión de Terraform, ya que esto es lento para las versiones actuales de Terraform cuando hay muchos complementos en uso. Si aún deseas activarlo, [sigue el ejemplo que se muestra a continuación](#with-terraform-version). ::: Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The current directory contains a `.terraform` folder -- Current directory contains a file with the `.tf` or `.hcl` extensions +- El directorio actual contiene una carpeta `.terraform` +- El directorio actual contiene un archivo con las extensiones `.tf`, `.tfplan` o `.tfstate` ### Opciones | Opción | Por defecto | Descripción | | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | +| `format` | `"via [$symbol$workspace]($style) "` | La cadena de formato para el módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Qué extensiones deberían activar este módulo. | +| `symbol` | `"💠"` | Una cadena de formato que se muestra antes del espacio de trabajo de terraform. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[".terraform"]` | Qué carpetas deberían activar este módulo. | | `style` | `"bold 105"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `terraform` module. | +| `disabled` | `false` | Deshabilita el módulo `terraform`. | ### Variables -| Variable | Ejemplo | Descripción | -| --------------- | ---------- | -------------------------------------- | -| version | `v0.12.24` | The version of `terraform` | -| área de trabajo | `default` | The current Terraform workspace | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | ---------- | ----------------------------------------- | +| version | `v0.12.24` | La versión de `terraform` | +| workspace | `default` | El espacio de trabajo actual de Terraform | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | | Refleja el valor de la opción `style` | \*: Esta variable sólo puede ser usada como parte de una cadena de estilo ### Ejemplo -#### With Terraform Version +#### Con la versión de Terraform ```toml # ~/.config/starship.toml @@ -2828,7 +2893,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes format = "[🏎💨 $version$workspace]($style) " ``` -#### Without Terraform version +#### Sin la versión de Terraform ```toml # ~/.config/starship.toml @@ -2839,33 +2904,33 @@ format = "[🏎💨 $workspace]($style) " ## Hora -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. +El módulo `time` muestra la hora **local** actual. El valor de configuración de `format` es usado por el crate de [`chrono`](https://crates.io/crates/chrono) para controlar cómo se muestra la hora. Echa un vistazo a [los documentos de chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) para ver qué opciones están disponibles. ::: consejo -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo está deshabilitado por defecto. Para activarlo, establece `disabled` a `false` en tu archivo de configuración. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | -| `use_12hr` | `false` | Enables 12 hour formatting | -| `time_format` | ver abajo | 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 | +| Opción | Por defecto | Descripción | +| ----------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `format` | `"at [$time]($style) "` | La cadena de formato para el módulo. | +| `use_12hr` | `false` | Habilita el formato de 12 horas | +| `time_format` | ver abajo | La [cadena de formato de chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) utilizada para formatear la hora. | +| `style` | `"bold yellow"` | El estilo para la hora del módulo | +| `utc_time_offset` | `"local"` | Establece el desplazamiento UTC a utilizar. Rango de -24 < x < 24. Permite a los flotantes acomodar los desplazamientos de zona horaria de 30/45 minutos. | +| `disabled` | `true` | Deshabilita el módulo `time`. | +| `time_range` | `"-"` | Establece el intervalo de tiempo durante el cual el módulo se mostrará. La hora debe ser especificada en formato de 24 horas | -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. +Si `use_12hr` es `true`, entonces `time_format` por defecto `"%r"`. De lo contrario, el valor por defecto es `"%T"`. Configurar manualmente `time_format` sobrescribirá la configuración `use_12hr`. ### Variables | Variable | Ejemplo | Descripción | | --------- | ---------- | ------------------------------------- | -| tiempo | `13:08:10` | La hora actual. | +| time | `13:08:10` | La hora actual. | | style\* | | Refleja el valor de la opción `style` | \*: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -2883,37 +2948,37 @@ utc_time_offset = "-5" time_range = "10:00:00-14:00:00" ``` -## Nombre de usuario +## Username -The `username` module shows active user's username. The module will be shown if any of the following conditions are met: +El módulo `username` muestra el nombre de usuario activo. El módulo se mostrará si se cumplen alguna de las siguientes condiciones: -- 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 +- El usuario actual es root +- El usuario actual no es el mismo que el que está conectado +- El usuario está actualmente conectado como una sesión SSH +- La variable `show_always` se establece en true ::: consejo -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. +La conexión SSH se detecta comprobando las variables de entorno `SSH_CONNECTION`, `SSH_CLIENT`, y `SSH_TTY`. Si tu host SSH no configura estas variables, una solución es establecer una de ellas con un valor tonto. ::: ### Opciones -| Opción | Por defecto | Descripción | -| ------------- | ----------------------- | ------------------------------------- | -| `style_root` | `"bold red"` | The style used when the user is root. | -| `style_user` | `"bold yellow"` | The style used for non-root users. | -| `format` | `"[$user]($style) in "` | El formato del módulo. | -| `show_always` | `false` | Always shows the `username` module. | -| `disabled` | `false` | Disables the `username` module. | +| Opción | Por defecto | Descripción | +| ------------- | ----------------------- | ------------------------------------------ | +| `style_root` | `"bold red"` | El estilo usado cuando el usuario es root. | +| `style_user` | `"bold yellow"` | El estilo usado para usuarios no root. | +| `format` | `"[$user]($style) in "` | El formato del módulo. | +| `show_always` | `false` | Siempre muestra el módulo `username`. | +| `disabled` | `false` | Deshabilita el módulo `username`. | ### Variables -| Variable | Ejemplo | Descripción | -| -------- | ------------ | ------------------------------------------------------------------------------------------- | -| `style` | `"red bold"` | Mirrors the value of option `style_root` when root is logged in and `style_user` otherwise. | -| `user` | `"matchai"` | The currently logged-in user ID. | +| Variable | Ejemplo | Descripción | +| -------- | ------------ | --------------------------------------------------------------------------------------------------- | +| `style` | `"red bold"` | Refleja el valor de la opción `style_root` cuando root inició sesión y `style_user` por otra parte. | +| `user` | `"matchai"` | El ID de usuario conectado actualmente. | ### Ejemplo @@ -2930,9 +2995,9 @@ show_always = true ## Vagrant -The `vagrant` module shows the currently installed version of [Vagrant](https://www.vagrantup.com/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +El módulo `vagrant` muestra la versión instalada de [Vagrant](https://www.vagrantup.com/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The current directory contains a `Vagrantfile` file +- El directorio actual contiene un archivo `Vagrantfile` ### Opciones @@ -2940,18 +3005,18 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `symbol` | `"⍱ "` | Una cadena de formato que representa el símbolo de Vagrant. | | `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["Vagrantfile"]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"cyan bold"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `vagrant` module. | +| `disabled` | `false` | Deshabilita el módulo `vagrant`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ---------------- | -------------------------------------- | -| version | `Vagrant 2.2.10` | The version of `Vagrant` | +| version | `Vagrant 2.2.10` | La versión de `Vagrant` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -2968,9 +3033,9 @@ format = "via [⍱ $version](bold white) " ## V -The `vlang` module shows you your currently installed version of [V](https://vlang.io/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: -- The current directory contains a file with `.v` extension -- The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file +El módulo `vlang` te muestra la versión instalada de [V](https://vlang.io/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones: +- El directorio actual contiene un archivo con la extensión `.v` +- El directorio actual contiene un archivo `v.mod`, `vpkg.json` o `.vpkg-lock.json` ### Opciones @@ -2978,18 +3043,18 @@ The `vlang` module shows you your currently installed version of [V](https://vla | ------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | +| `symbol` | `"V "` | Una cadena de formato que representa el símbolo de V | | `detect_extensions` | `["v"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | | `style` | `"blue bold"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `vlang` module. | +| `disabled` | `false` | Deshabilita el módulo `vlang`. | ### Variables | Variable | Ejemplo | Descripción | | --------- | ------- | -------------------------------------- | -| version | `v0.2` | The version of `v` | +| version | `v0.2` | La versión de `v` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -3003,24 +3068,24 @@ format = "via [V $version](blue bold) " ## VCSH -The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use. +El módulo `vcsh` muestra el repositorio activo [VCSH](https://github.com/RichiH/vcsh) actual. El módulo sólo se mostrará si un repositorio está actualmente en uso. ### Opciones -| Opción | Por defecto | Descripción | -| ---------- | -------------------------------- | ------------------------------------------------------ | -| `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | El estilo del módulo. | -| `format` | `"vcsh [$symbol$repo]($style) "` | El formato del módulo. | -| `disabled` | `false` | Disables the `vcsh` module. | +| Opción | Por defecto | Descripción | +| ---------- | -------------------------------- | ------------------------------------------------------------ | +| `symbol` | | El símbolo usado antes de mostrar el nombre del repositorio. | +| `style` | `"bold yellow"` | El estilo del módulo. | +| `format` | `"vcsh [$symbol$repo]($style) "` | El formato del módulo. | +| `disabled` | `false` | Deshabilita el módulo `vcsh`. | ### Variables -| Variable | Ejemplo | Descripción | -| ----------- | ------------------------------------------- | -------------------------------------- | -| repositorio | `dotfiles` if in a VCSH repo named dotfiles | The active repository name | -| symbol | | Refleja el valor de la opción `symbol` | -| style\* | `black bold dimmed` | Refleja el valor de la opción `style` | +| Variable | Ejemplo | Descripción | +| --------- | ----------------------------------------------------------- | -------------------------------------- | +| repo | `dotfiles` si está en un repositorio VCSH nombrado dotfiles | El nombre del repositorio activo | +| symbol | | Refleja el valor de la opción `symbol` | +| style\* | `black bold dimmed` | Refleja el valor de la opción `style` | \*: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -3035,9 +3100,9 @@ format = "[🆅 $repo](bold blue) " ## Zig -By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met: +Por defecto, el módulo `zig` muestra la versión instalada de [Zig](https://ziglang.org/). El módulo se mostrará si se cumplen alguna de las siguientes condiciones: -- The current directory contains a `.zig` file +- El directorio actual contiene un archivo `.zig` ### Opciones @@ -3045,9 +3110,9 @@ By default the the `zig` module shows the currently installed version of [Zig](h | ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. | | `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `symbol` | `"↯ "` | El símbolo usado antes de mostrar la versión de Zig. | | `style` | `"bold yellow"` | El estilo del módulo. | -| `disabled` | `false` | Disables the `zig` module. | +| `disabled` | `false` | Deshabilita el módulo `zig`. | | `detect_extensions` | `["zig"]` | Qué extensiones deberían activar este módulo. | | `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. | | `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | @@ -3056,7 +3121,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | Variable | Ejemplo | Descripción | | --------- | -------- | -------------------------------------- | -| version | `v0.6.0` | The version of `zig` | +| version | `v0.6.0` | La versión de `zig` | | symbol | | Refleja el valor de la opción `symbol` | | style\* | | Refleja el valor de la opción `style` | @@ -3073,58 +3138,66 @@ symbol = "⚡️ " ## Comandos personalizados -The `custom` modules show the output of some arbitrary commands. +Los módulos `personalizados` muestran la salida de algunos comandos arbitrarios. -These modules will be shown if any of the following conditions are met: +Estos módulos se mostrarán si se cumplen alguna de las siguientes condiciones: -- 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 -- The current Operating System (std::env::consts::OS) matchs with `os` field if defined. +- El directorio actual contiene un archivo cuyo nombre está en `files` +- El directorio actual contiene un directorio cuyo nombre está en `directories` +- El directorio actual contiene un archivo cuya extensión está en `extensions` +- El comando `when` devuelve 0 +- El sistema operativo actual (std::env::consts::OS) coincide con el campo `os` si está definido. ::: consejo -Multiple custom modules can be defined by using a `.`. +Múltiples módulos personalizados pueden definirse usando un `.`. ::: ::: consejo -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. +El orden en el que se muestran los módulos personalizados se puede establecer individualmente incluyendo `${custom.foo}` en el `format` de nivel superior (ya que incluye un punto, necesita usar `${...}`). Por defecto, el módulo `custom` simplemente mostrará todos los módulos personalizados en el orden en que fueron definidos. ::: ::: consejo -[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! +[El issue #1252](https://github.com/starship/starship/discussions/1252) contiene ejemplos de módulos personalizados. ¡Si tienes un ejemplo interesante no cubierto allí, no dudes en compartirlo! + +::: + +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). ::: ### Opciones -| Opción | Por defecto | Descripción | -| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | -| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. | -| `shell` | | [See below](#custom-command-shell) | -| `description` | `""` | The description of the module that is shown when running `starship explain`. | -| `files` | `[]` | The files that will be searched in the working directory for a match. | -| `directories` | `[]` | The directories that will be searched in the working directory for a match. | -| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. | -| `symbol` | `""` | The symbol used before displaying the command output. | -| `style` | `"bold green"` | El estilo del módulo. | -| `format` | `"[$symbol($output )]($style)"` | El formato del módulo. | -| `disabled` | `false` | Disables this `custom` module. | -| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | +| Opción | Por defecto | Descripción | +| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `command` | `""` | El comando cuya salida debe ser impresa. El comando se pasará en stdin al intérprete de comandos. | +| `when` | | Un comando del intérprete de comandos 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` | Deshabilita este módulo `personalizado`. | +| `os` | | Nombre del sistema operativo en el que se mostrará el módulo (unix, linux, macos, windows, ... ) [Ver valores posibles](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | ### Variables -| Variable | Descripción | -| --------- | -------------------------------------- | -| output | The output of shell command in `shell` | -| symbol | Refleja el valor de la opción `symbol` | -| style\* | Refleja el valor de la opción `style` | +| Variable | Descripción | +| --------- | ----------------------------------------------------------- | +| output | La salida del comando del intérprete de comandos en `shell` | +| symbol | Refleja el valor de la opción `symbol` | +| style\* | Refleja el valor de la opción `style` | \*: Esta variable sólo puede ser usada como parte de una cadena de estilo @@ -3132,8 +3205,8 @@ The order in which custom modules are shown can be individually set by including `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. +- La primera cadena es la ruta al intérprete de comandos a usar para ejecutar el comando. +- Otros argumentos siguientes son pasados al intérprete de comandos. If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows. @@ -3163,13 +3236,13 @@ Automatic detection of shells and proper parameters addition are currently imple # ~/.config/starship.toml [custom.foo] -command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +command = "echo foo" # muestra la salida del comando +files = ["foo"] # se puede especificar filtros pero los wildcards no son soportados when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/es-ES/faq/README.md b/docs/es-ES/faq/README.md index 5a796a784..cb1055958 100644 --- a/docs/es-ES/faq/README.md +++ b/docs/es-ES/faq/README.md @@ -56,41 +56,67 @@ Si obtienes un error como "_version 'GLIBC_2.18' not found (required by starship sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` -## Veo símbolos que no entiendo ni espero, ¿qué significan? +## Why do I see `Executing command "..." timed out.` warnings? -Si ves símbolos que no reconoces, puedes usar `starship explain` para explicar los módulos que se muestran actualmente. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. -## ¿Por qué no veo un símbolo de glifo en mi prompt? +## I see symbols I don't understand or expect, what do they mean? -La causa más común de esto es la mala configuración del sistema. Algunas distribuciones de Linux en particular no vienen con soporte de fuentes listos para usarse. Tienes que garantizar que: +If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. + +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +reporte de error starship +``` + +## 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: - Tu configuración regional está establecida con un valor UTF-8, como `de_DE.UTF-8` o `ja_JP.UTF-8`. Si `LC_ALL` no es un valor UTF-8, [necesitarás cambiarlo](https://www.tecmint.com/set-system-locales-in-linux/). - Tienes una fuente emoji instalada. La mayoría de los sistemas vienen con una fuente emoji por defecto, pero algunos (notablemente Arch Linux) no. Generalmente puedes instalar uno a través del gestor de paquetes del sistema --[noto emoji](https://www.google.com/get/noto/help/emoji/) es una elección popular. - Estás usando un [Nerd Font](https://www.nerdfonts.com/). -Para probar tu sistema, ejecua los siguientes comandos en un terminal: +To test your system, run the following commands in a terminal: ```sh echo -e "\xf0\x9f\x90\x8d" echo -e "\xee\x82\xa0" ``` -La primera línea debe producir un [emoji snake](https://emojipedia.org/snake/), mientras que la segunda debe producir un [símbolo de rama de Powerline(e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). +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). -Si cualquiera de los dos símbolos no se puede mostrar correctamente, su sistema todavía está mal configurado. Desafortunadamente, obtener la configuración correcta de las fuentes es a veces difícil. Los usuarios en el Discord pueden ayudar. Si ambos símbolos se muestran correctamente, pero todavía no los ves en Starship, [¡envía un informe de error!](https://github.com/starship/starship/issues/new/choose) +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) -## ¿Cómo puedo desinstalar Starship? +## How do I uninstall Starship? -Starship es tan fácil de desinstalar como de instalar en primer lugar. +Starship is just as easy to uninstall as it is to install in the first place. 1. Elimina cualquier línea de tu configuración de intérprete de comandos (por ejemplo, `~/.bashrc`) usada para inicializar Starship. 1. Elimina el binario de Starship. -Si Starship fue instalado usando un gestor de paquetes, por favor refiérete a sus documentos para instrucciones de desinstalación. +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. -Si Starship fue instalado usando el guión de instalación, el siguiente comando eliminará el binario: +If Starship was installed using the install script, the following command will delete the binary: ```sh -# Localiza y elimina el binario de starship +# Locate and delete the starship binary sh -c 'rm "$(which starship)"' ``` diff --git a/docs/es-ES/guide/README.md b/docs/es-ES/guide/README.md index 964198b91..5cbd930c6 100644 --- a/docs/es-ES/guide/README.md +++ b/docs/es-ES/guide/README.md @@ -181,7 +181,7 @@ #### Instalar con un gestor de paquetes - ##### Ejemplo: [Homebrew](https://brew.sh/): + ##### Con [Homebrew](https://brew.sh/): ```sh brew install starship @@ -304,37 +304,9 @@ Si hablas con fluidez en un idioma que no sea inglés, agradecemos mucho cualqui Si quieres ayudar a colaborar a Starship, por favor mira nuestra [Guía de Colaboradores](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Además, siéntete libre de entrar en nuestro [servidor de Discord](https://discord.gg/8Jzqu3T) y di "¡Hola!". 👋 -### Desarrolladores - -Este proyecto existe gracias a todas las personas que han ayudado. [[Contribuir](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. - - -### Financiadores - -Conviértete en un financiador y ayúdanos a mantener nuestra comunidad. [[Contribuir](https://opencollective.com/starship/contribute)] - -#### Personas - - - -#### Organizaciones - -Apoya este proyecto con tu organización. Su logo se mostrará aquí con un enlace a su sitio web. [[Contribuir](https://opencollective.com/starship/contribute)] - - - - - - - - - - - - ## 💭 Inspirado por -Por favor, revisa estos trabajos previos que ayudaron a inspirar la creación de starship. 🙏 +Por favor, revisa estos proyectos previos que inspiraron la creación de Starship. 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un prompt ZSH para astronautas. @@ -344,9 +316,9 @@ Por favor, revisa estos trabajos previos que ayudaron a inspirar la creación de


- Icono de cohete de Starship + Icono de Starship

## 📝 Licencia -Derechos de autor © 2019-presente, [Colaboradores de Starship](https://github.com/starship/starship/graphs/contributors).
Este proyecto está bajo una licencia [ISC](https://github.com/starship/starship/blob/master/LICENSE). +Derechos de autor © 2019-presente, [Colaboradores de Starship](https://github.com/starship/starship/graphs/contributors).
Este proyecto está bajo una licencia [ISC](https://github.com/starship/starship/blob/master/LICENSE). diff --git a/docs/es-ES/installing/README.md b/docs/es-ES/installing/README.md index aa74f91d7..951ffe385 100644 --- a/docs/es-ES/installing/README.md +++ b/docs/es-ES/installing/README.md @@ -35,6 +35,16 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Instalación + +En Funtoo Linux, Starship puede instalarse desde [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) a través de Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) ### Obtener el binario @@ -47,14 +57,14 @@ nix-env -iA nixos.starship #### Declarativo, usuario único, a través de [home-manager](https://github.com/nix-community/home-manager) -Activa el módulo `programs.starship` en tu archivo `home.nix` y añade tus ajustes +Habilita el módulo `programs.starship` en tu archivo `home.nix` y añade tus configuraciones ```nix { programs.starship = { enable = true; enableZshIntegration = true; - # Configuration written to ~/.config/starship.toml + # Configuración escrita en ~/.config/starship.toml settings = { # add_newline = false; @@ -69,7 +79,7 @@ Activa el módulo `programs.starship` en tu archivo `home.nix` y añade tus ajus } ``` -luego ejecutar +then run ```sh home-manager switch diff --git a/docs/es-ES/presets/README.md b/docs/es-ES/presets/README.md index ec70717ad..4c5c58abf 100644 --- a/docs/es-ES/presets/README.md +++ b/docs/es-ES/presets/README.md @@ -1,12 +1,12 @@ -# Ajustes por defecto +# Preajustes -Aquí hay una colección de ajustes por defecto creados por la comunidad de Starship. ¡Si quieres compartir un ajuste por defecto, por favor, [envía un PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) actualizando este archivo! 😊 +Aqui tienes una colección de preajustes creados por la comunidad de Starship. ¡Si quieres compartir un preajuste, por favor, [envía un PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) actualizando este archivo! 😊 ## Símbolos de Nerd Font -Este ajuste por defecto no modifica nada excepto los símbolos usados para cada módulo. Si los emojis no son lo tuyo, ¡esto podría llamar tu atención! +Este preajuste no modifica nada excepto los símbolos usados para cada módulo. Si los emojis no son lo tuyo, ¡esto podría llamar tu atención! -![Captura de pantalla de los ajustes por defecto de los Símbolos de Nerd Font](/presets/nerd-font-symbols.png) +![Captura de pantalla del preajuste de los Símbolos de Nerd Font](/presets/nerd-font-symbols.png) ### Prerequisitos @@ -90,7 +90,7 @@ symbol = "ﯣ " ## Segmentos entre Corchetes -Este ajuste cambia el formato de todos los módulos incorporados para mostrar su segmento entre corchetes en lugar de usar la redacción predeterminada de Starship ("via", "on", etc.). +Este preajuste cambia el formato de todos los módulos incorporados para mostrar su segmento entre corchetes en lugar de usar la redacción por defecto de Starship ("via", "on", etc.). Antes: @@ -98,7 +98,7 @@ Antes: Después: -![Captura de pantalla de los ajustes predeterminados de los Segmentos entre Corchetes](/presets/bracketed-segments-after.png) +![Captura de pantalla del preajuste de los Segmentos entre Corchetes](/presets/bracketed-segments-after.png) ### Configuración @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -244,7 +247,7 @@ format = '\[[$symbol($version)]($style)\]' ## Símbolos de texto sin formato -Este ajuste preestablecido cambia los símbolos a texto sin formato. Si tu terminal/fuente no pudo renderizar el NerdFonts/emojis, ¡tal vez podría probar este ajuste preestablecido! +Este preajuste cambia los símbolos a texto sin formato. Si tu terminal/fuente no pudo renderizar el NerdFonts/emojis, ¡tal vez podría probar este preajuste! Antes (configuración por defecto con Fuente Fixedsys): @@ -252,7 +255,7 @@ Antes (configuración por defecto con Fuente Fixedsys): Después (Símbolos de texto sin formato): -![Captura de pantalla de los ajustes predeterminados de los Símbolos de Nerd Font](/presets/plain-text-symbols-after.png) +![Captura de pantalla del ajuste de los Símbolos de Texto Plano](/presets/plain-text-symbols-after.png) ### Configuración @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -371,9 +377,9 @@ symbol = "swift " ## Ocultar versiones en tiempo de ejecución -Esta configuración predeterminada oculta la versión de los tiempos de ejecución del idioma. Si trabajas en contenedores o entornos virtualizados, ¡ésto es para ti! +Este preajuste oculta la versión de los tiempos de ejecución del idioma. Si trabajas en contenedores o entornos virtualizados, ¡ésto es para ti! -![Captura de pantalla ajustes de Ocultar versiones de tiempo de ejecución](/presets/hide-runtime-versions.png) +![Captura de pantalla del preajuste de Ocultar de versiones de tiempo de ejecución](/presets/hide-runtime-versions.png) ### Configuración @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +Esta preajuste emula la apariencia y el comportamiento de [Pure](https://github.com/sindresorhus/pure). + +![Captura de pantalla del ajuste de Pure](/presets/pure-prompt.png) + +### Configuración + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/fr-FR/advanced-config/README.md b/docs/fr-FR/advanced-config/README.md index 8169ed5ba..0ae4daf63 100644 --- a/docs/fr-FR/advanced-config/README.md +++ b/docs/fr-FR/advanced-config/README.md @@ -31,35 +31,47 @@ trap blastoff DEBUG # Pièger DEBUG *avant* l'initialisation de starship eval $(starship init bash) ``` -## Modifier le titre des fenêtres +## Custom pre-prompt and pre-execution Commands in PowerShell -Certaines commandes du shell changeront automatiquement le titre de la fenêtre (par exemple, pour refléter votre répertoire de travail). Fish le fait même par défaut. Starship ne le fait pas, mais il est assez simple d'ajouter cette fonctionnalité à `bash` ou `zsh`. +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Cependant, Starship vous permet dans une certaine mesure d'insérer vos propres fonctions dans la procédure de rendu du prompt : -Tout d'abord, définissez une fonction de changement de titre de fenêtre (identique en bash et zsh) : +Create a function named `Invoke-Starship-PreCommand` -```bash -function set_titre_fenetre(){ - echo -ne "\033]0; VOTRE_TITRE_ICI\007" +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") } ``` -Vous pouvez utiliser des variables pour personnaliser ce titre (`$USER`, `$HOSTNAME`, et `$PWD` sont des choix populaires). +## Change Window Title -Dans `bash`, définissez cette fonction comme la fonction précommande Starship : +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 -starship_precmd_user_func="set_titre_fenetre" +function set_win_title(){ + echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" +} ``` -Dans `zsh`, ajoutez ceci au tableau `precmd_functions` : +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 -precmd_functions+=(set_titre_fenetre) +starship_precmd_user_func="set_win_title" ``` -Si vous aimez le résultat, ajoutez ces lignes à votre fichier de configuration shell (`~/.bashrc` ou `~/.zshrc`) pour le rendre permanent. +In `zsh`, add this to the `precmd_functions` array: -Par exemple, si vous voulez afficher votre répertoire actuel dans le titre de l'onglet de votre terminal, ajoutez le code suivant à votre `~/.bashrc` ou `~/.zshrc`: +```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(){ @@ -68,6 +80,17 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. diff --git a/docs/fr-FR/config/README.md b/docs/fr-FR/config/README.md index 3743fbf0a..c20f170d4 100644 --- a/docs/fr-FR/config/README.md +++ b/docs/fr-FR/config/README.md @@ -142,13 +142,13 @@ Voici la liste des options de configuration de l'invite en lui-même. ### Options -| Option | Défaut | Description | -| ----------------- | ------------------------------ | ---------------------------------------------------------------- | -| `format` | [lien](#default-prompt-format) | Configure le format de l'invite. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | -| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | -| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | -| `add_newline` | `true` | Inserts blank line between shell prompts. | +| Option | Défaut | Description | +| ----------------- | ------------------------------ | --------------------------------------------------------------------------- | +| `format` | [lien](#default-prompt-format) | Configure le format de l'invite. | +| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `scan_timeout` | `30` | Délai d'attente pour que starship scanne les fichiers (en millisecondes). | +| `command_timeout` | `500` | Délai maximal pour les commandes exécutées par starship (en millisecondes). | +| `add_newline` | `true` | Insère une ligne vide entre les invites du shell. | ### Exemple @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -252,13 +253,13 @@ format="$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +Le module `aws` affiche la région et le profil AWS courant. Ces informations sont basées sur les variables d'environnement `AWS_REGION`, `AWS_DEFAULT_REGION`, et `AWS_PROFILE` ainsi que le fichier `~/.aws/config`. Ce module affiche également un minuteur d'expiration lorsque vous utilisez des identifiants temporaires. -When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. +Lorsque vous utilisez [aws-vault](https://github.com/99designs/aws-vault) le profil est lu à partir de la variable d'environnement `AWS_VAULT` et la date d'expiration des identifiants est lue à partir de la variable d'environnement `AWS_SESSION_EXPIRATION`. -When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. +Lorsque vous utilisez [awsu](https://github.com/kreuzwerker/awsu) le profil est lu depuis la variable d'environnement `AWSU_PROFILE`. -When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +Lorsque vous utilisez [AWSume](https://awsu.me) le profil est lu à partir de la variable d'environnement `AWSUME_PROFILE` et la date d'expiration des identifiants est lue à partir de la variable d'environnement `AWSUME_EXPIRATION`. ### Options @@ -281,7 +282,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemples @@ -326,7 +327,7 @@ 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%. +Le module `battery` montre à quel point la batterie de l'appareil est chargée et son état de charge actuel. Ce module n'est visible que lorsque la batterie de l'appareil est inférieure à 10%. ### Options @@ -354,7 +355,7 @@ discharging_symbol = "💀 " ### Indicateur de batterie -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. La valeur par défaut est la suivante : +L'option de configuration `display` est utilisée pour définir quand l'indicateur de batterie doit être affiché (threshold), quel symbole doit être utilisé (symbol) et à quoi il ressemble (style). Si aucun `display` n'est fourni. La valeur par défaut est la suivante : ```toml [[battery.display]] @@ -362,11 +363,11 @@ threshold = 10 style = "bold red" ``` -The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. +La valeur par défaut pour les options `charging_symbol` et `discharging_symbol` est respectivement la valeur des options `charging_symbol` et `discharging_symbol` du module `battery`. #### Options -The `display` option is an array of the following table. +L'option `display` est une array de la table suivante. | Option | Défaut | Description | | -------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------- | @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -393,14 +394,14 @@ discharging_symbol = 💦 ## Caractères -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +Le module `character` affiche un caractère (habituellement une flèche) à côté de l'endroit où le texte est entré dans votre terminal. -The character will tell you whether the last command was successful or not. It can do this in two ways: +Le caractère vous dira si la dernière commande a été réussie ou pas. Cela peut être fait de deux manières: - changement de couleur (`red`/`green`) - changement de forme (`❯`/`✖`) -By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). +Par défaut, il ne change que la couleur. Si vous désirez également changer sa forme, jetez un œil à [cet exemple](#with-custom-error-shape). ::: warning @@ -410,7 +411,7 @@ By default it only changes color. If you also want to change its shape take a lo ::: warning -`vicmd_symbol` is only supported in fish and zsh. +`vicmd_symbol` n'est supporté qu'avec fish et zsh. ::: @@ -463,7 +464,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: +Le module `cmake` affiche la version actuellement installée de [CMake](https://cmake.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - Le répertoire actuel contient un fichier `CMakeLists.txt` - Le répertoire actuel contient un fichier ` CMakeCache.txt` @@ -489,7 +490,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ## COBOL / GNUCOBOL @@ -519,46 +520,46 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ## Temps d'exécution -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. +Le module `cmd_duration` montre le temps qu'a pris la dernière commande a pris pour s'exécuter. Le module ne sera affiché que si la commande a pris plus de deux secondes, ou si la valeur de configuration `min_time` existe. -::: warning Do not hook the DEBUG trap in Bash +::: attention, n'accrochez pas la trappe DEBUG en 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. +Si vous utilisez starship en `bash`, n'accrochez pas `DEBUG` après avoir exécuté `eval $(starship init $0)`, ou ce module **cassera**. ::: -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. +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. ### Options -| Option | Défaut | 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) "` | Format du module. | -| `style` | `"bold yellow"` | Le style du 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). | +| Option | Défaut | Description | +| -------------------- | ----------------------------- | ------------------------------------------------------------------------- | +| `min_time` | `2_000` | Durée la plus courte quand afficher le temps (en millisecondes). | +| `show_milliseconds` | `false` | Afficher les millisecondes en plus des secondes pendant la durée. | +| `format` | `"took [$duration]($style) "` | Format du module. | +| `style` | `"bold yellow"` | Le style du module. | +| `disabled` | `false` | Désactive le module `cmd_duration`. | +| `show_notifications` | `false` | Afficher les notifications du bureau lorsque la commande est terminée. | +| `min_time_to_notify` | `45_000` | Durée minimale après laquelle activer la notification (en millisecondes). | ::: 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`. ::: ### Variables -| Variable | Exemple | Description | -| --------- | -------- | --------------------------------------- | -| duration | `16m40s` | The time it took to execute the command | -| style\* | | Reflète la valeur de l'option `style` | +| Variable | Exemple | Description | +| --------- | -------- | --------------------------------------------- | +| duration | `16m40s` | Le temps nécessaire pour exécuter la commande | +| style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -576,30 +577,30 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e ::: tip -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +Cela ne supprime pas le modificateur d'invite de conda, vous pouvez exécuter `conda config --set changeps1 False`. ::: ### Options -| Option | Défaut | 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"` | Le style du module. | -| `format` | `"via [$symbol$environment]($style) "` | Format du module. | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | Disables the `conda` module. | +| Option | Défaut | Description | +| ------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | Le nombre de répertoires dans lesquels le chemin d'environnement (Path) doit être tronqué, si l'environnement a été créé via `conda create -p [path]`. `0` ne signifie pas de troncature. Regardez aussi le module [`directory`](#directory). | +| `symbol` | `"🅒 "` | Le symbole utilisé avant le nom d'environnement. | +| `style` | `"bold green"` | Le style du module. | +| `format` | `"via [$symbol$environment]($style) "` | Format du module. | +| `ignore_base` | `true` | Ignore l'environnement `base` lorsqu'il est activé. | +| `disabled` | `false` | Désactive le module `conda`. | ### Variables -| Variable | Exemple | Description | -| ----------- | ------------ | -------------------------------------- | -| environment | `astronauts` | The current conda environment | -| symbol | | Reflète la valeur de l'option `symbol` | -| style\* | | Reflète la valeur de l'option `style` | +| Variable | Exemple | Description | +| ------------- | ------------ | -------------------------------------- | +| environnement | `astronauts` | La version courante de conda | +| symbol | | Reflète la valeur de l'option `symbol` | +| style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -612,33 +613,33 @@ format = "[$symbol$environment](dimmed green) " ## Crystal -The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `crystal` affiche la version actuellement installée de [Crystal](https://crystal-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: -- The current directory contains a `shard.yml` file -- The current directory contains a `.cr` file +- Le répertoire courant contient un fichier `shard.yml` +- Le répertoire courant contient un fichier `.cr` ### Options | Option | Défaut | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `symbol` | `"🔮 "` | Le symbole utilisé avant d'afficher la version de crystal. | | `format` | `"via [$symbol($version )]($style)"` | Format du module. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | | `style` | `"bold green"` | Le style du module. | | `detect_extensions` | `["cr"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["shard.yml"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | -| `disabled` | `false` | Disables the `crystal` module. | +| `disabled` | `false` | Désactive le module `crystal`. | ### Variables | Variable | Exemple | Description | | --------- | --------- | -------------------------------------- | -| version | `v0.32.1` | The version of `crystal` | +| version | `v0.32.1` | La version de `cristal` | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -651,11 +652,11 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of [Dart](https://dart.dev/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `dart` affiche la version actuellement installée de [Dart](https://dart.dev/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: -- The current directory contains a file with `.dart` extension -- The current directory contains a `.dart_tool` directory -- The current directory contains a `pubspec.yaml`, `pubspec.yml` or `pubspec.lock` file +- Le répertoire courant contient un fichier `.dart` +- Le répertoire courant contient un répertoire `.dart_tool` +- Le répertoire courant contient un fichier `pubspec.yaml`, `pubspec.yml` ou `pubspec.lock` ### Options @@ -663,22 +664,22 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | Format du module. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `symbol` | `"🎯 "` | Une chaîne de caractères représentant le symbole de Dart | | `detect_extensions` | `["dart"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[".dart_tool"]` | Quels dossiers devraient activer ce module. | | `style` | `"bold blue"` | Le style du module. | -| `disabled` | `false` | Disables the `dart` module. | +| `disabled` | `false` | Désactive le module `dart`. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v2.8.4` | The version of `dart` | +| version | `v2.8.4` | La version de `dart` | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -691,8 +692,8 @@ format = "via [🔰 $version](bold red) " ## Deno -The `deno` module shows you your currently installed version of [Deno](https://deno.land/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: -- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file +Le module `deno` affiche la version actuellement installée de [Deno](https://deno.land/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +- Le répertoire courant contient un fichier `mod.ts`, `mod.js`, `deps.ts` ou `deps.ts` ### Options @@ -700,18 +701,18 @@ The `deno` module shows you your currently installed version of [Deno](https://d | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | Format du module. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `symbol` | `"🦕 "` | Une chaîne de caractères représentant le symbole de Deno | | `detect_extensions` | `[]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | | `style` | `"green bold"` | Le style du module. | -| `disabled` | `false` | Disables the `deno` module. | +| `disabled` | `false` | Désactive le module `deno`. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v1.8.3` | The version of `deno` | +| version | `v1.8.3` | La version de `deno` | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | @@ -726,36 +727,36 @@ format = "via [🦕 $version](green bold) " ## Dossier -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. +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. -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. +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. -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`. +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. ### Options -| Option | Défaut | 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) "` | Format du module. | -| `style` | `"bold cyan"` | Le style du 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. | +| Option | Défaut | Description | +| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `truncation_length` | `3` | Le nombre de dossiers parents selon lesquels le répertoire courant doit être tronqué. | +| `truncate_to_repo` | `true` | Si oui ou non tronquer à la racine du repo git dans lequel vous vous trouvez. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Format du module. | +| `style` | `"bold cyan"` | Le style du module. | +| `disabled` | `false` | Désactive le module `directory`. | +| `read_only` | `"🔒"` | Le symbole indiquant que le répertoire courant est en lecture seule. | +| `read_only_style` | `"red"` | Le style du symbole en lecture seule. | +| `truncation_symbol` | `""` | Le symbole en préfixe aux chemins tronqués. eg: "…/" | +| `home_symbol` | `"~"` | Le symbole indiquant le répertoire personnel. |
-This module has a few advanced configuration options that control how the directory is displayed. +Ce module possède quelques options de configuration avancées qui contrôlent l'affichage du répertoire. -| Advanced Option | Défaut | 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` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. | +| Options avancées | Défaut | Description | +| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `substitutions` | | Table de substitutions à faire au chemin. | +| `fish_style_pwd_dir_length` | `0` | Le nombre de caractères à utiliser lors de l'application de la logique de troncature du pwd de fish. | +| `use_logical_path` | `true` | Si `true` affiche le chemin logique issu du shell via `PWD` ou `--logical-path`. Si `false` renvoie plutôt le chemin du système de fichiers physique avec les liens symboliques résolus. | -`substitutions` 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. +`substitutions` vous permet de définir des remplacements arbitraires pour les chaînes littérales qui apparaissent dans le chemin, par exemple pour de longs préfixes de réseau ou des répertoires de développement (ex. Java). Notez que cela désactivera la PWD de style fish. ```toml [directory.substitutions] @@ -763,7 +764,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an "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`. +`fish_style_pwd_dir_leng` interagit avec les options de troncature d'une manière qui peut être surprenante au début : si elle n'est pas nulle, les composantes du chemin qui seraient normalement tronquées sont affichées à la place avec autant de caractères. Par exemple, le chemin `/built/this/city/on/rock/and/roll`, qui devrait normalement être affiché comme `rock/and/roll`, sera affiché sous la forme de `/b/t/c/o/rock/and/roll` avec `fish_style_pwd_dir_length = 1`--les composants de chemin qui seraient normalement supprimés sont affichés avec un caractère unique. Pour `fish_style_pwd_dir_length = 2`, ce serait `/bu/th/ci/on/rock/and/roll`.
@@ -771,10 +772,10 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Variable | Exemple | Description | | --------- | --------------------- | ------------------------------------- | -| path | `"D:/Projects"` | The current directory path | +| path | `"D:/Projects"` | Le chemin du répertoire courant | | style\* | `"black bold dimmed"` | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -786,32 +787,32 @@ truncation_length = 8 truncation_symbol = "…/" ``` -## Docker Context +## Contexte Docker -The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### Options -| Option | Défaut | Description | -| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | Format du module. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `only_with_files` | `true` | Only show when there's a match | -| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | -| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | Le style du module. | -| `disabled` | `false` | Disables the `docker_context` module. | +| Option | Défaut | Description | +| ------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | +| `format` | `"via [$symbol$context]($style) "` | Format du module. | +| `symbol` | `"🐳 "` | Le symbole utilisé avant d'afficher le contexte Docker. | +| `only_with_files` | `true` | Afficher uniquement quand il y a une correspondance | +| `detect_extensions` | `[]` | Quelles extensions devraient activer ce module (il faut que `only_with_files` soit réglé sur true). | +| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Quels noms de fichier devraient activer ce module (il faut que `only_with_files` soit réglé sur true). | +| `detect_folders` | `[]` | Quels dossiers devraient activer ce module (il faut que `only_with_files` soit réglé sur true). | +| `style` | `"blue bold"` | Le style du module. | +| `disabled` | `false` | Désactive le module `docker_context`. | ### 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` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -824,9 +825,9 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 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. +Le module `dotnet` montre la version pertinente du [SDK .NET Core](https://dotnet.microsoft.com/) pour le répertoire courant. Si le SDK a été épinglé dans le répertoire courant, la version épinglée est affichée. Sinon, le module affiche la dernière version installée du SDK. -By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: +Par défaut, ce module ne sera affiché dans votre invite que lorsqu'un ou plusieurs des fichiers suivants sont présents dans le répertoire courant : - `global.json` - `project.json` @@ -837,9 +838,9 @@ By default this module will only be shown in your prompt when one or more of the - `*.fsproj` - `*.xproj` -You'll also need the .NET Core SDK installed in order to use it correctly. +Vous aurez également besoin du SDK .NET Core pour pouvoir l'utiliser correctement. -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. +En interne, ce module utilise son propre mécanisme de détection de version. Généralement, il est deux fois plus rapide que d'exécuter `dotnet --version`, mais il peut afficher une version incorrecte si votre projet .NET a une arborescence inhabituelle. Si la précision est plus importante que la vitesse, vous pouvez désactiver le mécanisme en définissant `heuristic = false` dans les options du module. The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. @@ -849,24 +850,24 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$cluster" ``` -## Line Break +## Saut de ligne -The `line_break` module separates the prompt into two lines. +Le module `line_break` sépare l'invite en deux lignes. ### Options -| Option | Défaut | Description | -| ---------- | ------- | ------------------------------------------------------------------ | -| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | +| Option | Défaut | Description | +| ---------- | ------- | ----------------------------------------------------------------------- | +| `disabled` | `false` | Désactive le module `line_break` , faisant de l'invite une seule ligne. | ### Exemple @@ -1780,11 +1782,11 @@ disabled = true ## Lua -The `lua` module shows the currently installed version of [Lua](http://www.lua.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `lua` affiche la version actuellement installée de [Lua](http://www.lua.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: -- The current directory contains a `.lua-version` file -- The current directory contains a `lua` directory -- The current directory contains a file with the `.lua` extension +- Le répertoire courant contient un fichier `.lua-version` +- Le répertoire courant contient un répertoire `lua` +- Le répertoire actuel contient un fichier avec l'extension `.lua` ### Options @@ -1792,23 +1794,23 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | Format du module. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. | +| `symbol` | `"🌙 "` | Une chaîne de caractères représentant le symbole de Lua. | | `detect_extensions` | `["lua"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `[".lua-version"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `["lua"]` | Quels dossiers devraient activer ce module. | | `style` | `"bold blue"` | Le style du module. | -| `lua_binary` | `"lua"` | Configures the lua binary that Starship executes when getting the version. | -| `disabled` | `false` | Disables the `lua` module. | +| `lua_binary` | `"lua"` | Configure le binaire lua que Starship exécute lors de l'obtention de la version. | +| `disabled` | `false` | Désactive le module `lua`. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v5.4.0` | The version of `lua` | +| version | `v5.4.0` | La version de `lua` | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -1819,40 +1821,40 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o format = "via [🌕 $version](bold blue) " ``` -## Memory Usage +## Utilisation mémoire -The `memory_usage` module shows current system memory and swap usage. +Le module `memory_usage` affiche la mémoire système actuelle et l'utilisation de swap. -By default the swap usage is displayed if the total system swap is non-zero. +Par défaut, l'utilisation du swap est affichée si le swap total du système n'est pas nul. ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration. ::: ### Options -| Option | Défaut | Description | -| ----------- | ----------------------------------------------- | -------------------------------------------------------- | -| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Format du module. | -| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | -| `style` | `"bold dimmed white"` | Le style du module. | -| `disabled` | `true` | Disables the `memory_usage` module. | +| Option | Défaut | Description | +| ----------- | ----------------------------------------------- | ------------------------------------------------------------------------------ | +| `threshold` | `75` | Masquer l'utilisation de la mémoire à moins qu'elle ne dépasse ce pourcentage. | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Format du module. | +| `symbol` | `"🐏"` | Le symbole utilisé avant d'afficher l'utilisation de la mémoire. | +| `style` | `"bold dimmed white"` | Le style du module. | +| `disabled` | `true` | Désactiver le module `memory_usage`. | ### Variables -| Variable | Exemple | Description | -| ---------------- | ------------- | ------------------------------------------------------------------ | -| ram | `31GiB/65GiB` | The usage/total RAM of the current system memory. | -| ram_pct | `48%` | The percentage of the current system memory. | -| swap\*\* | `1GiB/4GiB` | The swap memory size of the current system swap memory file. | -| swap_pct\*\* | `77%` | The swap memory percentage of the current system swap memory file. | -| symbol | `🐏` | Reflète la valeur de l'option `symbol` | -| style\* | | Reflète la valeur de l'option `style` | +| Variable | Exemple | Description | +| ---------------- | ------------- | ------------------------------------------------------------------------------- | +| ram | `31GiB/65GiB` | La mémoire système utilisée/totale . | +| ram_pct | `48%` | Le pourcentage de la mémoire du système actuel. | +| swap\*\* | `1GiB/4GiB` | La taille de la mémoire swap du fichier de mémoire swap du système courant. | +| swap_pct\*\* | `77%` | Le poucentage de la mémoire swap du fichier de mémoire swap du système courant. | +| symbol | `🐏` | Reflète la valeur de l'option `symbol` | +| style\* | | Reflète la valeur de l'option `style` | -\*: 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 +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style \*\* : Les informations sur le fichier SWAP ne sont affichées que si détectées sur le système actuel ### Exemple @@ -1866,30 +1868,30 @@ symbol = " " style = "bold dimmed green" ``` -## Mercurial Branch +## Branche Mercurial -The `hg_branch` module shows the active branch of the repo in your current directory. +Le module `hg_branch` affiche la branche active du dépôt dans votre répertoire courant. ### Options -| Option | Défaut | Description | -| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | -| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | -| `style` | `"bold purple"` | Le style du module. | -| `format` | `"on [$symbol$branch]($style) "` | Format du module. | -| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | -| `disabled` | `true` | Disables the `hg_branch` module. | +| Option | Défaut | Description | +| ------------------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `symbol` | `" "` | Le symbole utilisé avant le marque-page hg ou le nom de la branche du dépôt dans votre répertoire courant. | +| `style` | `"bold purple"` | Le style du module. | +| `format` | `"on [$symbol$branch]($style) "` | Format du module. | +| `truncation_length` | `2^63 - 1` | Tronque le nom de la branche hg à `N` graphèmes | +| `truncation_symbol` | `"…"` | Le symbole utilisé pour indiquer qu'un nom de branche a été tronqué. | +| `disabled` | `true` | Désactive le module `hg_branch`. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| branch | `master` | The active mercurial branch | +| branch | `master` | La branche mercuriale active | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -1904,35 +1906,35 @@ truncation_symbol = "" ## Nim -The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `nim` affiche la version actuellement installée de [Nim](https://nim-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: -- The 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 +- Le répertoire courant contient un fichier `nim.cfg` +- Le répertoire actuel contient un fichier avec l'extension `.nim` +- Le répertoire actuel contient un fichier avec l'extension `.nims` +- Le répertoire actuel contient un fichier avec l'extension `.nimble` ### Options | Option | Défaut | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | +| `format` | `"via [$symbol($version )]($style)"` | Format du module | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | +| `symbol` | `"👑 "` | Le symbole utilisé avant d'afficher la version de Nim. | | `detect_extensions` | `["nim", "nims", "nimble"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["nim.cfg"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | | `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `false` | Disables the `nim` module. | +| `disabled` | `false` | Désactive le module `nim`. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v1.2.0` | The version of `nimc` | +| version | `v1.2.0` | La version de `nim` | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -1950,14 +1952,14 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ ### Options -| Option | Défaut | Description | -| ------------ | ---------------------------------------------- | ----------------------------------------------------- | -| `format` | `'via [$symbol$state( \($name\))]($style) '` | Format du module. | -| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. | -| `style` | `"bold blue"` | Le style du module. | -| `impure_msg` | `"impure"` | A format string shown when the shell is impure. | -| `pure_msg` | `"pure"` | A format string shown when the shell is pure. | -| `disabled` | `false` | Disables the `nix_shell` module. | +| Option | Défaut | Description | +| ------------ | ---------------------------------------------- | ---------------------------------------------------------- | +| `format` | `'via [$symbol$state( \($name\))]($style) '` | Format du module. | +| `symbol` | `"❄️ "` | Une chaîne de format représentant le symbole de nix-shell. | +| `style` | `"bold blue"` | Le style du module. | +| `impure_msg` | `"impure"` | Une chaîne de format affichée lorsque le shell est impur. | +| `pure_msg` | `"pure"` | Une chaîne de format affichée lorsque le shell est pur. | +| `disabled` | `false` | Désactive le module `nix_shell`. | ### Variables @@ -1968,7 +1970,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -1984,14 +1986,14 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' ## Node.js -The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `nodejs` affiche la version actuellement installée de [Node.js](https://nodejs.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: -- The current directory contains a `package.json` file -- The current directory contains a `.node-version` file -- The current directory contains a `.nvmrc` 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 +- Le répertoire courant contient un fichier `package.json` +- Le répertoire courant contient un fichier `.node-version` +- Le répertoire courant contient un fichier `.nvmrc` +- Le répertoire courant contient un répertoire `node_modules` +- Le répertoire actuel contient un fichier avec l'extension `.js`, `.mjs` ou `.cjs` +- Le répertoire actuel contient un fichier avec l'extension `.ts` ### Options @@ -1999,23 +2001,23 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | Format du module. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `" "` | A format string representing the symbol of Node.js. | +| `symbol` | `" "` | Une chaîne de caractères représentant le symbole de Node.js. | | `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["package.json", ".node-version"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `["node_modules"]` | Quels dossiers devraient activer ce module. | | `style` | `"bold green"` | Le style du module. | -| `disabled` | `false` | Disables the `nodejs` module. | +| `disabled` | `false` | Désactive le module `nodejs`. | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables | Variable | Exemple | Description | | --------- | ---------- | -------------------------------------- | -| version | `v13.12.0` | The version of `node` | +| version | `v13.12.0` | La version de `node` | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2028,41 +2030,41 @@ format = "via [🤖 $version](bold green) " ## OCaml -The `ocaml` module shows the currently installed version of [OCaml](https://ocaml.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `ocaml` affiche la version actuellement installée de [OCaml](https://ocaml.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: -- The 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 +- Le répertoire courant contient un fichier avec l'extension `.opam` ou le répertoire `_opam` +- Le répertoire courant contient un répertoire `esy.lock` +- Le répertoire courant contient un fichier `dune` ou `dune-project` +- Le répertoire courant contient un fichier `jbuild` ou `jbuild-ignore` +- Le répertoire courant contient un fichier `.merlin` +- Le répertoire actuel contient un fichier avec l'extension `.ml`, `.mli`, `.re` ou `.rei` ### Options | Option | Défaut | Description | | ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. | +| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | La chaîne de format pour le module. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `global_switch_indicator` | `""` | The format string used to represent global OPAM switch. | -| `local_switch_indicator` | `"*"` | The format string used to represent local OPAM switch. | +| `symbol` | `"🐫 "` | Le symbole utilisé avant d'afficher la version de OCaml. | +| `global_switch_indicator` | `""` | La chaîne de caractères utilisée pour représenter le commutateur OPAM global. | +| `local_switch_indicator` | `"*"` | La chaîne de caractères utilisée pour représenter le commutateur OPAM local. | | `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `["_opam", "esy.lock"]` | Quels dossiers devraient activer ce module. | | `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `false` | Disables the `ocaml` module. | +| `disabled` | `false` | Désactive le module `ocaml`. | ### Variables | Variable | Exemple | Description | | ---------------- | ------------ | ----------------------------------------------------------------- | -| version | `v4.10.0` | The version of `ocaml` | +| version | `v4.10.0` | La version de `ocaml` | | switch_name | `my-project` | The active OPAM switch | | switch_indicator | | Mirrors the value of `indicator` for currently active OPAM switch | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2082,9 +2084,9 @@ The `openstack` module shows the current OpenStack cloud and project. The module | Option | Défaut | Description | | ---------- | --------------------------------------------------- | -------------------------------------------------------------- | | `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | Format du module. | -| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. | +| `symbol` | `"☁️ "` | Le symbole utilisé avant d'afficher le cloud OpenStack actuel. | | `style` | `"bold yellow"` | Le style du module. | -| `disabled` | `false` | Disables the `openstack` module. | +| `disabled` | `false` | Désactive le module `openstack`. | ### Variables @@ -2095,7 +2097,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2108,9 +2110,9 @@ style = "bold yellow" symbol = "☁️ " ``` -## Package Version +## Version du package -The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a - [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present - [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present - [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present - [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present > ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. @@ -2133,21 +2136,21 @@ The `package` module is shown when the current directory is the repository for a | Option | Défaut | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------------------------------------ | | `format` | `"is [$symbol$version]($style) "` | Format du module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `symbol` | `"📦 "` | Le symbole utilisé avant d'afficher la version du paquet. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | | `style` | `"bold 208"` | Le style du module. | | `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | Disables the `package` module. | +| `disabled` | `false` | Désactive le module `package`. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v1.0.0` | The version of your package | +| version | `v1.0.0` | La version de votre package | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2160,32 +2163,32 @@ format = "via [🎁 $version](208 bold) " ## Perl -The `perl` module shows the currently installed version of [Perl](https://www.perl.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `perl` affiche la version actuellement installée de [Perl](https://www.perl.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: -- The 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` +- Le répertoire courant contient un fichier `Makefile.PL` ou `Build.PL` +- Le répertoire courant contient un fichier `cpanfile` ou `cpanfile.snapshot` +- Le répertoire courant contient un fichier `META.json` ou `META.yml` +- Le répertoire courant contient un fichier `.perl-version` +- Le répertoire courant contient un fichier `.pl`, `.pm` ou `.pod` ### Options | Option | Défaut | Description | | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | +| `format` | `"via [$symbol($version )]($style)"` | La chaîne de format pour le module. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | +| `symbol` | `"🐪 "` | Le symbole utilisé avant d'afficher la version de Perl | | `detect_extensions` | `["pl", "pm", "pod"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | | `style` | `"bold 149"` | Le style du module. | -| `disabled` | `false` | Disables the `perl` module. | +| `disabled` | `false` | Désactive le module `perl`. | ### Variables | Variable | Exemple | Description | | --------- | --------- | -------------------------------------- | -| version | `v5.26.1` | The version of `perl` | +| version | `v5.26.1` | La version de `perl` | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | @@ -2200,11 +2203,11 @@ format = "via [🦪 $version]($style) " ## PHP -The `php` module shows the currently installed version of [PHP](https://www.php.net/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: +Le module `php` affiche la version actuellement installée de [PHP](https://www.php.net/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: -- The current directory contains a `composer.json` file -- The current directory contains a `.php-version` file -- The current directory contains a `.php` extension +- Le répertoire courant contient un fichier `composer.json` +- Le répertoire courant contient un fichier `.php-version` +- Le répertoire courant contient un fichier avec l'extension `.php` ### Options @@ -2212,22 +2215,22 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | Format du module. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `symbol` | `"🐘 "` | Le symbole utilisé avant d'afficher la version de PHP. | | `detect_extensions` | `["php"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `["composer.json", ".php-version"]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[]` | Quels dossiers devraient activer ce module. | | `style` | `"147 bold"` | Le style du module. | -| `disabled` | `false` | Disables the `php` module. | +| `disabled` | `false` | Désactive le module `php`. | ### Variables | Variable | Exemple | Description | | --------- | -------- | -------------------------------------- | -| version | `v7.3.8` | The version of `php` | +| version | `v7.3.8` | La version de `php` | | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### Options + +| Option | Défaut | Description | +| ---------------- | -------------------------------- | ------------------------------------------------------------------------------------------ | +| `format` | `"via [$symbol$stack]($style) "` | La chaîne de format pour le module. | +| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | Le style du module. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variables + +| Variable | Exemple | Description | +| --------- | ---------- | -------------------------------------- | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| symbol | | Reflète la valeur de l'option `symbol` | +| style\* | | Reflète la valeur de l'option `style` | + +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style + +### Exemple + +#### With Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: @@ -2266,7 +2326,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2435,7 +2495,7 @@ By default the `red` module shows the currently installed version of [Red](https | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2475,7 +2535,7 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2514,7 +2574,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2554,7 +2614,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2571,31 +2631,35 @@ The `shell` module shows an indicator for currently used shell. ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration. ::: ### Options -| Option | Défaut | Description | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | Format du module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Défaut | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | Format du module. | +| `style` | `"white bold"` | Le style du module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables | Variable | Défaut | Description | | --------- | ------ | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemples @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2632,7 +2697,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2666,7 +2731,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2683,7 +2748,7 @@ The `status` module displays the exit code of the previous command. The module w ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration. ::: @@ -2722,7 +2787,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2767,7 +2832,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2791,16 +2856,16 @@ By default the Terraform version is not shown, since this is slow for current ve Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie: - The current directory contains a `.terraform` folder -- Current directory contains a file with the `.tf` or `.hcl` extensions +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### Options | Option | Défaut | Description | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | +| `format` | `"via [$symbol$workspace]($style) "` | La chaîne de format pour le module. | | `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Quelles extensions devraient activer ce module. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Quelles extensions devraient activer ce module. | | `detect_files` | `[]` | Quels fichiers devraient activer ce module. | | `detect_folders` | `[".terraform"]` | Quels dossiers devraient activer ce module. | | `style` | `"bold 105"` | Le style du module. | @@ -2815,11 +2880,11 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple -#### Avec la version de Terraform +#### With Terraform Version ```toml # ~/.config/starship.toml @@ -2828,7 +2893,7 @@ Par défaut le module sera activé si au moins l'une des conditions suivantes es format = "[🏎💨 $version$workspace]($style) " ``` -#### Sans la version de Terraform +#### Without Terraform version ```toml # ~/.config/starship.toml @@ -2843,7 +2908,7 @@ The `time` module shows the current **local** time. The `format` configuration v ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur `false` dans votre fichier de configuration. ::: @@ -2851,7 +2916,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | Option | Défaut | Description | | ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `format` | `"at [$time]($style) "` | The format string for the module. | +| `format` | `"at [$time]($style) "` | La chaîne de format pour le 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 | @@ -2868,7 +2933,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -2955,7 +3020,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -3022,7 +3087,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Reflète la valeur de l'option `symbol` | | style\* | `black bold dimmed` | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -3060,7 +3125,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | Reflète la valeur de l'option `symbol` | | style\* | | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style ### Exemple @@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### Options | Option | Défaut | Description | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3126,9 +3199,9 @@ The order in which custom modules are shown can be individually set by including | symbol | Reflète la valeur de l'option `symbol` | | style\* | Reflète la valeur de l'option `style` | -\*: This variable can only be used as a part of a style string +\* : Cette variable ne peut être utilisée que comme partie d'une chaîne de style -#### Commandes shell personnalisées +#### Custom command shell `shell` accepts a non-empty list of strings, where: @@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/fr-FR/faq/README.md b/docs/fr-FR/faq/README.md index aec1ea6d5..af89eab6c 100644 --- a/docs/fr-FR/faq/README.md +++ b/docs/fr-FR/faq/README.md @@ -56,41 +56,67 @@ Si vous obtenez une erreur du type "_version 'GLIBC_2.18' not found (required by sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` -## Je vois des symboles que je ne comprends pas et auxquels je ne m'attendais pas, que signifient-t-ils ? +## Why do I see `Executing command "..." timed out.` warnings? -Si vous voyez des symboles que vous ne reconnaissez pas, vous pouvez utiliser `starship explain` pour obtenir des explications concernant les modules actuellement affichés. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. -## Pourquoi ne vois-je pas de glyphe dans mon invite? +## I see symbols I don't understand or expect, what do they mean? -La cause la plus commune est la mauvaise configuration du système. Certaines distributions Linux ne sont pas équipées du support de police 'out of the box'. Vous devez vous assurer que: +If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. + +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + +## 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: - Votre locale est définie à une valeur UTF-8, comme `de_DE.UTF-8` ou `ja_JP.UTF-8`. Si `LC_ALL` n'est pas une valeur UTF-8, [vous aurez besoin de la modifier](https://www.tecmint.com/set-system-locales-in-linux/). - Vous avez une police emoji installée. La plupart des systèmes sont fournis avec une police emoji par défaut, mais certains (notamment Arch Linux) ne le font pas. Vous pouvez habituellement en installer un par le biais du gestionnaire de paquets de votre système -[noto emoji](https://www.google.com/get/noto/help/emoji/) est un choix populaire. - Vous utilisez une police [Nerd Font](https://www.nerdfonts.com/). -Pour tester votre système, exécutez les commandes suivantes dans un terminal : +To test your system, run the following commands in a terminal: ```sh echo -e "\xf0\x9f\x90\x8d" echo -e "\xee\x82\xa0" ``` -La première ligne doit produire un emoji [serpent](https://emojipedia.org/snake/), tandis que la seconde doit produire un symbole [de branche powerline (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). +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). -Si l'un ou l'autre des symboles ne parvient pas à s'afficher correctement, votre système est toujours mal configuré. Malheureusement, il est parfois difficile d'obtenir une configuration correcte. Les utilisateurs sur Discord peuvent être en mesure d'aider. Si les deux symboles s'affichent correctement, mais vous ne les voyez toujours pas dans starship, [soumettez un rapport de bogue !](https://github.com/starship/starship/issues/new/choose) +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) -## Comment désinstaller Starship ? +## How do I uninstall Starship? -Starship est tout aussi facile à désinstaller qu'à installer. +Starship is just as easy to uninstall as it is to install in the first place. 1. Supprimez les lignes de la configuration de votre shell (par exemple `~/.bashrc`) utilisées pour initialiser Starship. 1. Supprimez l'exécutable de Starship. -Si Starship a été installé à l'aide d'un gestionnaire de paquets, veuillez vous référer à leur documentation pour les instructions de désinstallation. +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. -Si Starship a été installé en utilisant le script d'installation, la commande suivante supprimera l'exécutable : +If Starship was installed using the install script, the following command will delete the binary: ```sh -# Trouver et supprimer l'exécutable starship +# Locate and delete the starship binary sh -c 'rm "$(which starship)"' ``` diff --git a/docs/fr-FR/guide/README.md b/docs/fr-FR/guide/README.md index 1b9ab93e2..be1a88f38 100644 --- a/docs/fr-FR/guide/README.md +++ b/docs/fr-FR/guide/README.md @@ -63,7 +63,7 @@ >Español   - -### Contributeurs financiers - -Devenez un contributeur financier et aidez-nous à soutenir notre communauté. [[Contribuer](https://opencollective.com/starship/contribute)] - -#### Particuliers - - - -#### Organisations - -Soutenez ce projet avec votre organisation. Votre logo apparaîtra ici avec un lien vers votre site Web. [[Contribuer](https://opencollective.com/starship/contribute)] - - - - - - - - - - - - ## 💭Inspiré par -Voyez ces travaux précédents qui ont contribué à inspirer la création de Starship. 🙏 +Please check out these previous works that helped inspire the creation of starship. 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Une invite de commande ZSH pour les astronautes. @@ -344,9 +316,9 @@ Voyez ces travaux précédents qui ont contribué à inspirer la création de St


- Icône de fusée de Starship + Starship rocket icon

## 📝 License -Copyright © 2019-présent, [Contributeurs Starship](https://github.com/starship/starship/graphs/contributors).
Ce projet est sous licence[ISC](https://github.com/starship/starship/blob/master/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/fr-FR/installing/README.md b/docs/fr-FR/installing/README.md index a02cfb489..ebfd9846c 100644 --- a/docs/fr-FR/installing/README.md +++ b/docs/fr-FR/installing/README.md @@ -35,9 +35,19 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Installation + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) -### Obtention du binaire +### Getting the Binary #### Impératif @@ -47,14 +57,14 @@ nix-env -iA nixos.starship #### Déclaration, utilisateur unique, via [home-manager](https://github.com/nix-community/home-manager) -Activez le module `programs.starship` dans votre fichier `home.nix`, et ajoutez vos paramètres +Enable the `programs.starship` module in your `home.nix` file, and add your settings ```nix { programs.starship = { enable = true; enableZshIntegration = true; - # Configuration écrite dans ~/.config/starship.toml + # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; @@ -69,7 +79,7 @@ Activez le module `programs.starship` dans votre fichier `home.nix`, et ajoutez } ``` -puis lancez +then run ```sh home-manager switch @@ -77,7 +87,7 @@ home-manager switch #### Déclaration, au niveau du système, avec NixOS -Ajoutez `pkgs.starship` à `environment.systemPackages` dans votre `configuration.nix`, puis exécutez +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch diff --git a/docs/fr-FR/presets/README.md b/docs/fr-FR/presets/README.md index 18bd527d8..7a12effbc 100644 --- a/docs/fr-FR/presets/README.md +++ b/docs/fr-FR/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### Configuration + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/id-ID/advanced-config/README.md b/docs/id-ID/advanced-config/README.md index 08ffd8802..ed27d2709 100644 --- a/docs/id-ID/advanced-config/README.md +++ b/docs/id-ID/advanced-config/README.md @@ -31,35 +31,47 @@ trap blastoff DEBUG # Trap DEBUG *sebelum* menjalankan starship eval $(starship init bash) ``` -## Mengubah Judul Window +## Custom pre-prompt and pre-execution Commands in PowerShell -Beberapa prompt shell dengan otomatis akan mengubah judul window-nya untukmu (mis. untuk merefleksikan direktori kerjamu). Fish bahkan mengaturnya sebagai bawaan. Starship tidak, tapi mudah saja untuk menambahkan fungsi tersebut ke dalam `bash` ataupun `zsh`. +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Namun, Starship memberikan beberapa cara supaya kamu bisa memasukkan fungsimu sendiri ke dalam prosedur prompt-rendering: -Pertama, buatlah fungsi untuk mengubah judul window (bekerja pada bash dan zsh): +Create a function named `Invoke-Starship-PreCommand` -```bash -function set_win_title(){ - echo -ne "\033]0; JUDUL_WINDOW_MU \007" +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") } ``` -Kamu bisa menggunakan variabel untuk mengkustomisasi judulnya (`$USER`, `$HOSTNAME`, dan `$PWD` adalah opsi yang populer). +## Change Window Title -Di dalam `bash`, atur fungsi berikut menjadi fungsi precmd untuk starship: +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" ``` -Dalam `zsh`, pada array `precmd_functions`, tambahkan: +In `zsh`, add this to the `precmd_functions` array: ```bash precmd_functions+=(set_win_title) ``` -Kalau kamu suka hasilnya, tambahkan baris (`~/.bashrc` or `~/.zshrc`) ke dalam file konfigurasi shell milikmu untuk membuatnya permanen. +If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. -Sebagai contoh, kalau kamu mau menampilkan lokasi direktori pada judul label terminalmu, tambahkan bagian berikut ke dalam `~/.bashrc` atau `~/.zshrc`: +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(){ @@ -68,13 +80,24 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill). -`right_format` saat ini hanya tersedia pada shell: elvish, fish, zsh. +`right_format` is currently supported for the following shells: elvish, fish, zsh. ### Contoh @@ -88,7 +111,7 @@ format = """$character""" right_format = """$all""" ``` -Menghasilkan prompt seperti berikut: +Produces a prompt like the following: ``` ▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s @@ -97,7 +120,7 @@ Menghasilkan prompt seperti berikut: ## Menata String -Style strings are a list of words, separated by whitespace. Kumpulan katanya tidak bersifat case sensitive (mis. `tebal` dan `TeBaL` dianggap sebagai string yang sama). Tiap-tiap kata berikut adalah opsinya: +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` - `italic` @@ -109,14 +132,14 @@ Style strings are a list of words, separated by whitespace. Kumpulan katanya tid - `` - `none` -yang mana `` merupakan sebuah penentu warna (dibahas di bawah). `fg:` dan `` untuk saat ini memiliki fungsi yang sama, meskipun bisa berubah di kemudian hari. `inverted` menggantikan warna pada latar depan dan belakang. Urutan kata pada string tidak jadi masalah. +where `` is a color specifier (discussed below). `fg:` and `` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter. -`none` bisa menimpa nilai token lainnya di dalam string jika Ia tidak termaksud dalam penentu warna pada `bg:` sebagai contoh, `fg:red none fg:blue` akan tetap menjadi string yang tidak memiliki penataan. `bg:none` menjadikan warna pada latar belakang sebagai warna bawaan. Jadi, nilai `fg:red bg:none` sama dengan `red` atau `fg:red` dan nilai `bg:green fg:red bg:none` juga sama dengan `fg:red` ataupun `red`. Mungkin akan jadi masalah untuk menggunakan `none` dengan token lainnya di kemudian hari. +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. -Penentuan warna bisa dilakukan dengan salah satu cara berikut: +A color specifier can be one of the following: - Warna terminal pada umumnya terdiri dari: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Untuk memperoleh varian warna yang lebih cerah, kamu dapat menggunakan token `bright-` (mis. `bright-white`). - Menuliskannya dengan menggunakan `#` dan diikuti oleh enam digit angka hexadesimal. Spesifikasi [kode heksadesimal pada warna RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp). - Menggunakan bilangan antara 0-255. Spesifikasi [8-bit Kode Warna ANSI](https://i.stack.imgur.com/KTSQa.png). -Jika warna yang dipakai pada latar depan/latar belakang banyak, maka warna yang terbaru pada string yang akan diprioritaskan. +If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/id-ID/config/README.md b/docs/id-ID/config/README.md index 1ece2bf5b..bc81a63ce 100644 --- a/docs/id-ID/config/README.md +++ b/docs/id-ID/config/README.md @@ -142,13 +142,13 @@ Berikut adalah opsi konfigurasi dari list yang bersifat prompt-wide. ### Opsi -| Opsi | Bawaan | Deskripsi | -| ----------------- | ------------------------------ | ---------------------------------------------------------------- | -| `fromat` | [link](#default-prompt-format) | Mengkonfigurasi format pada prompt. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | -| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | -| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | -| `add_newline` | `true` | Inserts blank line between shell prompts. | +| Opsi | Bawaan | Deskripsi | +| ----------------- | ------------------------------ | ---------------------------------------------------------------------- | +| `fromat` | [link](#default-prompt-format) | Mengkonfigurasi format pada prompt. | +| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `scan_timeout` | `30` | Batas waktu starpship untuk memindai file (dalam milidetik). | +| `command_timeout` | `500` | Batas waktu untuk perintah yang dijalankan starship (dalam milidetik). | +| `add_newline` | `true` | Memasukkan baris kosong antara prompt shell. | ### Contoh @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -252,13 +253,13 @@ format="$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +Module `aws` menampilkan region dan profil AWS terkini. Diperoleh dari variabel environment `AWS_REGION`, `AWS_DEFAULT_REGION`, dan `AWS_PROFILE` pada file `~/.aws/config`. Modul ini juga menampilkan penghitung waktu mundur kedaluwarsa ketika menggunakan temporer kredensial. -When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. +Ketika menggunakan [aws-vault](https://github.com/99designs/aws-vault), profil dibaca dari variabel environment `AWS_VAULT` dan tanggal kedaluwarsanya dibaca dari variabel environment `AWS_SESSION_EXPIRATION`. -When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. +Ketika menggunakan [awsu](https://github.com/kreuzwerker/awsu) profil dibaca dari variabel environment `AWSU_PROFILE`. -When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +Ketika menggunakan [AWSume](https://awsu.me) profil dibaca dari variabel environment `AWSUME_PROFILE` dan tanggal kedaluwarsanya dibaca dari variabel environment `AWSUME_EXPIRATION`. ### Opsi @@ -281,7 +282,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -326,7 +327,7 @@ symbol = "🅰 " ## Baterai -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%. +Modul `battery` menampilkan seberapa penuh baterai perangkat terisi dan status pengisiannya. Modulnya hanya dapat terlihat ketika baterai perangkat di bawah 10%. ### Opsi @@ -354,7 +355,7 @@ discharging_symbol = "💀 " ### Tampilan Baterai -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. Aturannya seperti yang ditunjukkan: +Opsi konfigurasi `display` digunakan untuk menentukan kapan indikator baterai harus ditampilkan (threshold), simbol mana yang akan digunakan (symbol), dan bagaimana seharusnya itu terlihat (style). Jika tidak ada `display` yang diberikan. Aturannya seperti yang ditunjukkan: ```toml [[battery.display]] @@ -362,11 +363,11 @@ threshold = 10 style = "bold red" ``` -The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. +Nilai bawaan untuk opsi `charging_symbol` dan `discharging_symbol` adalah nilai dari masing-masing opsi `charging_symbol` dan `discharging_symbol` dari nilai `battery`. #### Opsi -The `display` option is an array of the following table. +Opsi dari `display` merupakan sebuah array dari tabel berikut. | Opsi | Bawaan | Deskripsi | | -------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------- | @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -393,24 +394,24 @@ discharging_symbol = 💦 ## Karakter -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +Modul `character` menampilkan sebuah karakter (biasanya anak panah) di samping teks pada terminalmu. -The character will tell you whether the last command was successful or not. It can do this in two ways: +Karakter dapat memberitahu kamu apakah perintah terakhir berhasil atau tidak. Karakter dapat memberitahumu dengan dua cara ini: - mengganti warna (`red`/`green`) - mengganti bentuk (`❯`/`✖`) -By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). +Secara bawaan karakter hanya dapat mengganti warna. Jika kamu juga ingin mengganti bentuknya, perhatikan [contoh](#with-custom-error-shape) berikut. ::: peringatan -`error_symbol` is not supported on elvish and nu shell. +`error_symbol` tidak didukung pada elvish dan nu shell. ::: ::: peringatan -`vicmd_symbol` is only supported in fish and zsh. +`vicmd_symbol` hanya didukung pada fish dan zsh. ::: @@ -463,7 +464,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: +Modul `cmake` menampilkan versi terkini dari [CMake](https://cmake.org/) yang terpasang. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: - Direktori terkini yang berisikan sebuah file `CMakeLists.txt` - Direktori terkini yang berisikan sebuah file `CMakeCache.txt` @@ -489,7 +490,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ## COBOL / GNUCOBOL @@ -519,46 +520,46 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ## Durasi Perintah -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. +Modul `cmd_duration` menampilkan seberapa lama perintah sebelumnya membutuhkan waktu untuk dilaksanakan. Modulnya hanya akan ditampilkan jika perintahnya membutuhkan waktu lebih dari dua detik, atau ada nilai dari konfigurasi `min_time`. -::: warning Do not hook the DEBUG trap in Bash +::: jangan lakukan hook DEBUG trap dalam 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. +Jia kamu menjalankan Starship di `bash`, jangan lakukan hook DEBUG trap setelah menjalankan `eval $(starship init $0)`, atau modulnya **akan** rusak. ::: -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. +Pengguna Bash yang membutuhkan fungsi seperti preexec dapat menggunakan [kerangka kerja bash_preexec dari rcaloras](https://github.com/rcaloras/bash-preexec). Cukup dengan membuat array `preexec_functions` dan `precmd_functions` sebelum menjalankan `eval $(starship init $0)`, lalu lanjutkan seperti biasa. ### Opsi -| Opsi | Bawaan | Deskripsi | -| -------------------- | ----------------------------- | ---------------------------------------------------------- | -| `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) "` | Format dari modul. | -| `style` | `"bold yellow"` | Gaya penataan untuk modul. | -| `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). | +| Opsi | Bawaan | Deskripsi | +| -------------------- | ----------------------------- | ---------------------------------------------------------------- | +| `min_tim` | `2_000` | Durasi terpendek untuk menampilkan waktu (dalam milidetik). | +| `show_milliseconds` | `false` | Tampilkan milidetik sebagai ganti detik untuk durasinya. | +| `format` | `"took [$duration]($style) "` | Format dari modul. | +| `style` | `"bold yellow"` | Gaya penataan untuk modul. | +| `disabled` | `false` | Menonaktifkan modul `cmd_duration`. | +| `show_notifications` | `false` | Menampilkan notifikasi layar ketika perintah selesai. | +| `min_time_to_notify` | `45_000` | Durasi terpendek untuk menampilkan notifikasi (dalam milidetik). | -::: tip +::: saran -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`. +Menampilkan notifikasi layar memerlukan starship dikembangkan dengan dukungan dari `rust-notify`. Periksa apakah starship kamu mendukung notifikasi dengan menjalankan `STARSHIP_LOG=debug starship module cmd_duration -d 60000` ketika `show_notifications` diatur menjadi `true`. ::: ### Variabel -| Variabel | Contoh | Deskripsi | -| --------- | -------- | --------------------------------------- | -| duration | `16m40s` | The time it took to execute the command | -| style\* | | Menyalin nilai dari opsi `style` | +| Variabel | Contoh | Deskripsi | +| --------- | -------- | -------------------------------------------------- | +| duration | `16m40s` | Waktu yang dibutuhkan untuk menyelesaikan perintah | +| style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -574,32 +575,32 @@ format = "underwent [$duration](bold yellow)" The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. -::: tip +::: saran -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +Hal ini tidak menahan pengubah (modifier) prompt dari conda sendiri, kamu mungkin bisa menjalankan `conda config --set changeps1 False`. ::: ### Opsi -| Opsi | Bawaan | Deskripsi | -| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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"` | Gaya penataan untuk modul. | -| `format` | `"via [$symbol$environment]($style) "` | Format dari modul. | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | Disables the `conda` module. | +| Opsi | Bawaan | Deskripsi | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | Jumlah direktori yang dipotong oleh environment path, jika environment-nya dibuat melalui `conda create -p [path]`. `0` artinya tidak ada potongan. Lihat juga modul [`directory`](#directory). | +| `symbol` | `"🅒 "` | Simbol yang digunakan sebelum nama environment. | +| `style` | `"bold green"` | Gaya penataan untuk modul. | +| `format` | `"via [$symbol$environment]($style) "` | Format dari modul. | +| `ignore_base` | `true` | Mengabaikan `base` environment saat aktif. | +| `disabled` | `false` | Menonaktifkan modul `conda`. | ### Variabel | Variabel | Contoh | Deskripsi | | ----------- | ------------ | --------------------------------- | -| environment | `astronauts` | The current conda environment | +| environment | `astronauts` | Environment conda saat ini | | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -612,33 +613,33 @@ format = "[$symbol$environment](dimmed green) " ## Crystal -The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: +Modul `crystal` menampilkan versi terkini dari [Crystal](https://crystal-lang.org/) yang terpasang. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: -- The current directory contains a `shard.yml` file -- The current directory contains a `.cr` file +- Direktori terkini yang berisikan sebuah file `shard.yml` +- Direktori terkini yang berisikan sebuah file `.cr` ### Opsi | Opsi | Bawaan | Deskripsi | | ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `symbol` | `"🔮 "` | Simbol yang digunakan sebelum menampilkan versi crystal terkini. | | `format` | `"via [$symbol($version )]($style)"` | Format dari modul. | | `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | | `style` | `"bold red"` | Gaya penataan untuk modul. | | `detect_extensions` | `["cr"]` | Ekstensi mana yang sebaiknya memicu modul ini. | | `detect_files` | `["shard.yml"]` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | -| `disabled` | `false` | Disables the `crystal` module. | +| `disabled` | `false` | Menonaktifkan modul `crystal`. | ### Variabel | Variabel | Contoh | Deskripsi | | --------- | --------- | --------------------------------- | -| version | `v0.32.1` | The version of `crystal` | +| version | `v0.32.1` | Versi dari `crystal` | | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -651,11 +652,11 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of [Dart](https://dart.dev/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: +Modul `dart` menampilkan versi terkini dari [Dart](https://dart.dev/) yang terpasang. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: -- The current directory contains a file with `.dart` extension -- The current directory contains a `.dart_tool` directory -- The current directory contains a `pubspec.yaml`, `pubspec.yml` or `pubspec.lock` file +- Direktori terkini yang berisikan sebuah file berekstensi `.dart` +- Direktori terkini yang berisikan sebuah direktori `dart_tool` +- Direktori terkini yang berisikan sebuah file `pubspec.yaml`, `pubspec.yml` atau `pubspec.lock` ### Opsi @@ -663,22 +664,22 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | ------------------- | ------------------------------------------------- | ----------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | Format dari modul. | | `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `symbol` | `"🎯 "` | Sebuah format string yang melambangkan simbol Dart | | `detect_extensions` | `["dart"]` | Ekstensi mana yang sebaiknya memicu modul ini. | | `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[".dart_tool"]` | Folder mana yang sebaiknya memicul modul ini. | | `style` | `"bold blue"` | Gaya penataan untuk modul. | -| `disabled` | `false` | Disables the `dart` module. | +| `disabled` | `false` | Menonaktifkan modul `dart`. | ### Variabel | Variabel | Contoh | Deskripsi | | --------- | -------- | --------------------------------- | -| version | `v2.8.4` | The version of `dart` | +| version | `v2.8.4` | Versi dari `dart` | | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -691,8 +692,8 @@ format = "via [🔰 $version](bold red) " ## Deno -The `deno` module shows you your currently installed version of [Deno](https://deno.land/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: -- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file +Modul `deno` menampilkan versi terkini dari [Deno](https://deno.land/) yang terpasang. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: +- Direktori terkini yang berisikan sebuah file `mod.ts`, `mod.js`, `deps.ts` atau `deps.js` ### Opsi @@ -700,18 +701,18 @@ The `deno` module shows you your currently installed version of [Deno](https://d | ------------------- | -------------------------------------------- | ----------------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | Format dari modul. | | `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `symbol` | `🦕 "` | Sebuah format string yang melambangkan simbol Deno | | `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. | | `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | | `style` | `"green bold"` | Gaya penataan untuk modul. | -| `disabled` | `false` | Disables the `deno` module. | +| `disabled` | `false` | Menonaktifkan modul `deno`. | ### Variabel | Variabel | Contoh | Deskripsi | | --------- | -------- | --------------------------------- | -| version | `v1.8.3` | The version of `deno` | +| version | `v1.8.3` | Versi dari `deno` | | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | @@ -726,28 +727,28 @@ format = "via [🦕 $version](green bold) " ## Direktori -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. +Modul `directory` menampilkan arah ke direkori terkinimu, disingkat ke tiga folder induk. Direkrotimu juga akan disingkat ke root dari git repo di tempatmu berada saat ini. -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. +Ketika kamu menggunakan penataan pwd option fish, alih-alih menyembunyikan jalur yang disingkat, kamu akan melihat nama yang disingkat untuk tiap-tiap direktori berdasarkan dari jumlah nomor yang kamu aktifkan untuk opsi tersebut. -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`. +Sebagai contoh, untuk `~/Dev/Nix/nixpkgs/pkgs` dimana `nixpkgs` merupakan root repo-nya, dan lalu opsinya diset menjadi `1`. Kamu akan melihat `~/D/N/nixpkgs/pkgs`, sedangkan sebelumnya direktori tersebut harusnya `nixpkgs/pkgs`. ### Opsi -| Opsi | Bawaan | Deskripsi | -| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | -| `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) "` | Format dari modul. | -| `style` | `"bold cyan"` | Gaya penataan untuk modul. | -| `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. | +| Opsi | Bawaan | Deskripsi | +| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------------- | +| `truncation_length` | `3` | Jumlah dari folder induk yang harusnya disingkat oleh direktori saat ini. | +| `truncate_to_repo` | `true` | Apakah harus menyingkat root dari git repo tempatmu berada saat ini. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Format dari modul. | +| `style` | `"bold cyan"` | Gaya penataan untuk modul. | +| `disabled` | `false` | Menonaktifkan modul `directory`. | +| `read_only` | `"🔒"` | Simbol yang mengindikasikan direktori saat ini bersifat read only. | +| `read_only_style` | `"red"` | Corak gaya untuk simbol read only. | +| `truncation_symbol` | `""` | Simbol untuk awalan jalur yang disingkat. misalnya: ".../" | +| `home_symbol` | `"~"` | Simbol yang mengindikasikan direktori home. |
-This module has a few advanced configuration options that control how the directory is displayed. +Modul ini memilki beberapa opsi konfigurasi lanjutan yang mengontrol bagaimana direktori ditampilkan. | Advanced Option | Bawaan | Deskripsi | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -771,10 +772,10 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Variabel | Contoh | Deskripsi | | --------- | --------------------- | -------------------------------- | -| path | `"D:/Projects"` | The current directory path | +| path | `"D:/Projects"` | Direktori terkini | | style\* | `"black bold dimmed"` | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -788,30 +789,30 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### Opsi -| Opsi | Bawaan | Deskripsi | -| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | Format dari modul. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `only_with_files` | `true` | Only show when there's a match | -| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | -| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | Gaya penataan untuk modul. | -| `disabled` | `false` | Disables the `docker_context` module. | +| Opsi | Bawaan | Deskripsi | +| ------------------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | Format dari modul. | +| `symbol` | `"🐳 "` | Simbol yang digunakan sebelum menampilkan Docker context. | +| `only_with_files` | `true` | Hanya ditampilkan jika terdapat kecocokan | +| `detect_extensions` | `[]` | Extensions mana yang harusnya memicu modul (butuh `only_with_files` untuk diset true). | +| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | filenames mana yang harusnya memicu modul ini (butuh `only_with_files` untuk diset true). | +| `detect_folders` | `[]` | Folder mana yang harusnya memicu modul (butuh `only_with_files` untuk diset true). | +| `style` | `"blue bold"` | Gaya penataan untuk modul. | +| `disabled` | `false` | Menonaktifkan module `docket_context`. | ### Variabel | Variabel | Contoh | Deskripsi | | --------- | -------------- | --------------------------------- | -| context | `test_context` | The current docker context | +| context | `test_context` | Docker context terkini | | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -824,9 +825,9 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 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. +Modul `dotnet` menampilkan informasi terkait versi dari [.NET Core SDK](https://dotnet.microsoft.com/) pada direktori terkini. Apabila SDK telah disematkan pada direktori terkni, maka veri yang telah disematkan tersebutlah yang ditampilkan. Jika tidak, maka modul akan menampilkan versi SDK terkini. -By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: +Secara bawaan, modul ini hanya akan ditampilkan ke prompt kamu ketika teradapat satu atau lebih file berikut di dalam direktorimu saat ini: - `global.json` - `project.json` @@ -837,11 +838,11 @@ By default this module will only be shown in your prompt when one or more of the - `*.fsproj` - `*.xproj` -You'll also need the .NET Core SDK installed in order to use it correctly. +Kamu juga perlu memasang .NET Core SDK untuk menggunakannya dengan baik. -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. +Secara internal, modul ini menggunakan mekenasimenya sendiri untuk melakukan pendeteksian versi. Biasanya, hal ini dua kali lebih cepat seperti untuk menjalankan `dotnet --version`, tetapi ada kemungkinan hal ini akan menampilkan versi yang salah jika proyek .NET milikmu memiliki tata letak direktori yang tidak biasa. Jika menurutmu akurasi lebih penting dari kecepatan, kamu dapat menonaktifkan mekanisme tersebut dengan mengatur `heuristic = false` di dalam opsi modul. -The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. +Modul ini juga akan menampilkan Target Framework Moniker () ketika terdapat sebuah file csproj di dalam direktori terkini. ### Opsi @@ -849,24 +850,24 @@ The module will also show the Target Framework Moniker ( ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. @@ -2147,7 +2150,7 @@ The `package` module is shown when the current directory is the repository for a | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2202,7 +2205,7 @@ format = "via [🦪 $version]($style) " The `php` module shows the currently installed version of [PHP](https://www.php.net/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: -- The current directory contains a `composer.json` file +- Direktori terkini yang berisikan sebuah file `composer.json` - The current directory contains a `.php-version` file - The current directory contains a `.php` extension @@ -2227,7 +2230,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: saran + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### Opsi + +| Opsi | Bawaan | Deskripsi | +| ---------------- | -------------------------------- | ----------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | Gaya penataan untuk modul. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variabel + +| Variabel | Contoh | Deskripsi | +| --------- | ---------- | --------------------------------- | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| symbol | | Menyalin nilai dari opsi `symbol` | +| style\* | | Menyalin nilai dari opsi `style` | + +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string + +### Contoh + +#### With Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: @@ -2266,7 +2326,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2311,7 +2371,7 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini | | `disabled` | `false` | Disables the `python` module. | -::: tip +::: saran 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. @@ -2435,7 +2495,7 @@ By default the `red` module shows the currently installed version of [Red](https | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2475,7 +2535,7 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2514,7 +2574,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2554,7 +2614,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2569,7 +2629,7 @@ symbol = "🌟 " The `shell` module shows an indicator for currently used shell. -::: tip +::: saran This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Opsi -| Opsi | Bawaan | Deskripsi | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | Format dari modul. | -| `disabled` | `true` | Disables the `shell` module. | +| Opsi | Bawaan | Deskripsi | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | Format dari modul. | +| `style` | `"white bold"` | Gaya penataan untuk modul. | +| `disabled` | `true` | Disables the `shell` module. | ### Variabel | Variabel | Bawaan | Deskripsi | | --------- | ------ | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2632,7 +2697,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2666,7 +2731,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2681,7 +2746,7 @@ format = '[📦 \[$env\]]($style) ' The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. -::: tip +::: saran This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -2722,7 +2787,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2767,7 +2832,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2782,7 +2847,7 @@ format = "via [🏎 $version](red bold)" The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. -::: tip +::: saran By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). @@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: - The current directory contains a `.terraform` folder -- Current directory contains a file with the `.tf` or `.hcl` extensions +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### Opsi @@ -2800,7 +2865,7 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Ekstensi mana yang sebaiknya memicu modul ini. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Ekstensi mana yang sebaiknya memicu modul ini. | | `detect_files` | `[]` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[".terraform"]` | Folder mana yang sebaiknya memicul modul ini. | | `style` | `"bold 105"` | Gaya penataan untuk modul. | @@ -2811,11 +2876,11 @@ Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi: | Variabel | Contoh | Deskripsi | | --------- | ---------- | --------------------------------- | | version | `v0.12.24` | The version of `terraform` | -| workspace | `default` | The current Terraform workspace | +| workspace | `bawaan` | The current Terraform workspace | | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2841,7 +2906,7 @@ format = "[🏎💨 $workspace]($style) " The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. -::: tip +::: saran This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. @@ -2868,7 +2933,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -2892,7 +2957,7 @@ The `username` module shows active user's username. The module will be shown if - The user is currently connected as an SSH session - The variable `show_always` is set to true -::: tip +::: saran 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. @@ -2955,7 +3020,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -3022,7 +3087,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | `black bold dimmed` | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -3060,7 +3125,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | Menyalin nilai dari opsi `symbol` | | style\* | | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string ### Contoh @@ -3083,29 +3148,37 @@ These modules will be shown if any of the following conditions are met: - The `when` command returns 0 - The current Operating System (std::env::consts::OS) matchs with `os` field if defined. -::: tip +::: saran Multiple custom modules can be defined by using a `.`. ::: -::: tip +::: saran 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 +::: saran [Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there! ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### Opsi | Opsi | Bawaan | Deskripsi | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3126,7 +3199,7 @@ The order in which custom modules are shown can be individually set by including | symbol | Menyalin nilai dari opsi `symbol` | | style\* | Menyalin nilai dari opsi `style` | -\*: This variable can only be used as a part of a style string +\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string #### Custom command shell @@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/id-ID/faq/README.md b/docs/id-ID/faq/README.md index fa45b6fb8..e3783255a 100644 --- a/docs/id-ID/faq/README.md +++ b/docs/id-ID/faq/README.md @@ -56,10 +56,36 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` +## Why do I see `Executing command "..." timed out.` warnings? + +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. + ## I see symbols I don't understand or expect, what do they mean? If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + ## 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: diff --git a/docs/id-ID/guide/README.md b/docs/id-ID/guide/README.md index a41013780..57daad077 100644 --- a/docs/id-ID/guide/README.md +++ b/docs/id-ID/guide/README.md @@ -181,7 +181,7 @@ #### Pasang Melalui Package Manager - ##### Example: [Homebrew](https://brew.sh/): + ##### Dengan [Homebrew](https://brew.sh/): ```sh brew install starship @@ -304,34 +304,6 @@ 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)]. - - -### 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. 🙏 diff --git a/docs/id-ID/installing/README.md b/docs/id-ID/installing/README.md index 26c270000..561a7fe9f 100644 --- a/docs/id-ID/installing/README.md +++ b/docs/id-ID/installing/README.md @@ -35,6 +35,16 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Installation + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) ### Getting the Binary diff --git a/docs/id-ID/presets/README.md b/docs/id-ID/presets/README.md index 446504b89..2227bcf36 100644 --- a/docs/id-ID/presets/README.md +++ b/docs/id-ID/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### Konfigurasi + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/it-IT/advanced-config/README.md b/docs/it-IT/advanced-config/README.md index 9da84da98..9010549c7 100644 --- a/docs/it-IT/advanced-config/README.md +++ b/docs/it-IT/advanced-config/README.md @@ -31,35 +31,47 @@ trap blastoff DEBUG # Trap DEBUG *prima* di eseguire starship eval $(starship bash) ``` -## Cambia il titolo della finestra +## Custom pre-prompt and pre-execution Commands in PowerShell -Alcune shell prompt cambieranno automaticamente il titolo della finestra (ad esempio per riflettere la directory di lavoro). Fish lo fa per impostazione predefinita. Starship non lo fa, ma è abbastanza semplice aggiungere questa funzionalità a `bash` o `zsh`. +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Tuttavia, Starship dà la limitata possibilità di inserire le tue funzioni nella procedura prompt-rendering: -Innanzitutto, bisogna definire una funzione per il cambio del titolo della finestra (identica sia per bash che zsh): +Create a function named `Invoke-Starship-PreCommand` -```bash -function set_win_title(){ - echo -ne "\033]0; IL_TUO_TITOLO_QUI \007" +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") } ``` -Puoi usare delle variabili per personalizzare questo titolo (`$USER`, `$HOSTNAME`, e `$PWD` sono le scelte più popolari). +## Change Window Title -In `bash`, impostare questa funzione per essere la precmd Starship function: +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`, aggiungi questo `precmd_functions` all'array: +In `zsh`, add this to the `precmd_functions` array: ```bash precmd_functions+=(set_win_title) ``` -Se ti piace il risultato, aggiungi queste righe al tuo file shell di configurazione (`~/.bashrc` o `~/.zshrc`) per renderlo permanente. +If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. -Ad esempio, se desideri visualizzare la directory corrente nel titolo della scheda del terminale, aggiungi la seguente snippet al tuo `~/.bashrc` or `~/.zshrc`: +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(){ @@ -68,6 +80,17 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. @@ -76,7 +99,7 @@ Note: The right prompt is a single line following the input location. To right a `right_format` is currently supported for the following shells: elvish, fish, zsh. -### Example +### Esempio ```toml # ~/.config/starship.toml diff --git a/docs/it-IT/config/README.md b/docs/it-IT/config/README.md index 5963aac8d..93dd96a53 100644 --- a/docs/it-IT/config/README.md +++ b/docs/it-IT/config/README.md @@ -75,7 +75,7 @@ Un gruppo di testo è composto da due parti diverse. La prima parte, che è racchiusa tra `[]`, è una [format string](#format-strings). È possibile aggiungere testi, variabili o anche gruppi annidati di testo. -Nella seconda parte, che è racchiusa tra `()`, è un [style string](#style-strings). This can be used to style the first part. +Nella seconda parte, che è racchiusa tra `()`, è presente una [style string](#style-strings). Questa può essere usata per modificare lo stile della prima parte. Per esempio: @@ -146,9 +146,9 @@ This is the list of prompt-wide configuration options. | ----------------- | ------------------------------ | ---------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | Configura il formato del prompt. | | `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | -| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | -| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | -| `add_newline` | `true` | Inserts blank line between shell prompts. | +| `scan_timeout` | `30` | Timeout per starship per scansionare i file (in millisecondi). | +| `command_timeout` | `500` | Timeout per i comandi eseguiti da starship (in millisecondi). | +| `add_newline` | `true` | Inserisce una riga vuota tra i prompt della shell. | ### Esempio @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -260,20 +261,20 @@ When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. -### Options +### Opzioni | Opzione | Default | Descrizione | | ------------------- | -------------------------------------------------------------------- | ----------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\])]($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. | +| `style` | `"bold yellow"` | Lo stile per il modulo. | | `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. | | `disabled` | `false` | Disables the `AWS` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | ---------------- | ------------------------------------------- | | region | `ap-northeast-1` | The current AWS region | | profile | `astronauts` | The current AWS profile | @@ -328,7 +329,7 @@ symbol = "🅰 " 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 +### Opzioni | Opzione | Default | Descrizione | | -------------------- | --------------------------------- | --------------------------------------------------- | @@ -341,7 +342,7 @@ The `battery` module shows how charged the device's battery is and its current c | `display` | [link](#battery-display) | Display threshold and style for the module. | | `disabled` | `false` | Disables the `battery` module. | -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -364,7 +365,7 @@ style = "bold red" The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. -#### Options +#### Opzioni The `display` option is an array of the following table. @@ -375,7 +376,7 @@ The `display` option is an array of the following table. | `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. | | `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. | -#### Example +#### Esempio ```toml [[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -414,7 +415,7 @@ By default it only changes color. If you also want to change its shape take a lo ::: -### Options +### Opzioni | Opzione | Default | Descrizione | | ---------------- | ------------------- | -------------------------------------------------------------------------------- | @@ -426,7 +427,7 @@ By default it only changes color. If you also want to change its shape take a lo ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | -------- | ------- | --------------------------------------------------------------------- | | symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | @@ -468,22 +469,22 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak - The current directory contains a `CMakeLists.txt` file - The current directory contains a `CMakeCache.txt` file -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"△ "` | The symbol used before the version of cmake. | -| `detect_extensions` | `[]` | Which extensions should trigger this module | -| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | -| `detect_folders` | `[]` | Which folders should trigger this module | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `cmake` module. | +| Opzione | Default | Descrizione | +| ------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"△ "` | The symbol used before the version of cmake. | +| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo | +| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Quali nomi di file dovrebbero attivare questo modulo | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo | +| `style` | `"bold blue"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `cmake` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | --------- | ------------------------------------ | | version | `v3.17.3` | The version of cmake | | symbol | | Mirrors the value of option `symbol` | @@ -498,22 +499,22 @@ The `cobol` module shows the currently installed version of COBOL. By default, t - The current directory contains any files ending in `.cob` or `.COB` - The current directory contains any files ending in `.cbl` or `.CBL` -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold blue"` | The style for the module. | -| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `disabled` | `false` | Disables the `cobol` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | +| `symbol` | `"⚙️ "` | The symbol used before displaying the version of COBOL. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `style` | `"bold blue"` | Lo stile per il modulo. | +| `detect_extensions` | `["cbl", "cob", "CBL", "COB"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `disabled` | `false` | Disables the `cobol` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | ---------- | ------------------------------------ | | version | `v3.1.2.0` | The version of `cobol` | | symbol | | Mirrors the value of option `symbol` | @@ -533,14 +534,14 @@ If you are running Starship in `bash`, do not hook the `DEBUG` trap after runnin 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 +### Opzioni | Opzione | Default | Descrizione | | -------------------- | ----------------------------- | ---------------------------------------------------------- | | `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. | +| `style` | `"bold yellow"` | Lo stile per il modulo. | | `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). | @@ -553,14 +554,14 @@ Showing desktop notifications requires starship to be built with `rust-notify` s ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | -------- | --------------------------------------- | | 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 +### Esempio ```toml # ~/.config/starship.toml @@ -580,20 +581,20 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ::: -### Options +### Opzioni | Opzione | Default | Descrizione | | ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | +| `style` | `"bold green"` | Lo stile per il modulo. | | `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 | Descrizione | +| Variable | Esempio | Descrizione | | ----------- | ------------ | ------------------------------------ | | environment | `astronauts` | The current conda environment | | symbol | | Mirrors the value of option `symbol` | @@ -601,7 +602,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -617,22 +618,22 @@ The `crystal` module shows the currently installed version of [Crystal](https:// - The current directory contains a `shard.yml` file - The current directory contains a `.cr` file -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold red"` | The style for the module. | -| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | -| `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `disabled` | `false` | Disables the `crystal` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | +| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `style` | `"bold red"` | Lo stile per il modulo. | +| `detect_extensions` | `["cr"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `["shard.yml"]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `disabled` | `false` | Disables the `crystal` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | --------- | ------------------------------------ | | version | `v0.32.1` | The version of `crystal` | | symbol | | Mirrors the value of option `symbol` | @@ -640,7 +641,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -657,22 +658,22 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d - The current directory contains a `.dart_tool` directory - The current directory contains a `pubspec.yaml`, `pubspec.yml` or `pubspec.lock` file -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | -| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. | -| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".dart_tool"]` | Which folders should trigger this module. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `dart` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `detect_extensions` | `["dart"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[".dart_tool"]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `"bold blue"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `dart` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | -------- | ------------------------------------ | | version | `v2.8.4` | The version of `dart` | | symbol | | Mirrors the value of option `symbol` | @@ -680,7 +681,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -694,28 +695,28 @@ format = "via [🔰 $version](bold red) " The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: - The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | -| `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"green bold"` | The style for the module. | -| `disabled` | `false` | Disables the `deno` module. | +| Opzione | Default | Descrizione | +| ------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `"green bold"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `deno` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | -------- | ------------------------------------ | | version | `v1.8.3` | The version of `deno` | | symbol | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -732,14 +733,14 @@ When using the fish style pwd option, instead of hiding the path that is truncat 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 +### Opzioni | Opzione | Default | Descrizione | | ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | | `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | | `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | | `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | -| `style` | `"bold cyan"` | The style for the module. | +| `style` | `"bold cyan"` | Lo stile per il modulo. | | `disabled` | `false` | Disables the `directory` module. | | `read_only` | `"🔒"` | The symbol indicating current directory is read only. | | `read_only_style` | `"red"` | The style for the read only symbol. | @@ -769,14 +770,14 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | --------------------- | ----------------------------------- | | 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 +### Esempio ```toml # ~/.config/starship.toml @@ -788,9 +789,9 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). -### Options +### Opzioni | Opzione | Default | Descrizione | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | @@ -800,12 +801,12 @@ The `docker_context` module shows the currently active [Docker context](https:// | `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | | `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | | `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | The style for the module. | +| `style` | `"blu grassetto"` | Lo stile per il modulo. | | `disabled` | `false` | Disables the `docker_context` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | -------------- | ------------------------------------ | | context | `test_context` | The current docker context | | symbol | | Mirrors the value of option `symbol` | @@ -813,7 +814,7 @@ The `docker_context` module shows the currently active [Docker context](https:// \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -843,23 +844,23 @@ Internally, this module uses its own mechanism for version detection. Typically The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. | -| `heuristic` | `true` | Use faster version detection to keep starship snappy. | -| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. | -| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this modules. | -| `style` | `"bold blue"` | The style for the module. | -| `disabled` | `false` | Disables the `dotnet` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. | +| `heuristic` | `true` | Use faster version detection to keep starship snappy. | +| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Which folders should trigger this modules. | +| `style` | `"bold blue"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `dotnet` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | ---------------- | ------------------------------------------------------------------ | | version | `v3.1.201` | The version of `dotnet` sdk | | tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | @@ -868,7 +869,7 @@ The module will also show the Target Framework Moniker ( ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ----------------- | --------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `"bold 208"` | The style for the module. | -| `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | Disables the `package` module. | +| Opzione | Default | Descrizione | +| ----------------- | --------------------------------- | -------------------------------------------------------------------------------------------- | +| `format` | `"is [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `style` | `"bold 208"` | Lo stile per il modulo. | +| `display_private` | `false` | Abilita la visualizzazione della versione per i pacchetti contrassegnati come privati. | +| `disabled` | `false` | Disabilita il modulo `package`. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | -------- | ------------------------------------ | | version | `v1.0.0` | The version of your package | | symbol | | Mirrors the value of option `symbol` | @@ -2149,7 +2152,7 @@ The `package` module is shown when the current directory is the repository for a \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -2168,28 +2171,28 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe - The current directory contains a `.perl-version` file - The current directory contains a `.pl`, `.pm` or `.pod` -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | -| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this module. | -| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 149"` | The style for the module. | -| `disabled` | `false` | Disables the `perl` module. | +| Opzione | Default | Descrizione | +| ------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl | +| `detect_extensions` | `["pl", "pm", "pod"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `"bold 149"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `perl` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | --------- | ------------------------------------ | | version | `v5.26.1` | The version of `perl` | | symbol | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -2206,22 +2209,22 @@ The `php` module shows the currently installed version of [PHP](https://www.php. - The current directory contains a `.php-version` file - The current directory contains a `.php` extension -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | -| `detect_extensions` | `["php"]` | Which extensions should trigger this module. | -| `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"147 bold"` | The style for the module. | -| `disabled` | `false` | Disables the `php` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `detect_extensions` | `["php"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `["composer.json", ".php-version"]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `"147 bold"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `php` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | -------- | ------------------------------------ | | version | `v7.3.8` | The version of `php` | | symbol | | Mirrors the value of option `symbol` | @@ -2229,7 +2232,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### Opzioni + +| Opzione | Default | Descrizione | +| ---------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variables + +| Variable | Esempio | Descrizione | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Esempio + +#### With Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: @@ -2245,22 +2305,22 @@ The `purescript` module shows the currently installed version of [PureScript](ht - The current directory contains a `spago.dhall` file - The current directory contains a file with the `.purs` extension -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | -| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. | -| `detect_files` | `["spago.dhall"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold white"` | The style for the module. | -| `disabled` | `false` | Disables the `purescript` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `["purs"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `["spago.dhall"]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `"bold white"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `purescript` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | -------- | ------------------------------------ | | version | `0.13.5` | The version of `purescript` | | symbol | | Mirrors the value of option `symbol` | @@ -2268,7 +2328,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -2295,21 +2355,21 @@ By default the module will be shown if any of the following conditions are met: - The current directory contains a file with the `.py` extension. - A virtual environment is currently activated -### Options +### Opzioni -| Opzione | Default | Descrizione | -| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | -| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐍 "` | A format string representing the symbol of 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 | -| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | -| `detect_extensions` | `["py"]` | Which extensions should trigger this module | -| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Which filenames should trigger this module | -| `detect_folders` | `[]` | Which folders should trigger this module | -| `disabled` | `false` | Disables the `python` module. | +| Opzione | Default | Descrizione | +| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------- | +| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"🐍 "` | A format string representing the symbol of Python | +| `style` | `"yellow bold"` | Lo stile per il modulo. | +| `pyenv_version_name` | `false` | Use pyenv to get Python version | +| `pyenv_prefix` | `pyenv` | Prefix before pyenv version display, only used if pyenv is used | +| `python_binary` | `["python", "python3", "python2"]` | Configures the python binaries that Starship should executes when getting the version. | +| `detect_extensions` | `["py"]` | Quali estensioni dovrebbero attivare questo modulo | +| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Quali nomi di file dovrebbero attivare questo modulo | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo | +| `disabled` | `false` | Disables the `python` module. | ::: tip @@ -2321,7 +2381,7 @@ The default values and order for `python_binary` was chosen to first identify th ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | ------------ | --------------- | ------------------------------------------ | | version | `"v3.8.1"` | The version of `python` | | symbol | `"🐍 "` | Mirrors the value of option `symbol` | @@ -2329,7 +2389,7 @@ The default values and order for `python_binary` was chosen to first identify th | pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | | virtualenv | `"venv"` | The current `virtualenv` name | -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -2378,28 +2438,28 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr - The current directory contains a `.Rprofile` file - The current directory contains a `.Rproj.user` folder -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"📐"` | A format string representing the symbol of R. | -| `style` | `"blue bold"` | The style for the module. | -| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module | -| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module | -| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module | -| `disabled` | `false` | Disables the `r` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"📐"` | A format string representing the symbol of R. | +| `style` | `"blu grassetto"` | Lo stile per il modulo. | +| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Quali estensioni dovrebbero attivare questo modulo | +| `detect_files` | `[".Rprofile"]` | Quali nomi di file dovrebbero attivare questo modulo | +| `detect_folders` | `[".Rproj.user"]` | Quali cartelle dovrebbero attivare questo modulo | +| `disabled` | `false` | Disables the `r` module. | ### Variables -| Variable | Example | Descrizione | -| -------- | ------------- | ------------------------------------ | -| version | `v4.0.5` | The version of `R` | -| symbol | | Mirrors the value of option `symbol` | -| style | `"blue bold"` | Mirrors the value of option `style` | +| Variable | Esempio | Descrizione | +| -------- | ----------------- | ------------------------------------ | +| version | `v4.0.5` | The version of `R` | +| symbol | | Mirrors the value of option `symbol` | +| style | `"blu grassetto"` | Mirrors the value of option `style` | -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -2414,22 +2474,22 @@ By default the `red` module shows the currently installed version of [Red](https - The current directory contains a file with `.red` or `.reds` extension -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | -| `detect_extensions` | `["red"]` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"red bold"` | The style for the module. | -| `disabled` | `false` | Disables the `red` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"🔺 "` | A format string representing the symbol of Red. | +| `detect_extensions` | `["red"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `"red bold"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `red` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | -------- | ------------------------------------ | | version | `v2.5.1` | The version of `red` | | symbol | | Mirrors the value of option `symbol` | @@ -2437,7 +2497,7 @@ By default the `red` module shows the currently installed version of [Red](https \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -2454,22 +2514,22 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt - The current directory contains a `.ruby-version` file - The current directory contains a `.rb` file -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | -| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. | -| `detect_files` | `["Gemfile", ".ruby-version"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `ruby` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `["rb"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `["Gemfile", ".ruby-version"]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `"bold red"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `ruby` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | -------- | ------------------------------------ | | version | `v2.5.1` | The version of `ruby` | | symbol | | Mirrors the value of option `symbol` | @@ -2477,7 +2537,7 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -2493,22 +2553,22 @@ By default the `rust` module shows the currently installed version of [Rust](htt - The current directory contains a `Cargo.toml` file - The current directory contains a file with the `.rs` extension -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | -| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. | -| `detect_files` | `["Cargo.toml"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold red"` | The style for the module. | -| `disabled` | `false` | Disables the `rust` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"🦀 "` | A format string representing the symbol of Rust | +| `detect_extensions` | `["rs"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `["Cargo.toml"]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `"bold red"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `rust` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | ----------------- | ------------------------------------ | | version | `v1.43.0-nightly` | The version of `rustc` | | symbol | | Mirrors the value of option `symbol` | @@ -2516,7 +2576,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -2533,22 +2593,22 @@ The `scala` module shows the currently installed version of [Scala](https://www. - The current directory contains a file with the `.scala` or `.sbt` extension - The current directory contains a directory named `.metals` -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. | -| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. | -| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | -| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | -| `style` | `"red dimmed"` | The style for the module. | -| `disabled` | `false` | Disables the `scala` module. | +| Opzione | Default | Descrizione | +| ------------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------- | +| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `detect_extensions` | `["sbt", "scala"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[".metals"]` | Which folders should trigger this modules. | +| `symbol` | `"🆂 "` | A format string representing the symbol of Scala. | +| `style` | `"red dimmed"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `scala` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | -------- | ------------------------------------ | | version | `2.13.5` | The version of `scala` | | symbol | | Mirrors the value of option `symbol` | @@ -2556,7 +2616,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -2575,27 +2635,31 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ::: -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | The format for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Opzione | Default | Descrizione | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | The format for the module. | +| `style` | `"white bold"` | Lo stile per il modulo. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables | Variable | Default | Descrizione | | --------- | ------- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: This variable can only be used as a part of a style string ### Examples @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2613,7 +2678,7 @@ disabled = false The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/internalvariables.html#SHLVLREF) ("shell level") environment variable, if it is set to a number and meets or exceeds the specified threshold. -### Options +### Opzioni | Opzione | Default | Descrizione | | ----------- | ---------------------------- | ------------------------------------------------------------- | @@ -2621,12 +2686,12 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | `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. | +| `style` | `"bold yellow"` | Lo stile per il modulo. | | `disabled` | `true` | Disables the `shlvl` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | ------- | ------------------------------------ | | shlvl | `3` | The current value of `SHLVL` | | symbol | | Mirrors the value of option `symbol` | @@ -2634,7 +2699,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -2649,18 +2714,18 @@ threshold = 3 The `singularity` module shows the current [Singularity](https://sylabs.io/singularity/) image, if inside a container and `$SINGULARITY_NAME` is set. -### Options +### Opzioni | Opzione | Default | Descrizione | | ---------- | -------------------------------- | ------------------------------------------------ | | `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. | +| `style` | `"bold dimmed blue"` | Lo stile per il modulo. | | `disabled` | `false` | Disables the `singularity` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | ------------ | ------------------------------------ | | env | `centos.img` | The current Singularity image | | symbol | | Mirrors the value of option `symbol` | @@ -2668,7 +2733,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -2689,7 +2754,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ::: warning This module is not supported on elvish and nu shell. ::: -### Options +### Opzioni | Opzione | Default | Descrizione | | ----------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- | @@ -2700,7 +2765,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `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. | +| `style` | `"bold red"` | Lo stile per il modulo. | | `recognize_signal_code` | `true` | Enable signal mapping from exit code | | `map_symbol` | `false` | Enable symbols mapping from exit code | | `pipestatus` | `false` | Enable pipestatus reporting | @@ -2710,7 +2775,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | -------------- | ------- | ------------------------------------------------------------------------------------------- | | status | `127` | The exit code of the last command | | int | `127` | The exit code of the last command | @@ -2724,7 +2789,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml @@ -2746,22 +2811,22 @@ By default the `swift` module shows the currently installed version of [Swift](h - The current directory contains a `Package.swift` file - The current directory contains a file with the `.swift` extension -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | -| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. | -| `detect_files` | `["Package.swift"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"bold 202"` | The style for the module. | -| `disabled` | `false` | Disables the `swift` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"🐦 "` | A format string representing the symbol of Swift | +| `detect_extensions` | `["swift"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `["Package.swift"]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `"bold 202"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `swift` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | -------- | ------------------------------------ | | version | `v5.2.4` | The version of `swift` | | symbol | | Mirrors the value of option `symbol` | @@ -2769,7 +2834,7 @@ By default the `swift` module shows the currently installed version of [Swift](h \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -2791,24 +2856,24 @@ By default the Terraform version is not shown, since this is slow for current ve By default 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 +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | -| `style` | `"bold 105"` | The style for the module. | -| `disabled` | `false` | Disables the `terraform` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"💠"` | A format string shown before the terraform workspace. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[".terraform"]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `"bold 105"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `terraform` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | ---------- | ------------------------------------ | | version | `v0.12.24` | The version of `terraform` | | workspace | `default` | The current Terraform workspace | @@ -2817,7 +2882,7 @@ By default the module will be shown if any of the following conditions are met: \*: This variable can only be used as a part of a style string -### Example +### Esempio #### With Terraform Version @@ -2847,7 +2912,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ::: -### Options +### Opzioni | Opzione | Default | Descrizione | | ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | @@ -2863,14 +2928,14 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | ---------- | ----------------------------------- | | 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 +### Esempio ```toml # ~/.config/starship.toml @@ -2898,7 +2963,7 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` ::: -### Options +### Opzioni | Opzione | Default | Descrizione | | ------------- | ----------------------- | ------------------------------------- | @@ -2910,12 +2975,12 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | -------- | ------------ | ------------------------------------------------------------------------------------------- | | `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 +### Esempio ```toml # ~/.config/starship.toml @@ -2934,22 +2999,22 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// - The current directory contains a `Vagrantfile` file -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | -| `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `["Vagrantfile"]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"cyan bold"` | The style for the module. | -| `disabled` | `false` | Disables the `vagrant` module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. | +| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `["Vagrantfile"]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `"cyan bold"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `vagrant` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | ---------------- | ------------------------------------ | | version | `Vagrant 2.2.10` | The version of `Vagrant` | | symbol | | Mirrors the value of option `symbol` | @@ -2957,7 +3022,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -2972,28 +3037,28 @@ The `vlang` module shows you your currently installed version of [V](https://vla - The current directory contains a file with `.v` extension - The current directory contains a `v.mod`, `vpkg.json` or `.vpkg-lock.json` file -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"V "` | A format string representing the symbol of V | -| `detect_extensions` | `["v"]` | Which extensions should trigger this module. | -| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `"blue bold"` | The style for the module. | -| `disabled` | `false` | Disables the `vlang` module. | +| Opzione | Default | Descrizione | +| ------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"V "` | A format string representing the symbol of V | +| `detect_extensions` | `["v"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | +| `style` | `"blu grassetto"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `vlang` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | ------- | ------------------------------------ | | version | `v0.2` | The version of `v` | | symbol | | Mirrors the value of option `symbol` | | style\* | | Mirrors the value of option `style` | -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -3005,18 +3070,18 @@ format = "via [V $version](blue bold) " The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use. -### Options +### Opzioni | Opzione | Default | Descrizione | | ---------- | -------------------------------- | ------------------------------------------------------ | | `symbol` | | The symbol used before displaying the repository name. | -| `style` | `"bold yellow"` | The style for the module. | +| `style` | `"bold yellow"` | Lo stile per il modulo. | | `format` | `"vcsh [$symbol$repo]($style) "` | The format for the module. | | `disabled` | `false` | Disables the `vcsh` module. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | ------------------------------------------- | ------------------------------------ | | repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name | | symbol | | Mirrors the value of option `symbol` | @@ -3024,7 +3089,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -3039,22 +3104,22 @@ By default the the `zig` module shows the currently installed version of [Zig](h - The current directory contains a `.zig` file -### Options +### Opzioni -| Opzione | Default | Descrizione | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `zig` module. | -| `detect_extensions` | `["zig"]` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | +| Opzione | Default | Descrizione | +| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format for the module. | +| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` | +| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. | +| `style` | `"bold yellow"` | Lo stile per il modulo. | +| `disabled` | `false` | Disables the `zig` module. | +| `detect_extensions` | `["zig"]` | Quali estensioni dovrebbero attivare questo modulo. | +| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. | +| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | ### Variables -| Variable | Example | Descrizione | +| Variable | Esempio | Descrizione | | --------- | -------- | ------------------------------------ | | version | `v0.6.0` | The version of `zig` | | symbol | | Mirrors the value of option `symbol` | @@ -3062,7 +3127,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h \*: This variable can only be used as a part of a style string -### Example +### Esempio ```toml # ~/.config/starship.toml @@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including ::: -### Options +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + +### Opzioni | Opzione | Default | Descrizione | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3113,7 +3186,7 @@ The order in which custom modules are shown can be individually set by including | `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. | +| `style` | `"bold green"` | Lo stile per il modulo. | | `format` | `"[$symbol($output )]($style)"` | The format for the module. | | `disabled` | `false` | Disables this `custom` module. | | `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). | @@ -3157,19 +3230,19 @@ Automatic detection of shells and proper parameters addition are currently imple ::: -### Example +### Esempio ```toml # ~/.config/starship.toml [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/it-IT/faq/README.md b/docs/it-IT/faq/README.md index eb70cf7d3..1b07949b4 100644 --- a/docs/it-IT/faq/README.md +++ b/docs/it-IT/faq/README.md @@ -56,41 +56,67 @@ Se si ottiene un errore come "_versione 'GLIBC_2. 8' non trovato (richiesta da S sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` -## Vedo simboli che non capisco o mi aspetto, cosa significano? +## Why do I see `Executing command "..." timed out.` warnings? -Se vedi simboli che non riconosci puoi usare `starship explain` per la spiegazione dei moduli correntemente mostrato. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. -## Perché non vedo un simbolo di glifo nel mio prompt? +## I see symbols I don't understand or expect, what do they mean? -La causa più comune è la configurazione errata del sistema. Alcune distribuzioni Linux in particolare non vengono fornite con il supporto dei font come impostazione predefinita. È necessario assicurarsi che: +If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. + +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + +## 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: - In locale sia impostato un valore UTF-8, come `de_DE.UTF-8` o `ja_JP.UTF-8`. Se `LC_ALL` non è un valore UTF-8, [dovrai cambiarlo](https://www.tecmint.com/set-system-locales-in-linux/). - Hai un font emoji installato. La maggior parte dei sistemi ha un font emoji per impostazione predefinita, ma alcuni (in particolare Arch Linux) non lo fanno. Di solito puoi installarne uno attraverso il gestore dei pacchetti del tuo sistema-[noto emoji](https://www.google.com/get/noto/help/emoji/) è uno dei popolari. - Stai usando un [font Nerd](https://www.nerdfonts.com/). -Per testare il sistema, eseguire i seguenti comandi in un terminale: +To test your system, run the following commands in a terminal: ```sh echo -e "\xf0\x9f\x90\x8d" echo -e "\xee\x82\xa0" ``` -La prima riga dovrebbe riprodurre una [emoji di un serpente](https://emojipedia.org/snake/), mentre la seconda dovrebbe riprodurre il [simbolo powerline di ramo (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). +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). -Se uno dei due simboli non viene visualizzato correttamente, il sistema è ancora mal configurato. Sfortunatamente, ottenere la configurazione dei caratteri corretta a volte è difficile. Gli utenti su Discord potrebbero essere in grado di aiutarti. Se entrambi i simboli vengono visualizzati correttamente, ma non li vedi ancora in starship, [segnala un bug!](https://github.com/starship/starship/issues/new/choose) +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) -## Come posso disinstallare Starship? +## How do I uninstall Starship? -Starship è altrettanto facile da disinstallare come lo è da installare. +Starship is just as easy to uninstall as it is to install in the first place. 1. Rimuovi qualsiasi riga utilizzata per inizializzare Starship nella configurazione della tua shell (ad es. `~/.bashrc`). 1. Elimina il binario di Starship. -Se Starship è stato installato utilizzando un gestore di pacchetti, fai riferimento alla documentazione per le istruzioni di disinstallazione. +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. -Se Starship è stato installato utilizzando lo script di installazione, il seguente comando eliminerà il file binario: +If Starship was installed using the install script, the following command will delete the binary: ```sh -# Individua ed elimina il binario di starship +# Locate and delete the starship binary sh -c 'rm "$(which starship)"' ``` diff --git a/docs/it-IT/guide/README.md b/docs/it-IT/guide/README.md index 360412792..d3f973cc0 100644 --- a/docs/it-IT/guide/README.md +++ b/docs/it-IT/guide/README.md @@ -181,7 +181,7 @@ #### Installa via Package Manager - ##### Esempio: [Homebrew](https://brew.sh/): + ##### Con [Homebrew](https://brew.sh/): ```sh brew install starship @@ -304,37 +304,9 @@ Se parli correntemente una lingua diversa dall'inglese, apprezziamo molto qualsi Se sei interessato ad aiutare a contribuire a Starship, dai un'occhiata alla nostra [Guida al Contributo](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Inoltre, sentiti libero di entrare nel nostro [server Discord](https://discord.gg/8Jzqu3T) e dire ciao. 👋 -### Contributori di codice - -Questi progetto esiste grazie a tutte le persone che contribuiscono. [[Contributo](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. - - -### Contributori Finanziari - -Diventa un contributore finanziario e aiutaci a sostenere la nostra comunità. [[Contribuisci](https://opencollective.com/starship/contribute)] - -#### Privati - - - -#### Organizzazioni - -Supporta questo progetto con la tua organizzazione. Il tuo logo apparirà qui con un link al tuo sito web. [[Contribuisci](https://opencollective.com/starship/contribute)] - - - - - - - - - - - - ## 💭 Ispirato Da -Ti invito di controllare questi lavori precedenti che hanno contribuito a ispirare la creazione di Starship. 🙏 +Please check out these previous works that helped inspire the creation of starship. 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Un prompt ZSH per astronauti. @@ -349,4 +321,4 @@ Ti invito di controllare questi lavori precedenti che hanno contribuito a ispira ## 📝 Licenza -Copyright © 2019-presente, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
Questo progetto è sotto licenza [ISC](https://github.com/starship/starship/blob/master/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/it-IT/installing/README.md b/docs/it-IT/installing/README.md index ebd18d9a3..5a0c84a9d 100644 --- a/docs/it-IT/installing/README.md +++ b/docs/it-IT/installing/README.md @@ -35,9 +35,19 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Installazione + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) -### Ottenere il Binario +### Getting the Binary #### Imperativo @@ -47,7 +57,7 @@ nix-env -iA nixos.starship #### Dichiarativo, singolo utente, tramite [home-manager](https://github.com/nix-community/home-manager) -Abilita il modulo `programs.starship` nel tuo file `home.nix` e aggiungi le tue impostazioni +Enable the `programs.starship` module in your `home.nix` file, and add your settings ```nix { @@ -69,7 +79,7 @@ Abilita il modulo `programs.starship` nel tuo file `home.nix` e aggiungi le tue } ``` -poi eseguire +then run ```sh home-manager switch @@ -77,7 +87,7 @@ home-manager switch #### Dichiarativa, di sistema, con NixOS -Aggiungi `pkgs.starship` a `environment.systemPackages` in `configuration.nix`, poi esegui +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch diff --git a/docs/it-IT/presets/README.md b/docs/it-IT/presets/README.md index ca8e990c6..e51e5125f 100644 --- a/docs/it-IT/presets/README.md +++ b/docs/it-IT/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### Configurazione + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/ja-JP/README.md b/docs/ja-JP/README.md index 9785d7dce..a90f4ccb5 100644 --- a/docs/ja-JP/README.md +++ b/docs/ja-JP/README.md @@ -143,7 +143,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ #### Nushell - ::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu. + ::: warning This will change in the future. nu バージョン 0.33 以降のみサポートされます。 ::: Add the following to your nu config file. nu で`config path`を実行することで、設定ファイルの場所を確認できます。 ```toml startup = [ @@ -157,7 +157,7 @@ description: Starship はミニマルで、非常に高速で、カスタマイ #### Xonsh - Add the following to the end of `~/.xonshrc`: + `~/.xonshrc` の最後に以下を追加してください: ```sh # ~/.xonshrc diff --git a/docs/ja-JP/advanced-config/README.md b/docs/ja-JP/advanced-config/README.md index d84175d4e..c7f5a9d16 100644 --- a/docs/ja-JP/advanced-config/README.md +++ b/docs/ja-JP/advanced-config/README.md @@ -31,11 +31,23 @@ trap blastoff DEBUG # starshipを起動する前にDEBUGをトラップす eval $(starship init bash) ``` -## ウィンドウのタイトルの変更 +## Custom pre-prompt and pre-execution Commands in PowerShell -いくつかのシェルプロンプトはあなたのためにウィンドウのタイトルを自動的に変更します(例えば、カレントディレクトリを反映するために)。 特に Fish はデフォルトで変更を行います。 Starship はこれをしませんが、この機能を `bash` や `zsh` に追加することは簡単にできます。 +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. ただし、Starship はプロンプトを描画する一連の流れに、限定的に独自の関数を挿入することができます。 -まず、ウィンドウのタイトルを変更する関数を定義してください( bash も zsh も同様に) +Create a function named `Invoke-Starship-PreCommand` + +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") +} +``` + +## 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(){ @@ -43,23 +55,23 @@ function set_win_title(){ } ``` -タイトルをカスタマイズするために変数を利用することができます (`$USER` 、 `$HOSTNAME`、 `$PWD` が一般的です)。 +You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). -`bash` では関数を starship の precmd 関数としてセットしてください。 +In `bash`, set this function to be the precmd starship function: ```bash starship_precmd_user_func="set_win_title" ``` -`zsh`では関数を `precmd_functions` の配列に追加してください。 +In `zsh`, add this to the `precmd_functions` array: ```bash precmd_functions+=(set_win_title) ``` -もし結果に満足したら、永続化のためそれぞれの行をシェルの設定ファイル (`~/.bashrc` もしくは `~/.zshrc`) に追加してください。 +If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. -たとえば、現在のディレクトリをターミナルタブのタイトルに表示したい場合は、 `~/.bashrc`または`~/.zshrc`に以下のスニペットを追加します。 +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(){ @@ -68,13 +80,24 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` -## Enable Right Prompt +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. -Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} -Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill). +Invoke-Expression (&starship init powershell) +``` -`right_format` is currently supported for the following shells: elvish, fish, zsh. +## 右プロンプトの有効化 + +シェルによっては、入力と同じ行にレンダリングされる右プロンプトをサポートしています。 Starship では `right_format` オプションを使って右プロンプトの内容を設定できます。 `format`で使用できるモジュールはすべて`right_format`でも使用できます。 変数`$all`には、`format`や`right_format`で明示的に使用されていないモジュールのみが格納されます。 + +注意: 右プロンプトは入力の場所に続く単一の行です。 複数行のプロンプトで入力行の上を右寄せにするには、[fillモジュール](/config/#fill)を参照してください。 + +`right_format` は現在、次のシェルでサポートされています: elvish, fish, zsh ### 設定例 @@ -88,7 +111,7 @@ format = """$character""" right_format = """$all""" ``` -Produces a prompt like the following: +次のようなプロンプトが生成されます: ``` ▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s diff --git a/docs/ja-JP/config/README.md b/docs/ja-JP/config/README.md index a1de56070..692ed3552 100644 --- a/docs/ja-JP/config/README.md +++ b/docs/ja-JP/config/README.md @@ -146,9 +146,9 @@ format = ''' | ----------------- | ------------------------------ | ---------------------------------------------------------------- | | `format` | [link](#default-prompt-format) | プロンプトの形式を設定します。 | | `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | -| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | -| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | -| `add_newline` | `true` | Inserts blank line between shell prompts. | +| `scan_timeout` | `30` | ファイルをスキャンする際のタイムアウト時間 (milliseconds) です。 | +| `command_timeout` | `500` | Starshipによって実行されたコマンドのタイムアウト時間 (milliseconds) です。 | +| `add_newline` | `true` | シェルプロンプトの間に空行を挿入します。 | ### 設定例 @@ -213,6 +213,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -253,11 +254,11 @@ format="$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +`aws` モジュールは現在のAWSプロファイルが表示されます。 これは `~/.aws/config` に記述されている `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` 環境変数に基づいています。 This module also shows an expiration timer when using temporary credentials. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. -When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. +[awsu](https://github.com/kreuzwerker/awsu) を使う場合、そのプロファイルは環境変数 `AWSU_PROFILE` から読まれます。 When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. @@ -282,7 +283,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -327,7 +328,7 @@ symbol = "🅰 " ## バッテリー -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%. +`battery`モジュールは、デバイスのバッテリー残量と現在の充電状態を示します。 モジュールは、デバイスのバッテリー残量が10%未満の場合にのみ表示されます。 ### オプション @@ -355,7 +356,7 @@ discharging_symbol = "💀 " ### バッテリーの表示 -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. デフォルトは次のとおりです。 +`display`オプションを使用して、バッテリーインジケーターを表示するタイミング(threshold)、どのシンボルが使われるか(symbol) と外観(style)を定義します。 `display` が提供されない場合、 デフォルトは次のとおりです。 ```toml [[battery.display]] @@ -363,11 +364,11 @@ threshold = 10 style = "bold red" ``` -The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. +`charging_symbol`と`discharging_symbol`オプションのデフォルト値はそれぞれ`battery`の `charging_symbol`と`discharging_symbol`になります。 #### オプション -The `display` option is an array of the following table. +`display`オプションは、次の表の通りです。 | オプション | デフォルト | 説明 | | -------------------- | ---------- | -------------------------------------------------------------------------------------- | @@ -386,7 +387,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -394,24 +395,24 @@ discharging_symbol = 💦 ## 文字 -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +`character`モジュールは、端末でテキストが入力される場所の横に文字(通常は矢印)を表示します。 -The character will tell you whether the last command was successful or not. It can do this in two ways: +characterは、最後のコマンドが成功したかどうかを示します。 表し方は下記の2つです。 - 色の変更 (`赤`/`緑`) - プロンプトの表示の変更 (`❯`/`✖`) -By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). +デフォルトでは、色だけが変更されます。 形も変えてみたい場合は[このサンプル](#with-custom-error-shape)も参考にしてください。 ::: warning -`error_symbol` is not supported on elvish and nu shell. +`error_symbol`はelvishとnu shellでサポートされていません。 ::: ::: warning -`vicmd_symbol` is only supported in fish and zsh. +`vicmd_symbol`はfishとzshのみでサポートされています。 ::: @@ -464,7 +465,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: +`cmake`モジュールは、現在インストールされている[Cmake](https://cmake.org/)のバージョンを表示します。 デフォルトでは次のいずれかの条件が満たされると、モジュールがアクティブになります。 - カレントディレクトリに `CMakeLists.txt` ファイルが含まれている - カレントディレクトリに `CMakeCache.txt` ファイルが含まれている @@ -490,11 +491,11 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ## COBOL / GNUCOBOL -The `cobol` module shows the currently installed version of COBOL. By default, the module will be shown if any of the following conditions are met: +`COBOL` モジュールは、現在インストールされているCOBOLのバージョンを表示します。 By default, the module will be shown if any of the following conditions are met: - The current directory contains any files ending in `.cob` or `.COB` - The current directory contains any files ending in `.cbl` or `.CBL` @@ -520,46 +521,46 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ## Command Duration -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. +`cmd_duration`モジュールは、最後のコマンドの実行にかかった時間を示します。 モジュールが表示されるのは、コマンドが2秒以上かかった場合、または`min_time`値が存在する場合のみです。 -::: warning Do not hook the DEBUG trap in Bash +::: warning BashでDEBUGトラップをhookしない -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`でStarshipを実行している場合、 `eval $(starship init $0)`実行した後に`DEBUG`トラップをフックしないでください。そうしないと、このモジュールが**おそらくですが**壊れます。 ::: -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. +preexecのような機能を必要とするBashユーザーは、 [rcalorasのbash_preexecフレームワーク](https://github.com/rcaloras/bash-preexec)を使用できます。 `eval $(starship init $0)` を実行する前に、`preexec_functions`、および`precmd_functions`定義するだけで、通常どおり続行します。 ### オプション -| オプション | デフォルト | 説明 | -| -------------------- | ----------------------------- | ---------------------------------------------------------- | -| `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) "` | moduleのフォーマットです。 | -| `style` | `"bold yellow"` | モジュールのスタイルです。 | -| `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). | +| オプション | デフォルト | 説明 | +| -------------------- | ----------------------------- | --------------------------- | +| `min_time` | `2_000` | 実行時間を表示する最短期間(ミリ秒単位)です。 | +| `show_milliseconds` | `false` | 実行時間の秒に加えてミリ秒を表示します。 | +| `format` | `"took [$duration]($style) "` | moduleのフォーマットです。 | +| `style` | `"bold yellow"` | モジュールのスタイルです。 | +| `disabled` | `false` | `cmd_duration`モジュールを無効にします。 | +| `show_notifications` | `false` | コマンドが完了したらデスクトップ通知を表示します。 | +| `min_time_to_notify` | `45_000` | 通知を持続する最短期間(ミリ秒単位) | ::: 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`. +デスクトップ通知を表示するには、 `rust-notify` をサポートしているstarshipをビルドする必要があります。 `show_notifications` が `true` となっている状態で `STARSHIP_LOG=debug starship module cmd_duration -d 60000` を実行することにより、starshipが通知をサポートしているかを確認することができます。 ::: ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------- | --------------------------------------- | -| duration | `16m40s` | The time it took to execute the command | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------- | ---------------------- | +| duration | `16m40s` | コマンドの実行時間 | +| style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -577,30 +578,30 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e ::: tip -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +Note: これはconda自身の プロンプト修飾子 を抑制しません。`conda config --set changeps1 False` で実行することができます。 ::: ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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"` | モジュールのスタイルです。 | -| `format` | `"via [$symbol$environment]($style) "` | moduleのフォーマットです。 | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | Disables the `conda` module. | +| オプション | デフォルト | 説明 | +| ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | 環境が`conda create -p [path]`で作成された場合、環境パスが切り捨てられるディレクトリ数。 `0`は切り捨てがないことを意味します。 [`directory`](#directory)もご覧ください。 | +| `symbol` | `"🅒 "` | 環境名の直前に使用されるシンボルです。 | +| `style` | `"bold green"` | モジュールのスタイルです。 | +| `format` | `"via [$symbol$environment]($style) "` | moduleのフォーマットです。 | +| `ignore_base` | `true` | アクティブになった時、環境`base`を無視します。 | +| `disabled` | `false` | `conda`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| ----------- | ------------ | ----------------------------- | -| environment | `astronauts` | The current conda environment | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| ----------- | ------------ | ---------------------- | +| environment | `astronauts` | 現在の conda 環境 | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -613,33 +614,33 @@ format = "[$symbol$environment](dimmed green) " ## Crystal -The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 +`crystal`モジュールは、現在インストールされている[Crystal](https://crystal-lang.org/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 -- The current directory contains a `shard.yml` file -- The current directory contains a `.cr` file +- カレントディレクトリに`shard.yml`ファイルが含まれている +- カレントディレクトリに`.cr`の拡張子のファイルが含まれている ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | ------------------------------------ | --------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | -| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `style` | `"bold red"` | モジュールのスタイルです。 | -| `detect_extensions` | `["cr"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["shard.yml"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `disabled` | `false` | Disables the `crystal` module. | +| オプション | デフォルト | 説明 | +| ------------------- | ------------------------------------ | ------------------------------------------------------ | +| `symbol` | `"🔮 "` | Crystalのバージョンを表示する前に使用される記号です。 | +| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | +| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `style` | `"bold red"` | モジュールのスタイルです。 | +| `detect_extensions` | `["cr"]` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `["shard.yml"]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | +| `disabled` | `false` | `crystal`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------- | ------------------------ | -| version | `v0.32.1` | The version of `crystal` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --------- | ---------------------- | +| version | `v0.32.1` | `crystal` のバージョン | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -652,11 +653,11 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of [Dart](https://dart.dev/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 +`dart`モジュールは、現在インストールされている[Dart](https://dart.dev/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 -- The current directory contains a file with `.dart` extension -- The current directory contains a `.dart_tool` directory -- The current directory contains a `pubspec.yaml`, `pubspec.yml` or `pubspec.lock` file +- カレントディレクトリに`.dart`の拡張子のファイルが含まれている +- カレントディレクトリに`.dart_tool`ディレクトリが含まれている +- カレントディレクトリに`pubspec.yaml`, `pubspec.yml`,もしくは`pubspec.lock`が含まれている ### オプション @@ -664,22 +665,22 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | ------------------- | ------------------------------------------------- | ------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 | | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `symbol` | `"🎯 "` | Dartのシンボルを表すフォーマット文字列 | | `detect_extensions` | `["dart"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[".dart_tool"]` | どのフォルダーがこのモジュールをアクティブにするか | | `style` | `"bold blue"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `dart` module. | +| `disabled` | `false` | `dart`モジュールを無効にします。 | ### 変数 | 変数 | 設定例 | 説明 | | --------- | -------- | ---------------------- | -| version | `v2.8.4` | The version of `dart` | +| version | `v2.8.4` | `dart` のバージョン | | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -692,8 +693,8 @@ format = "via [🔰 $version](bold red) " ## Deno -The `deno` module shows you your currently installed version of [Deno](https://deno.land/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 -- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file +`deno`モジュールは、現在インストールされている[Deno](https://deno.land/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 +- カレントディレクトリに`mod.ts`、`mod.js`、`deps.ts`か`deps.js`が含まれている ### オプション @@ -701,18 +702,18 @@ The `deno` module shows you your currently installed version of [Deno](https://d | ------------------- | -------------------------------------------- | ------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `symbol` | `"🦕 "` | Dart のシンボルを表すフォーマット文字列 | | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | | `style` | `"green bold"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `deno` module. | +| `disabled` | `false` | `deno`モジュールを無効化します。 | ### 変数 | 変数 | 設定例 | 説明 | | --------- | -------- | ---------------------- | -| version | `v1.8.3` | The version of `deno` | +| version | `v1.8.3` | `deno`のバージョン | | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | @@ -727,33 +728,33 @@ format = "via [🦕 $version](green bold) " ## 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. +`directory`モジュールには、現在のディレクトリへのパスが表示され、3つの親フォルダは切り捨てられます。 ディレクトリは、現在のgitリポジトリであるとルートとなります。 -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. +fishスタイルのpwdオプションを使用すると、切り捨てられたパスを非表示にする代わりに、オプションで有効にした番号に基づいて各ディレクトリの短縮名が表示されます。 -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`. +例として、`~/Dev/Nix/nixpkgs/pkgs`で、`nixpkgs`がリポジトリルートであり、オプションが`1`に設定されている場合を挙げます。 以前は`nixpkgs/pkgs`でしたが、`~/D/N/nixpkgs/pkgs`が表示されます。 ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | -| `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) "` | moduleのフォーマットです。 | -| `style` | `"bold cyan"` | モジュールのスタイルです。 | -| `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. | +| オプション | デフォルト | 説明 | +| ------------------- | -------------------------------------------------- | ------------------------------------------------ | +| `truncation_length` | `3` | 現在のディレクトリを切り捨てる親フォルダーの数です。 | +| `truncate_to_repo` | `true` | 現在いるgitリポジトリのルートに切り捨てるかどうかです。 | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | moduleのフォーマットです。 | +| `style` | `"bold cyan"` | モジュールのスタイルです。 | +| `disabled` | `false` | `directory`モジュールを無効にします。 | +| `read_only` | `"🔒"` | このシンボルが表示されている時、現在のディレクトリは読み取り専用です。 | +| `read_only_style` | `"red"` | 読み取り専用シンボルのスタイルです。 | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. 例: "…/" | +| `home_symbol` | `"~"` | ホームディレクトリを示すシンボルです。 |
-This module has a few advanced configuration options that control how the directory is displayed. +このモジュールは、どのようにディレクトリを表示するかについての高度なオプションをいくつか持っています。 | Advanced Option | デフォルト | 説明 | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | +| `fish_style_pwd_dir_length` | `0` | fish shellのpwdパスロジックを適用するときに使用する文字数です。 | | `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. | `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. @@ -770,12 +771,12 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------------------- | -------------------------- | -| path | `"D:/Projects"` | The current directory path | -| style\* | `"black bold dimmed"` | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --------------------- | ---------------------- | +| path | `"D:/Projects"` | カレントディレクトリのパス | +| style\* | `"black bold dimmed"` | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -789,30 +790,30 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | moduleのフォーマットです。 | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `only_with_files` | `true` | Only show when there's a match | -| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | -| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `docker_context` module. | +| オプション | デフォルト | 説明 | +| ------------------- | ---------------------------------- | -------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | moduleのフォーマットです。 | +| `symbol` | `"🐳 "` | Dockerコンテキストを表示する前に使用される記号です。 | +| `only_with_files` | `true` | ファイルに一致する場合にのみ表示 | +| `detect_extensions` | `[]` | どの拡張子がこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 | +| `detect_files` | `The format for the module.` | どんなファイル名がこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 | +| `detect_folders` | `[]` | どんなフォルダがこのモジュールをトリガーするか(`only_with_files`がtrueになっている必要があります)。 | +| `style` | `"blue bold"` | モジュールのスタイルです。 | +| `disabled` | `false` | `docker_context`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------------- | -------------------------- | -| context | `test_context` | The current docker context | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------------- | ---------------------- | +| context | `test_context` | 現在の Docker コンテキスト | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -825,9 +826,9 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 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. +`dotnet`モジュールはカレントディレクトリに関係する[.NET Core SDK](https://dotnet.microsoft.com/)のバージョンを表示します。 もし SDKは現在のディレクトリに固定されているのであれば、その固定されたバージョンが表示されます。 それ以外の場合、モジュール SDKの最新のインストールバージョンを示します。 -By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: +デフォルトでは、このモジュールは現在のディレクトリに以下のファイルが 存在する場合にのみプロンプトで表示されます: - `global.json` - `project.json` @@ -840,34 +841,34 @@ By default this module will only be shown in your prompt when one or more of the You'll also need the .NET Core SDK installed in order to use it correctly. -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. +内部的に、このモジュールは自身のバージョン検知のメカニズムを利用します。 `dotnet --version` を実行するより2倍速く実行できますが、.NET project一般的でないディレクトリlayoutの場合は間違ったバージョンが示されてしまうことがあります。 速度よりも精度が重要な場合は、次の方法でメカニズムを無効にできます。 モジュールオプションで`heuristic = false `を設定します。 The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | -| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | moduleのフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. | -| `heuristic` | `true` | Use faster version detection to keep starship snappy. | -| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `dotnet` module. | +| オプション | デフォルト | 説明 | +| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | moduleのフォーマットです。 | +| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `".NET "` | dotnetのバージョンを表示する前に使用される記号です。 | +| `heuristic` | `true` | より高速なバージョン検出を使用して、starshipの動作を維持します。 | +| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | +| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `disabled` | `false` | `dotnet`モジュールを無効にします。 | ### 変数 | 変数 | 設定例 | 説明 | | --------- | ---------------- | ------------------------------------------------------------------ | -| version | `v3.1.201` | The version of `dotnet` sdk | +| version | `v3.1.201` | `dotnet sdk` のバージョンです | | tfm | `netstandard2.0` | The Target Framework Moniker that the current project is targeting | | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -884,7 +885,7 @@ heuristic = false The `elixir` module shows the currently installed version of [Elixir](https://elixir-lang.org/) and [Erlang/OTP](https://erlang.org/doc/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 -- The current directory contains a `mix.exs` file. +- カレントディレクトリに`mix.exs`ファイルが含まれている. ### オプション @@ -908,7 +909,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -923,11 +924,11 @@ symbol = "🔮 " The `elm` module shows the currently installed version of [Elm](https://elm-lang.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 -- 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 +- カレントディレクトリに`elm.json`ファイルが含まれている +- カレントディレクトリに`elm-package.json`ファイルが含まれている +- カレントディレクトリに`.elm-version`ファイルが含まれている +- カレントディレクトリに`elm-stuff`フォルダが含まれている +- カレントディレクトリに`*.elm`ファイルが含まれている ### オプション @@ -940,7 +941,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang | `detect_files` | `["elm.json", "elm-package.json", ".elm-version"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `["elm-stuff"]` | どのフォルダーがこのモジュールをアクティブにするか | | `style` | `"cyan bold"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `elm` module. | +| `disabled` | `false` | `elm`モジュールを無効にします。 | ### 変数 @@ -950,7 +951,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -963,10 +964,10 @@ format = "via [ $version](cyan bold) " ## Environment Variable -The `env_var` module displays the current value of a selected environment variables. The module will be shown only if any of the following conditions are met: +The `env_var` module displays the current value of a selected environment variables. 次の条件のいずれかが満たされると、モジュールが表示されます。 -- The `variable` configuration option matches an existing environment variable -- The `variable` configuration option is not defined, but the `default` configuration option is +- `variable`オプションが、既存の環境変数と一致する +- `variable`オプションが定義されておらず、`default`オプションが定義されている ::: tip Multiple environmental variables can be displayed by using a `.`. (see example) If the `variable` configuration option is not set, the module will display value of variable under the name of text after the `.` character. @@ -982,13 +983,13 @@ default = "unknown user" ### オプション -| オプション | デフォルト | 説明 | -| ---------- | ------------------------------ | ---------------------------------------------------------------------------- | -| `symbol` | | The symbol used before displaying the variable value. | -| `variable` | | The environment variable to be displayed. | -| `default` | | The default value to be displayed when the selected variable is not defined. | -| `format` | `"with [$env_value]($style) "` | moduleのフォーマットです。 | -| `disabled` | `false` | Disables the `env_var` module. | +| オプション | デフォルト | 説明 | +| ---------- | ------------------------------ | ------------------------------------- | +| `symbol` | `""` | 環境変数を表示する前に使用される記号です。 | +| `variable` | | 表示される環境変数です。 | +| `default` | | 上のvariableが定義されていない場合に表示されるデフォルトの値です。 | +| `format` | `"with [$env_value]($style) "` | moduleのフォーマットです。 | +| `disabled` | `false` | `env_var`モジュールを無効にします。 | ### 変数 @@ -998,7 +999,7 @@ default = "unknown user" | symbol | | オプション `記号` の値をミラーする | | style\* | `black bold dimmed` | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1025,8 +1026,8 @@ default = "unknown user" The `erlang` module shows the currently installed version of [Erlang/OTP](https://erlang.org/doc/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 -- The current directory contains a `rebar.config` file. -- The current directory contains a `erlang.mk` file. +- カレントディレクトリに`rebar.config`ファイルが含まれている. +- カレントディレクトリに`erlang.mk`ファイルが含まれている. ### オプション @@ -1039,17 +1040,17 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https: | `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["rebar.config", "elang.mk"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `disabled` | `false` | Disables the `erlang` module. | +| `disabled` | `false` | `erlang`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------- | ----------------------- | -| version | `v22.1.3` | The version of `erlang` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --------- | ---------------------- | +| version | `v22.1.3` | `erlang` のバージョン | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1062,14 +1063,15 @@ format = "via [e $version](bold red) " ## Fill -The `fill` module fills any extra space on the line with a symbol. If multiple `fill` modules are present in a line they will split the space evenly between them. This is useful for aligning other modules. +`fill` モジュールは行の余分なスペースを記号で埋めます。 一行に複数の`fill`モジュールが存在する場合、それらはスペースを均等に分割します。 これは、他のモジュールの位置合わせに便利です。 ### オプション -| オプション | デフォルト | 説明 | -| -------- | -------------- | --------------------------------- | -| `symbol` | `"."` | The symbol used to fill the line. | -| `style` | `"bold black"` | モジュールのスタイルです。 | +| オプション | デフォルト | 説明 | +| ---------- | -------------- | --------------------------------- | +| `symbol` | `"."` | The symbol used to fill the line. | +| `style` | `"bold black"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `fill` module | ### 設定例 @@ -1091,31 +1093,31 @@ AA -------------------------------------------- BB ----------------------------- ## Google Cloud (`gcloud`) -The `gcloud` module shows the current configuration for [`gcloud`](https://cloud.google.com/sdk/gcloud) CLI. This is based on the `~/.config/gcloud/active_config` file and the `~/.config/gcloud/configurations/config_{CONFIG NAME}` file and the `CLOUDSDK_CONFIG` env var. +`gcloud` モジュールは、 [`gcloud`](https://cloud.google.com/sdk/gcloud) CLIの現在の設定が表示されます。 これは `~/.config/gcloud/active_config` ファイルと `~/.config/gcloud/configurations/config_{CONFIG NAME}` ファイルと `CLOUDSDK_CONFIG` 環境変数に基づきます。 ### オプション -| オプション | デフォルト | 説明 | -| ---------------- | ---------------------------------------------------------- | --------------------------------------------------------------- | -| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | moduleのフォーマットです。 | -| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. | -| `region_aliases` | | Table of region aliases to display in addition to the GCP name. | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `gcloud` module. | +| オプション | デフォルト | 説明 | +| ---------------- | ---------------------------------------------------------- | ----------------------------- | +| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | moduleのフォーマットです。 | +| `symbol` | `"☁️ "` | 現在のGCPプロファイルを表示する前に表示される記号です。 | +| `region_aliases` | | GCP名に加えて表示するリージョンのエイリアスです。 | +| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `disabled` | `false` | `gcloud`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | ------------- | ------------------------------------------------------------------ | -| region | `us-central1` | The current GCP region | -| account | `foo` | The current GCP profile | -| domain | `example.com` | The current GCP profile domain | -| project | | The current GCP project | -| active | `default` | The active config name written in `~/.config/gcloud/active_config` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | ------------- | ----------------------------------------------- | +| region | `us-central1` | 現在のGCPリージョン | +| account | `foo` | 現在のGCPプロファイル | +| domain | `example.com` | The current GCP profile domain | +| project | | 現在のGCPプロジェクト | +| active | `default` | `~/.config/gcloud/active_config` に書かれたアクティブな設定名 | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1152,20 +1154,20 @@ asia-northeast1 = "an1" ## Git Branch -The `git_branch` module shows the active branch of the repo in your current directory. +`git_branch`モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを表示します。 ### オプション -| オプション | デフォルト | 説明 | -| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | -| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. | -| `format` | `"on [$symbol$branch]($style) "` | moduleのフォーマットです。 Use `"$branch"` to refer to the current branch name. | -| `symbol` | `" "` | A format string representing the symbol of git branch. | -| `style` | `"bold purple"` | モジュールのスタイルです。 | -| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` graphemes. | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. | -| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. | -| `disabled` | `false` | Disables the `git_branch` module. | +| オプション | デフォルト | 説明 | +| -------------------- | -------------------------------- | ------------------------------------------------------------------------------------ | +| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. | +| `format` | `"on [$symbol$branch]($style) "` | moduleのフォーマットです。 Use `"$branch"` to refer to the current branch name. | +| `symbol` | `" "` | A format string representing the symbol of git branch. | +| `style` | `"bold purple"` | モジュールのスタイルです。 | +| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` graphemes. | +| `truncation_symbol` | `"…"` | ブランチ名切り捨てられていることを示すための記号です。 You can use `""` for no symbol. | +| `only_attached` | `false` | Only show the branch name when not in a detached `HEAD` state. | +| `disabled` | `false` | `git_branch`モジュールを無効にします。 | ### 変数 @@ -1177,7 +1179,7 @@ The `git_branch` module shows the active branch of the repo in your current dire | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1192,28 +1194,28 @@ 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. +`git_commit` モジュールは、カレントディレクトリのリポジトリの現在のコミットハッシュとタグ (もしあれば) を表示します。 ### オプション -| オプション | デフォルト | 説明 | -| -------------------- | ---------------------------------- | ------------------------------------------------------- | -| `commit_hash_length` | `7` | The length of the displayed git commit hash. | -| `format` | `"[\\($hash$tag\\)]($style) "` | moduleのフォーマットです。 | -| `style` | `"bold green"` | モジュールのスタイルです。 | -| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state | -| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. | -| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown | -| `disabled` | `false` | Disables the `git_commit` module. | +| オプション | デフォルト | 説明 | +| -------------------- | ---------------------------------- | ----------------------------------------- | +| `commit_hash_length` | `7` | 表示されるgitコミットハッシュの長さです。 | +| `format` | `"[\\($hash$tag\\)]($style) "` | moduleのフォーマットです。 | +| `style` | `"bold green"` | モジュールのスタイルです。 | +| `only_detached` | `true` | detached `HEAD` 状態のときのみ git コミットハッシュを表示する | +| `tag_disabled` | `true` | `git_commit` モジュールのタグ情報の表示を無効にする。 | +| `tag_symbol` | `" 🏷 "` | 表示される情報の前に追加されるタグシンボル | +| `disabled` | `false` | `git_commit`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------- | --------------------------- | -| hash | `b703eb3` | The current git commit hash | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --------- | ---------------------- | +| hash | `b703eb3` | 現在の git コミットハッシュ | +| style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1227,7 +1229,7 @@ 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. +`git_state`モジュールはgitディレクトリの進行状態を表します。 (例: _REBASING_, _BISECTING_, その他) 進捗情報がある場合(例: REBASING 3/10)はその情報も表示されます。 ### オプション @@ -1242,7 +1244,7 @@ The `git_state` module will show in directories which are part of a git reposito | `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. | | `style` | `"bold yellow"` | モジュールのスタイルです。 | | `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | moduleのフォーマットです。 | -| `disabled` | `false` | Disables the `git_state` module. | +| `disabled` | `false` | `git_state`モジュールを無効にします。 | ### 変数 @@ -1253,7 +1255,7 @@ The `git_state` module will show in directories which are part of a git reposito | progress_total | `2` | The total operation progress | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1271,7 +1273,7 @@ The `git_metrics` module will show the number of added and deleted lines in the ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 ::: @@ -1294,7 +1296,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | added_style\* | | Mirrors the value of option `added_style` | | deleted_style\* | | Mirrors the value of option `deleted_style` | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1308,30 +1310,30 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' ## Git Status -The `git_status` module shows symbols representing the state of the repo in your current directory. +`git_status`モジュールは、現在のディレクトリのリポジトリの状態を表すシンボルを表示します。 ### オプション -| オプション | デフォルト | 説明 | -| ------------ | ----------------------------------------------- | ----------------------------------- | -| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | -| `conflicted` | `"="` | This branch has merge conflicts. | -| `ahead` | `"⇡"` | The format of `ahead` | -| `behind` | `"⇣"` | The format of `behind` | -| `diverged` | `"⇕"` | The format of `diverged` | -| `up_to_date` | `""` | The format of `up_to_date` | -| `untracked` | `"?"` | The format of `untracked` | -| `stashed` | `"$"` | The format of `stashed` | -| `modified` | `"!"` | The format of `modified` | -| `staged` | `"+"` | The format of `staged` | -| `renamed` | `"»"` | The format of `renamed` | -| `deleted` | `"✘"` | The format of `deleted` | -| `style` | `"bold red"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `git_status` module. | +| オプション | デフォルト | 説明 | +| ------------ | ----------------------------------------------- | -------------------------- | +| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | `git_status` のデフォルトフォーマット | +| `conflicted` | `"="` | このブランチにはマージの競合があります。 | +| `ahead` | `"⇡"` | `ahead`のフォーマット | +| `behind` | `"⇣"` | `behind`のフォーマット | +| `diverged` | `"⇕"` | `diverged`のフォーマット | +| `up_to_date` | `""` | The format of `up_to_date` | +| `untracked` | `"?"` | The format of `untracked` | +| `stashed` | `"$"` | The format of `stashed` | +| `modified` | `"!"` | The format of `modified` | +| `staged` | `"+"` | The format of `staged` | +| `renamed` | `"»"` | The format of `renamed` | +| `deleted` | `"✘"` | The format of `deleted` | +| `style` | `"bold red"` | モジュールのスタイルです。 | +| `disabled` | `false` | `git_status`モジュールを無効にします。 | ### 変数 -The following variables can be used in `format`: +` format` 内では以下の変数が利用できます。 | 変数 | 説明 | | -------------- | ------------------------------------------------------------------------------------------------------------- | @@ -1346,7 +1348,7 @@ The following variables can be used in `format`: | `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. | | style\* | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます The following variables can be used in `diverged`: @@ -1357,9 +1359,9 @@ The following variables can be used in `diverged`: The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`: -| 変数 | 説明 | -| ------- | ------------------------ | -| `count` | Show the number of files | +| 変数 | 説明 | +| ------- | ------------- | +| `count` | ファイルの数を表示します。 | ### 設定例 @@ -1395,14 +1397,14 @@ behind = "⇣${count}" The `golang` module shows the currently installed version of [Go](https://golang.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 -- 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 +- カレントディレクトリに`go.mod`ファイルが含まれている +- カレントディレクトリに`go.sum`ファイルが含まれている +- カレントディレクトリに`glide.yaml`ファイルが含まれている +- カレントディレクトリに`Gopkg.yml`ファイルが含まれている +- カレントディレクトリに`Gopkg.lock`ファイルが含まれている +- カレントディレクトリに`.go-version`ファイルが含まれている +- カレントディレクトリに`Godeps`ファイルが含まれている +- カレントディレクトリに`.go`の拡張子のファイルが含まれている ### オプション @@ -1415,7 +1417,7 @@ The `golang` module shows the currently installed version of [Go](https://golang | `detect_files` | `["go.mod", "go.sum", "glide.yaml", "Gopkg.yml", "Gopkg.lock", ".go-version"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `["Godeps"]` | どのフォルダーがこのモジュールをアクティブにするか | | `style` | `"bold cyan"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `golang` module. | +| `disabled` | `false` | `golang`モジュールを無効にします。 | ### 変数 @@ -1425,7 +1427,7 @@ The `golang` module shows the currently installed version of [Go](https://golang | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1440,7 +1442,7 @@ format = "via [🏎💨 $version](bold cyan) " The `helm` module shows the currently installed version of [Helm](https://helm.sh/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 -- The current directory contains a `helmfile.yaml` file +- カレントディレクトリに`helmfile.yaml`ファイルが含まれている - The current directory contains a `Chart.yaml` file ### オプション @@ -1464,7 +1466,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1477,17 +1479,17 @@ format = "via [⎈ $version](bold white) " ## Hostname -The `hostname` module shows the system hostname. +`hostname`モジュールには、システムのホスト名が表示されます。 ### オプション -| オプション | デフォルト | 説明 | -| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `ssh_only` | `true` | Only show hostname when connected to an SSH session. | -| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation | -| `format` | `"[$hostname]($style) in "` | moduleのフォーマットです。 | -| `style` | `"bold dimmed green"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `hostname` module. | +| オプション | デフォルト | 説明 | +| ---------- | --------------------------- | --------------------------------------------------------------------------- | +| `ssh_only` | `true` | SSHセッションに接続されている場合にのみホスト名を表示します。 | +| `trim_at` | `"."` | この文字が最初にマッチするまでをホスト名と認識します。 `"."`は最初の. までをホスト名として認識します。 `""`を指定した場合トリムしません。 | +| `format` | `"[$hostname]($style) in "` | moduleのフォーマットです。 | +| `style` | `"bold dimmed green"` | モジュールのスタイルです。 | +| `disabled` | `false` | `hostname`モジュールを無効にします。 | ### 変数 @@ -1496,7 +1498,7 @@ The `hostname` module shows the system hostname. | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1528,7 +1530,7 @@ The `java` module shows the currently installed version of [Java](https://www.or | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | | `symbol` | `"☕ "` | A format string representing the symbol of Java | | `style` | `"red dimmed"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `java` module. | +| `disabled` | `false` | `Java`モジュールを無効にします。 | ### 変数 @@ -1538,7 +1540,7 @@ The `java` module shows the currently installed version of [Java](https://www.or | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1549,9 +1551,9 @@ The `java` module shows the currently installed version of [Java](https://www.or 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 are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running. +`jobs`モジュールには、実行中のジョブの現在の数が表示されます。 このモジュールは、実行中のバックグラウンドジョブがある場合にのみ表示されます。 The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to *always* show the symbol and number of jobs, even if there are 0 jobs running. The default functionality is: @@ -1575,13 +1577,13 @@ The `threshold` option is deprecated, but if you want to use it, the module will | オプション | デフォルト | 説明 | | ------------------ | ----------------------------- | ------------------------------------------------------------------------ | -| `threshold`\* | `1` | Show number of jobs if exceeded. | +| `threshold`\* | `1` | 超過した場合、ジョブの数を表示します。 | | `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | | `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | | `format` | `"[$symbol$number]($style) "` | moduleのフォーマットです。 | | `symbol` | `"✦"` | The string used to represent the `symbol` variable. | | `style` | `"bold blue"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `jobs` module. | +| `disabled` | `false` | `jobs`モジュールを無効にします。 | \*: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead. @@ -1590,11 +1592,11 @@ The `threshold` option is deprecated, but if you want to use it, the module will | 変数 | 設定例 | 説明 | | --------- | --- | ---------------------- | -| number | `1` | The number of jobs | +| number | `1` | ジョブの数 | | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1611,9 +1613,9 @@ symbol_threshold = 0 The `julia` module shows the currently installed version of [Julia](https://julialang.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 -- 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 +- カレントディレクトリに`Project.toml`ファイルが含まれている +- カレントディレクトリに`Manifest.toml`ファイルが含まれている +- カレントディレクトリに`.jl`の拡張子のファイルが含まれている ### オプション @@ -1624,19 +1626,19 @@ The `julia` module shows the currently installed version of [Julia](https://juli | `detect_extensions` | `["jl"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["Project.toml", "Manifest.toml"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | +| `symbol` | `"ஃ "` | Juliaのシンボルを表すフォーマット文字列 | | `style` | `"bold purple"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `julia` module. | +| `disabled` | `false` | `julia`モジュールを無効にします。 | ### 変数 | 変数 | 設定例 | 説明 | | --------- | -------- | ---------------------- | -| version | `v1.4.0` | The version of `julia` | +| version | `v1.4.0` | `julia`のバージョン | | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1649,33 +1651,33 @@ symbol = "∴ " ## Kotlin -The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 +`kotlin`モジュールは、現在インストールされている[Kotlin](https://kotlinlang.org/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 -- The current directory contains a `.kt` or a `.kts` file +- カレントディレクトリに`.kt`もしくは`.kts`ファイルが含まれている ### オプション -| オプション | デフォルト | 説明 | -| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `detect_extensions` | `["kt", "kts"]` | どの拡張子がこのモジュールをアクティブにするか | -| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | -| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | -| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | -| `style` | `"bold blue"` | モジュールのスタイルです。 | -| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. | -| `disabled` | `false` | Disables the `kotlin` module. | +| オプション | デフォルト | 説明 | +| ------------------- | ------------------------------------ | ------------------------------------------------------ | +| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | +| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `detect_extensions` | `["kt", "kts"]` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | +| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | +| `symbol` | `"🅺 "` | Kotlinのシンボルを表すフォーマット文字列 | +| `style` | `"bold blue"` | モジュールのスタイルです。 | +| `kotlin_binary` | `"kotlin"` | Starshipがバージョンを取得するときに実行するkotlinバイナリを設定します。 | +| `disabled` | `false` | `kotlin`モジュールを無効にします。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | --------- | ----------------------- | -| version | `v1.4.21` | The version of `kotlin` | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | --------- | ---------------------- | +| version | `v1.4.21` | `kotlin`のバージョン | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1690,40 +1692,40 @@ symbol = "🅺 " # ~/.config/starship.toml [kotlin] -# Uses the Kotlin Compiler binary to get the installed version +# Kotlinコンパイラバイナリを使用してバージョンを確認する kotlin_binary = "kotlinc" ``` ## Kubernetes -Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. The namespace needs to be set in the kubeconfig file, this can be done via `kubectl config set-context starship-cluster --namespace astronaut`. If the `$KUBECONFIG` env var is set the module will use that if not it will use the `~/.kube/config`. +Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) name and, if set, the namespace from the kubeconfig file. namespace は kubconfigで設定する必要があります。設定は、`kubectl config set-context starship-cluster --namespace astronaut` といったコマンド行えます。 `$KUBECONFIG` 環境変数が設定されている場合、このモジュールは環境変数を優先して使用し、`~/.kube/config` は使用しません。 ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 ::: ### オプション -| オプション | デフォルト | 説明 | -| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | -| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | -| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | moduleのフォーマットです。 | -| `style` | `"cyan bold"` | モジュールのスタイルです。 | -| `context_aliases` | | Table of context aliases to display. | -| `disabled` | `true` | Disables the `kubernetes` module. | +| オプション | デフォルト | 説明 | +| ----------------- | ---------------------------------------------------- | ------------------------------- | +| `symbol` | `"☸ "` | クラスター名の前に表示されるシンボルを表すフォーマット文字列。 | +| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | moduleのフォーマットです。 | +| `style` | `"cyan bold"` | モジュールのスタイルです。 | +| `context_aliases` | | コンテキストの表示エイリアスを定義するテーブル。 | +| `disabled` | `true` | `kubernetes` モジュールを無効にする。 | ### 変数 -| 変数 | 設定例 | 説明 | -| --------- | -------------------- | ---------------------------------------- | -| context | `starship-cluster` | The current kubernetes context | -| namespace | `starship-namespace` | If set, the current kubernetes namespace | -| symbol | | オプション `記号` の値をミラーする | -| style\* | | オプション `style` の値をミラーする | +| 変数 | 設定例 | 説明 | +| --------- | -------------------- | -------------------------------------- | +| context | `starship-cluster` | 現在の Kubernetes のコンテキスト | +| namespace | `starship-namespace` | 設定されている場合、現在の Kubernetes の namespace 名 | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1762,13 +1764,13 @@ Long and automatically generated cluster names can be identified and shortened u ## Line Break -The `line_break` module separates the prompt into two lines. +`line_break`モジュールは、プロンプトを2行に分割します。 ### オプション -| オプション | デフォルト | 説明 | -| ---------- | ------- | ------------------------------------------------------------------ | -| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | +| オプション | デフォルト | 説明 | +| ---------- | ------- | ------------------------------------- | +| `disabled` | `false` | `line_break`モジュールを無効にして、プロンプトを1行にします。 | ### 設定例 @@ -1805,11 +1807,11 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | 変数 | 設定例 | 説明 | | --------- | -------- | ---------------------- | -| version | `v5.4.0` | The version of `lua` | +| version | `v5.4.0` | `lua` のバージョン | | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1820,27 +1822,27 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o format = "via [🌕 $version](bold blue) " ``` -## Memory Usage +## メモリ使用量 -The `memory_usage` module shows current system memory and swap usage. +`memory_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. +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 ::: ### オプション -| オプション | デフォルト | 説明 | -| ----------- | ----------------------------------------------- | -------------------------------------------------------- | -| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | moduleのフォーマットです。 | -| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | -| `style` | `"bold dimmed white"` | モジュールのスタイルです。 | -| `disabled` | `true` | Disables the `memory_usage` module. | +| オプション | デフォルト | 説明 | +| ----------- | ----------------------------------------------- | --------------------------- | +| `threshold` | `75` | この閾値を超えない限り、メモリ使用率は表示されません。 | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | moduleのフォーマットです。 | +| `symbol` | `"🐏"` | メモリ使用率を表示する前に使用される記号です。 | +| `style` | `"bold dimmed white"` | モジュールのスタイルです。 | +| `disabled` | `true` | `memory_usage`モジュールを無効にします。 | ### 変数 @@ -1869,7 +1871,7 @@ style = "bold dimmed green" ## Mercurial Branch -The `hg_branch` module shows the active branch of the repo in your current directory. +` hg_branch `モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを示します。 ### オプション @@ -1879,7 +1881,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc | `style` | `"bold purple"` | モジュールのスタイルです。 | | `format` | `"on [$symbol$branch]($style) "` | moduleのフォーマットです。 | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `truncation_symbol` | `"…"` | ブランチ名切り捨てられていることを示すための記号です。 | | `disabled` | `true` | Disables the `hg_branch` module. | ### 変数 @@ -1890,7 +1892,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1907,7 +1909,7 @@ truncation_symbol = "" The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 -- The current directory contains a `nim.cfg` file +- カレントディレクトリに`nim.cfg`ファイルが含まれている - 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 @@ -1933,7 +1935,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1947,7 +1949,7 @@ symbol = "🎣 " ## Nix-shell -The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. +The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. このモジュールは、nixシェル環境内にあるときに表示されます。 ### オプション @@ -1958,7 +1960,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | `style` | `"bold blue"` | モジュールのスタイルです。 | | `impure_msg` | `"impure"` | A format string shown when the shell is impure. | | `pure_msg` | `"pure"` | A format string shown when the shell is pure. | -| `disabled` | `false` | Disables the `nix_shell` module. | +| `disabled` | `false` | `nix_shell`モジュールを無効にします。 | ### 変数 @@ -1969,7 +1971,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -1987,10 +1989,10 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 -- The current directory contains a `package.json` file +- カレントディレクトリに`package.json`ファイルが含まれている - The current directory contains a `.node-version` file - The current directory contains a `.nvmrc` file -- The current directory contains a `node_modules` directory +- カレントディレクトリに`node_modules`ディレクトリが含まれている - The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension - The current directory contains a file with the `.ts` extension @@ -2005,7 +2007,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_files` | `["package.json", ".node-version"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `["node_modules"]` | どのフォルダーがこのモジュールをアクティブにするか | | `style` | `"bold green"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `nodejs` module. | +| `disabled` | `false` | `nodejs`モジュールを無効にします。 | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | ### 変数 @@ -2016,7 +2018,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2063,7 +2065,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2096,7 +2098,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2109,9 +2111,9 @@ 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`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. +`package`モジュールは、現在のディレクトリがパッケージのリポジトリである場合に表示され、現在のバージョンが表示されます。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2125,20 +2127,21 @@ The `package` module is shown when the current directory is the repository for a - [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present - [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present - [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present - [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present > ⚠️ 表示されるバージョンは、パッケージマネージャーではなく、ソースコードが現在のディレクトリにあるパッケージのバージョンです。 ### オプション -| オプション | デフォルト | 説明 | -| ----------------- | --------------------------------- | ---------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | moduleのフォーマットです。 | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | -| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `style` | `"bold 208"` | モジュールのスタイルです。 | -| `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | Disables the `package` module. | +| オプション | デフォルト | 説明 | +| ----------------- | --------------------------------- | --------------------------------------------------------- | +| `format` | `"is [$symbol$version]($style) "` | moduleのフォーマットです。 | +| `symbol` | `"📦 "` | パッケージのバージョンを表示する前に使用される記号です。 | +| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `style` | `"bold 208"` | モジュールのスタイルです。 | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | `package`モジュールを無効にします。 | ### 変数 @@ -2148,7 +2151,7 @@ The `package` module is shown when the current directory is the repository for a | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2203,7 +2206,7 @@ format = "via [🦪 $version]($style) " The `php` module shows the currently installed version of [PHP](https://www.php.net/). デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 -- The current directory contains a `composer.json` file +- カレントディレクトリに`composer.json`ファイルが含まれている - The current directory contains a `.php-version` file - The current directory contains a `.php` extension @@ -2213,12 +2216,12 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | ------------------- | ------------------------------------ | ------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `symbol` | `"🐘 "` | PHPのバージョンを表示する前に使用される記号です。 | | `detect_extensions` | `["php"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["composer.json", ".php-version"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | | `style` | `"147 bold"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `php` module. | +| `disabled` | `false` | `php`モジュールを無効にします。 | ### 変数 @@ -2228,7 +2231,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2239,6 +2242,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### オプション + +| オプション | デフォルト | 説明 | +| ---------------- | -------------------------------- | ------------------------------------------------------ | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | モジュールのスタイルです。 | +| `disabled` | `false` | Disables the `pulumi` module. | + +### 変数 + +| 変数 | 設定例 | 説明 | +| --------- | ---------- | ------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| symbol | | オプション `記号` の値をミラーする | +| style\* | | オプション `style` の値をミラーする | + +\*: この変数はスタイル文字列の一部としてのみ使用できます + +### 設定例 + +#### With Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 @@ -2267,7 +2327,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2436,7 +2496,7 @@ By default the `red` module shows the currently installed version of [Red](https | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2449,11 +2509,11 @@ symbol = "🔴 " ## Ruby -By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met: +デフォルトでは`ruby`モジュールは現在インストールされている[Ruby](https://www.ruby-lang.org/)のバージョンを表示します。 次の条件のいずれかが満たされると、モジュールが表示されます: -- The current directory contains a `Gemfile` file -- The current directory contains a `.ruby-version` file -- The current directory contains a `.rb` file +- カレントディレクトリに`Gemfile`ファイルが含まれている +- カレントディレクトリに `.ruby-version` ファイルが含まれている +- カレントディレクトリに `.rb` ファイルが含まれている ### オプション @@ -2461,12 +2521,12 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt | ------------------- | ------------------------------------ | ------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 | | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | -| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. | +| `symbol` | `"💎 "` | Rubyのシンボルを表すフォーマット文字列. | | `detect_extensions` | `["rb"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `["Gemfile", ".ruby-version"]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | | `style` | `"bold red"` | モジュールのスタイルです。 | -| `disabled` | `false` | Disables the `ruby` module. | +| `disabled` | `false` | `ruby`モジュールを無効にします。 | ### 変数 @@ -2476,7 +2536,7 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2515,7 +2575,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2555,7 +2615,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2572,31 +2632,35 @@ The `shell` module shows an indicator for currently used shell. ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 ::: ### オプション -| オプション | デフォルト | 説明 | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | moduleのフォーマットです。 | -| `disabled` | `true` | Disables the `shell` module. | +| オプション | デフォルト | 説明 | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | moduleのフォーマットです。 | +| `style` | `"white bold"` | モジュールのスタイルです。 | +| `disabled` | `true` | Disables the `shell` module. | ### 変数 | 変数 | デフォルト | 説明 | | --------- | ----- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2607,6 +2671,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2633,7 +2698,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2667,7 +2732,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2684,7 +2749,7 @@ The `status` module displays the exit code of the previous command. The module w ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 ::: @@ -2723,7 +2788,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2768,7 +2833,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2792,7 +2857,7 @@ By default the Terraform version is not shown, since this is slow for current ve デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。 - The current directory contains a `.terraform` folder -- Current directory contains a file with the `.tf` or `.hcl` extensions +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### オプション @@ -2801,7 +2866,7 @@ By default the Terraform version is not shown, since this is slow for current ve | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | どの拡張子がこのモジュールをアクティブにするか | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | どの拡張子がこのモジュールをアクティブにするか | | `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[".terraform"]` | どのフォルダーがこのモジュールをアクティブにするか | | `style` | `"bold 105"` | モジュールのスタイルです。 | @@ -2816,7 +2881,7 @@ By default the Terraform version is not shown, since this is slow for current ve | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2844,7 +2909,7 @@ The `time` module shows the current **local** time. The `format` configuration v ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。 ::: @@ -2869,7 +2934,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -2956,7 +3021,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -3023,7 +3088,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | オプション `記号` の値をミラーする | | style\* | `black bold dimmed` | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -3061,7 +3126,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | オプション `記号` の値をミラーする | | style\* | | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます ### 設定例 @@ -3102,11 +3167,19 @@ The order in which custom modules are shown can be individually set by including ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### オプション | オプション | デフォルト | 説明 | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3127,7 +3200,7 @@ The order in which custom modules are shown can be individually set by including | symbol | オプション `記号` の値をミラーする | | style\* | オプション `style` の値をミラーする | -\*: This variable can only be used as a part of a style string +\*: この変数はスタイル文字列の一部としてのみ使用できます #### Custom command shell @@ -3165,12 +3238,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/ja-JP/faq/README.md b/docs/ja-JP/faq/README.md index f2895414b..a2d73ec0e 100644 --- a/docs/ja-JP/faq/README.md +++ b/docs/ja-JP/faq/README.md @@ -56,41 +56,67 @@ CentOS6や7などで事前にビルドされたバイナリを使用していて sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` -## よくわからない記号を見つけました。これはどういった意味ですか? +## Why do I see `Executing command "..." timed out.` warnings? -不明な記号に遭遇した場合、`starship explain` を使用することで、現在表示しているモジュールの説明を見ることができます。 +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. -## 私のプロンプトで記号のグリフがないのはなぜですか? +## I see symbols I don't understand or expect, what do they mean? -よくある原因はシステム上での設定ミスです。 いくつかのLinuxディストリビューションの初期設定にフォントサポートがありません。 次のことを確認してください。 +If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. + +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + +## 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: - ロケールが、`de_DE.UTF-8`や` ja_JP.UTF-8`などのUTF-8に設定されている。 `LC_ALL`がUTF-8でない場合、[変更する必要があります](https://www.tecmint.com/set-system-locales-in-linux/)。 - 絵文字フォントがインストールされている。 ほとんどのシステムにはデフォルトで絵文字フォントが付属していますが、 一部 (特にArch Linux) はそうではありません。 通常、システムの パッケージマネージャーからインストールすることができます。--[noto emoji](https://www.google.com/get/noto/help/emoji/)は一般的な選択肢です。 - [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" ``` -一行目は[蛇の絵文字](https://emojipedia.org/snake/)、二行目は[powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs)が表示されるはずです。 +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). -もし、どちらの記号とも正しく表示されない場合は、システムの設定が間違っています。 不幸にも、正しくフォントを設定するのは難しいものです。 Discordのユーザーが助けてくれるかもしれません! もし記号が正しく表示されているのにもかかわらず、Starshipが正しく表示されていない場合は、[バグの報告](https://github.com/starship/starship/issues/new/choose)をお願いします。 +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) -## Starshipをアンインストールしたい +## How do I uninstall Starship? -Starshipのアンインストールはインストールと同じぐらい簡単です。 +Starship is just as easy to uninstall as it is to install in the first place. 1. Starshipを初期化するために使用した、シェルの設定行を削除します (例:`~/.bashrc`)。 1. Starshipのバイナリを削除します。 -パッケージマネージャーを使用してStarshipをインストールした場合は、パッケージマネージャーのアンインストールガイドを参照してください。 +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. -Starship をインストールスクリプトを使用してインストールした場合、次のコマンドでバイナリが削除されます。 +If Starship was installed using the install script, the following command will delete the binary: ```sh -# starshipバイナリを見つけて削除 -sh -c 'rm "$(which starship)"'' +# Locate and delete the starship binary +sh -c 'rm "$(which starship)"' ``` diff --git a/docs/ja-JP/guide/README.md b/docs/ja-JP/guide/README.md index ead0b7268..88019bc6d 100644 --- a/docs/ja-JP/guide/README.md +++ b/docs/ja-JP/guide/README.md @@ -181,7 +181,7 @@ #### パッケージマネージャー経由でインストール - ##### 例: [Homebrew の場合](https://brew.sh/): + ##### [ Homebrew ](https://brew.sh/)の場合: ```sh brew install starship @@ -304,37 +304,9 @@ もしあなたが Starship への貢献に興味がある場合は、我々の[貢献ガイド](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)をご覧ください。 また、気軽に我々の[Discord サーバー](https://discord.gg/8Jzqu3T)へ顔を出してください。 👋 -### コードに貢献していただいた方々 - -このプロジェクトは、貢献したすべての人々のおかげで存在します。 [[Contribute](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. - - -### 財政的な貢献をしていただいた方々 - -財政的な貢献者になって、私たちのコミュニティを維持するのを助けていただけると嬉しいです。 [[Contribute](https://opencollective.com/starship/contribute)] - -#### 個人 - - - -#### 組織 - -あなたの組織でこのプロジェクトをサポートします。 あなたのロゴはあなたのウェブサイトへのリンクとここに表示されます。 [[Contribute](https://opencollective.com/starship/contribute)] - - - - - - - - - - - - ## 💭影響を受けたプロダクト -よければStarship の作成に影響を与えた、これまでのプロジェクトをチェックしてください 🙏 +Please check out these previous works that helped inspire the creation of starship. 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - 宇宙飛行士のための ZSH プロンプト。 @@ -349,4 +321,4 @@ ## 📝 ライセンス -Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
このプロジェクトは [ISC](https://github.com/starship/starship/blob/master/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/ja-JP/installing/README.md b/docs/ja-JP/installing/README.md index 2724c8fde..1e1da45f9 100644 --- a/docs/ja-JP/installing/README.md +++ b/docs/ja-JP/installing/README.md @@ -35,9 +35,19 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### インストール + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) -### バイナリの取得 +### Getting the Binary #### Imperatively @@ -47,14 +57,14 @@ nix-env -iA nixos.starship #### Declarative, single user, via [home-manager](https://github.com/nix-community/home-manager) -`home.nix`ファイルで`programs.starship`を有効にして、設定を追加してください。 +Enable the `programs.starship` module in your `home.nix` file, and add your settings ```nix { programs.starship = { enable = true; enableZshIntegration = true; - # ~/.config/starship.toml に書き込まれる設定 + # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; @@ -69,7 +79,7 @@ nix-env -iA nixos.starship } ``` -そして、次を実行してください +then run ```sh home-manager switch @@ -77,7 +87,7 @@ home-manager switch #### Declarative, system-wide, with NixOS -`configuration.nix`で`environment.systemPackages`に`pkgs.starship`を追加して、次を実行してください +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch diff --git a/docs/ja-JP/presets/README.md b/docs/ja-JP/presets/README.md index 0d8c8ab7f..28e6ec4a6 100644 --- a/docs/ja-JP/presets/README.md +++ b/docs/ja-JP/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### 設定 + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/ko-KR/advanced-config/README.md b/docs/ko-KR/advanced-config/README.md index d7b9ec4dc..1bda2ae1a 100644 --- a/docs/ko-KR/advanced-config/README.md +++ b/docs/ko-KR/advanced-config/README.md @@ -31,6 +31,18 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship eval $(starship init bash) ``` +## Custom pre-prompt and pre-execution Commands in PowerShell + +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +Create a function named `Invoke-Starship-PreCommand` + +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") +} +``` + ## 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`. @@ -68,6 +80,17 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. diff --git a/docs/ko-KR/config/README.md b/docs/ko-KR/config/README.md index 2fb31aa12..fe9357b7b 100644 --- a/docs/ko-KR/config/README.md +++ b/docs/ko-KR/config/README.md @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -788,7 +789,7 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### Options @@ -983,7 +984,7 @@ default = "unknown user" | Option | Default | Description | | ---------- | ------------------------------ | ---------------------------------------------------------------------------- | -| `symbol` | | The symbol used before displaying the variable value. | +| `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. | @@ -1065,10 +1066,11 @@ The `fill` module fills any extra space on the line with a symbol. If multiple ` ### Options -| Option | Default | Description | -| -------- | -------------- | --------------------------------- | -| `symbol` | `"."` | The symbol used to fill the line. | -| `style` | `"bold black"` | The style for the module. | +| Option | Default | Description | +| ---------- | -------------- | --------------------------------- | +| `symbol` | `"."` | The symbol used to fill the line. | +| `style` | `"bold black"` | The style for the module. | +| `disabled` | `false` | Disables the `fill` module | ### Example @@ -2110,7 +2112,7 @@ 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`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a - [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present - [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present - [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present - [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present > ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### Options + +| Option | Default | Description | +| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | The style for the module. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| 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 Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: @@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | The format for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | The format for the module. | +| `style` | `"white bold"` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables | Variable | Default | Description | | --------- | ------- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: This variable can only be used as a part of a style string ### Examples @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve By default 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 +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### Options @@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met: | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | | `style` | `"bold 105"` | The style for the module. | @@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### Options | Option | Default | Description | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/ko-KR/faq/README.md b/docs/ko-KR/faq/README.md index 2b3096c17..8422ee2e3 100644 --- a/docs/ko-KR/faq/README.md +++ b/docs/ko-KR/faq/README.md @@ -56,10 +56,36 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` +## Why do I see `Executing command "..." timed out.` warnings? + +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. + ## I see symbols I don't understand or expect, what do they mean? If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + ## 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: diff --git a/docs/ko-KR/guide/README.md b/docs/ko-KR/guide/README.md index a4d6f685a..4c09f5530 100644 --- a/docs/ko-KR/guide/README.md +++ b/docs/ko-KR/guide/README.md @@ -181,7 +181,7 @@ #### 패키지 매니저를 이용한 설치 - ##### 예제: [Homebrew](https://brew.sh/): + ##### [Homebrew](https://brew.sh/)를 통한 설치: ```sh brew install starship @@ -304,34 +304,6 @@ 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. 👋 -### 코드 기여 - -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. [[기여](https://opencollective.com/starship/contribute)] - -#### Individuals - - - -#### 조직 - -Support this project with your organization. Your logo will show up here with a link to your website. [[기여](https://opencollective.com/starship/contribute)] - - - - - - - - - - - - ## 💭 Inspired By Please check out these previous works that helped inspire the creation of starship. 🙏 @@ -344,7 +316,7 @@ Please check out these previous works that helped inspire the creation of starsh


- Starship 로켓 아이콘 + Starship rocket icon

## 📝라이선스 diff --git a/docs/ko-KR/installing/README.md b/docs/ko-KR/installing/README.md index 6bb768504..305af749d 100644 --- a/docs/ko-KR/installing/README.md +++ b/docs/ko-KR/installing/README.md @@ -35,6 +35,16 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Installation + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) ### Getting the Binary diff --git a/docs/ko-KR/presets/README.md b/docs/ko-KR/presets/README.md index 61165f5b7..9c58dfd9e 100644 --- a/docs/ko-KR/presets/README.md +++ b/docs/ko-KR/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### Configuration + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/nl-NL/README.md b/docs/nl-NL/README.md index 0ce91ba39..0638c1bf9 100644 --- a/docs/nl-NL/README.md +++ b/docs/nl-NL/README.md @@ -143,7 +143,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Nushell - ::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu. + ::: warning This will change in the future. ::: Add the following to your nu config file. De locatie van hiervan kunt u vinden door `config path` uit te voeren in nushell. ```toml startup = [ diff --git a/docs/nl-NL/advanced-config/README.md b/docs/nl-NL/advanced-config/README.md index d7b9ec4dc..1bda2ae1a 100644 --- a/docs/nl-NL/advanced-config/README.md +++ b/docs/nl-NL/advanced-config/README.md @@ -31,6 +31,18 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship eval $(starship init bash) ``` +## Custom pre-prompt and pre-execution Commands in PowerShell + +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +Create a function named `Invoke-Starship-PreCommand` + +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") +} +``` + ## 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`. @@ -68,6 +80,17 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. diff --git a/docs/nl-NL/config/README.md b/docs/nl-NL/config/README.md index 2fb31aa12..fe9357b7b 100644 --- a/docs/nl-NL/config/README.md +++ b/docs/nl-NL/config/README.md @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -788,7 +789,7 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### Options @@ -983,7 +984,7 @@ default = "unknown user" | Option | Default | Description | | ---------- | ------------------------------ | ---------------------------------------------------------------------------- | -| `symbol` | | The symbol used before displaying the variable value. | +| `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. | @@ -1065,10 +1066,11 @@ The `fill` module fills any extra space on the line with a symbol. If multiple ` ### Options -| Option | Default | Description | -| -------- | -------------- | --------------------------------- | -| `symbol` | `"."` | The symbol used to fill the line. | -| `style` | `"bold black"` | The style for the module. | +| Option | Default | Description | +| ---------- | -------------- | --------------------------------- | +| `symbol` | `"."` | The symbol used to fill the line. | +| `style` | `"bold black"` | The style for the module. | +| `disabled` | `false` | Disables the `fill` module | ### Example @@ -2110,7 +2112,7 @@ 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`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a - [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present - [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present - [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present - [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present > ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### Options + +| Option | Default | Description | +| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | The style for the module. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| 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 Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: @@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | The format for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | The format for the module. | +| `style` | `"white bold"` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables | Variable | Default | Description | | --------- | ------- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: This variable can only be used as a part of a style string ### Examples @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve By default 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 +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### Options @@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met: | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | | `style` | `"bold 105"` | The style for the module. | @@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### Options | Option | Default | Description | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/nl-NL/faq/README.md b/docs/nl-NL/faq/README.md index 2b3096c17..8422ee2e3 100644 --- a/docs/nl-NL/faq/README.md +++ b/docs/nl-NL/faq/README.md @@ -56,10 +56,36 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` +## Why do I see `Executing command "..." timed out.` warnings? + +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. + ## I see symbols I don't understand or expect, what do they mean? If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + ## 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: diff --git a/docs/nl-NL/guide/README.md b/docs/nl-NL/guide/README.md index 69f505cf3..78326cdbb 100644 --- a/docs/nl-NL/guide/README.md +++ b/docs/nl-NL/guide/README.md @@ -179,7 +179,7 @@ #### Installeren via pakketbeheerder - ##### Voorbeeld: [Homebrew](https://brew.sh/): + ##### With [Homebrew](https://brew.sh/): ```sh brew install starship @@ -302,34 +302,6 @@ 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)]. - - -### 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. 🙏 diff --git a/docs/nl-NL/installing/README.md b/docs/nl-NL/installing/README.md index c29416f0e..85e28ac32 100644 --- a/docs/nl-NL/installing/README.md +++ b/docs/nl-NL/installing/README.md @@ -35,6 +35,16 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Installation + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) ### Getting the Binary diff --git a/docs/nl-NL/presets/README.md b/docs/nl-NL/presets/README.md index c7e62c439..269bf19d2 100644 --- a/docs/nl-NL/presets/README.md +++ b/docs/nl-NL/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### Configuration + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/pl-PL/README.md b/docs/pl-PL/README.md index 3146ab427..df14a5892 100644 --- a/docs/pl-PL/README.md +++ b/docs/pl-PL/README.md @@ -99,7 +99,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### 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. Zazwyczaj jest to `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` lub `~/.config/powershell/Microsoft.PowerShell_profile.ps1` na -Nixie. + Dodaj na koniec pliku `Microsoft.PowerShell_profile.ps1`. Możesz sprawdzić lokalizację tego pliku odczytując zmienną środowiskową `$PROFILE` w PowerShell. Zazwyczaj jest to `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` lub `~/.config/powershell/Microsoft.PowerShell_profile.ps1` na -Nixie. ```sh Invoke-Expression (&starship init powershell) @@ -143,7 +143,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Nushell - ::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu. + ::: warning This will change in the future. Działa tylko dla wersji powłoki nu v0.33 lub wyższej. ::: Add the following to your nu config file. Możesz sprawdzić lokalizację tego pliku wywołując polecenie `config path` w powłoce nu. ```toml startup = [ @@ -157,7 +157,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p #### Xonsh - Add the following to the end of `~/.xonshrc`: + Dodaj na koniec pliku `~/.xonshrc`: ```sh # ~/.xonshrc diff --git a/docs/pl-PL/advanced-config/README.md b/docs/pl-PL/advanced-config/README.md index d5e0c6bed..f1c1c83fa 100644 --- a/docs/pl-PL/advanced-config/README.md +++ b/docs/pl-PL/advanced-config/README.md @@ -31,6 +31,18 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship eval $(starship init bash) ``` +## Custom pre-prompt and pre-execution Commands in PowerShell + +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +Create a function named `Invoke-Starship-PreCommand` + +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") +} +``` + ## 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`. @@ -68,6 +80,17 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. diff --git a/docs/pl-PL/config/README.md b/docs/pl-PL/config/README.md index 73cf743db..f430748ef 100644 --- a/docs/pl-PL/config/README.md +++ b/docs/pl-PL/config/README.md @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -273,7 +274,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | ---------------- | ------------------------------------------- | | region | `ap-northeast-1` | The current AWS region | | profile | `astronauts` | The current AWS profile | @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -426,9 +427,9 @@ By default it only changes color. If you also want to change its shape take a lo ### Variables -| Variable | Example | Description | -| -------- | ------- | --------------------------------------------------------------------- | -| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | +| Zmienne | Example | Description | +| ------- | ------- | --------------------------------------------------------------------- | +| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | ### Examples @@ -483,7 +484,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | --------- | ------------------------------------ | | version | `v3.17.3` | The version of cmake | | symbol | | Mirrors the value of option `symbol` | @@ -513,7 +514,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | ---------- | ------------------------------------ | | version | `v3.1.2.0` | The version of `cobol` | | symbol | | Mirrors the value of option `symbol` | @@ -553,7 +554,7 @@ Showing desktop notifications requires starship to be built with `rust-notify` s ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | -------- | --------------------------------------- | | duration | `16m40s` | The time it took to execute the command | | style\* | | Mirrors the value of option `style` | @@ -593,7 +594,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | ----------- | ------------ | ------------------------------------ | | environment | `astronauts` | The current conda environment | | symbol | | Mirrors the value of option `symbol` | @@ -632,7 +633,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | --------- | ------------------------------------ | | version | `v0.32.1` | The version of `crystal` | | symbol | | Mirrors the value of option `symbol` | @@ -672,7 +673,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | -------- | ------------------------------------ | | version | `v2.8.4` | The version of `dart` | | symbol | | Mirrors the value of option `symbol` | @@ -709,7 +710,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | -------- | ------------------------------------ | | version | `v1.8.3` | The version of `deno` | | symbol | | Mirrors the value of option `symbol` | @@ -769,7 +770,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | --------------------- | ----------------------------------- | | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Mirrors the value of option `style` | @@ -788,7 +789,7 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### Options @@ -805,7 +806,7 @@ The `docker_context` module shows the currently active [Docker context](https:// ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | -------------- | ------------------------------------ | | context | `test_context` | The current docker context | | symbol | | Mirrors the value of option `symbol` | @@ -859,7 +860,7 @@ The module will also show the Target Framework Moniker ( ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. @@ -2141,7 +2144,7 @@ The `package` module is shown when the current directory is the repository for a ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | -------- | ------------------------------------ | | version | `v1.0.0` | The version of your package | | symbol | | Mirrors the value of option `symbol` | @@ -2183,7 +2186,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | --------- | ------------------------------------ | | version | `v5.26.1` | The version of `perl` | | symbol | | Mirrors the value of option `symbol` | @@ -2221,7 +2224,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | -------- | ------------------------------------ | | version | `v7.3.8` | The version of `php` | | symbol | | Mirrors the value of option `symbol` | @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### Options + +| Option | Default | Description | +| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | The style for the module. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variables + +| Zmienne | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| 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 Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: @@ -2260,7 +2320,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | -------- | ------------------------------------ | | version | `0.13.5` | The version of `purescript` | | symbol | | Mirrors the value of option `symbol` | @@ -2321,7 +2381,7 @@ The default values and order for `python_binary` was chosen to first identify th ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | ------------ | --------------- | ------------------------------------------ | | version | `"v3.8.1"` | The version of `python` | | symbol | `"🐍 "` | Mirrors the value of option `symbol` | @@ -2393,11 +2453,11 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr ### Variables -| Variable | Example | Description | -| -------- | ------------- | ------------------------------------ | -| version | `v4.0.5` | The version of `R` | -| symbol | | Mirrors the value of option `symbol` | -| style | `"blue bold"` | Mirrors the value of option `style` | +| Zmienne | Example | Description | +| ------- | ------------- | ------------------------------------ | +| version | `v4.0.5` | The version of `R` | +| symbol | | Mirrors the value of option `symbol` | +| style | `"blue bold"` | Mirrors the value of option `style` | ### Example @@ -2429,7 +2489,7 @@ By default the `red` module shows the currently installed version of [Red](https ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | -------- | ------------------------------------ | | version | `v2.5.1` | The version of `red` | | symbol | | Mirrors the value of option `symbol` | @@ -2469,7 +2529,7 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | -------- | ------------------------------------ | | version | `v2.5.1` | The version of `ruby` | | symbol | | Mirrors the value of option `symbol` | @@ -2508,7 +2568,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | ----------------- | ------------------------------------ | | version | `v1.43.0-nightly` | The version of `rustc` | | symbol | | Mirrors the value of option `symbol` | @@ -2548,7 +2608,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | -------- | ------------------------------------ | | version | `2.13.5` | The version of `scala` | | symbol | | Mirrors the value of option `symbol` | @@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | The format for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | The format for the module. | +| `style` | `"white bold"` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables -| Variable | Default | Description | +| Zmienne | Default | Description | | --------- | ------- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: This variable can only be used as a part of a style string ### Examples @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2626,7 +2691,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | ------- | ------------------------------------ | | shlvl | `3` | The current value of `SHLVL` | | symbol | | Mirrors the value of option `symbol` | @@ -2660,7 +2725,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | ------------ | ------------------------------------ | | env | `centos.img` | The current Singularity image | | symbol | | Mirrors the value of option `symbol` | @@ -2710,7 +2775,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | -------------- | ------- | ------------------------------------------------------------------------------------------- | | status | `127` | The exit code of the last command | | int | `127` | The exit code of the last command | @@ -2761,7 +2826,7 @@ By default the `swift` module shows the currently installed version of [Swift](h ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | -------- | ------------------------------------ | | version | `v5.2.4` | The version of `swift` | | symbol | | Mirrors the value of option `symbol` | @@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve By default 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 +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### Options @@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met: | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | | `style` | `"bold 105"` | The style for the module. | @@ -2808,7 +2873,7 @@ By default the module will be shown if any of the following conditions are met: ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | ---------- | ------------------------------------ | | version | `v0.12.24` | The version of `terraform` | | workspace | `default` | The current Terraform workspace | @@ -2863,7 +2928,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | ---------- | ----------------------------------- | | time | `13:08:10` | The current time. | | style\* | | Mirrors the value of option `style` | @@ -2910,10 +2975,10 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` ### 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. | +| Zmienne | 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 @@ -2949,7 +3014,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | ---------------- | ------------------------------------ | | version | `Vagrant 2.2.10` | The version of `Vagrant` | | symbol | | Mirrors the value of option `symbol` | @@ -2987,7 +3052,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | ------- | ------------------------------------ | | version | `v0.2` | The version of `v` | | symbol | | Mirrors the value of option `symbol` | @@ -3016,7 +3081,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | ------------------------------------------- | ------------------------------------ | | repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name | | symbol | | Mirrors the value of option `symbol` | @@ -3054,7 +3119,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h ### Variables -| Variable | Example | Description | +| Zmienne | Example | Description | | --------- | -------- | ------------------------------------ | | version | `v0.6.0` | The version of `zig` | | symbol | | Mirrors the value of option `symbol` | @@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### Options | Option | Default | Description | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3120,7 +3193,7 @@ The order in which custom modules are shown can be individually set by including ### Variables -| Variable | Description | +| Zmienne | Description | | --------- | -------------------------------------- | | output | The output of shell command in `shell` | | symbol | Mirrors the value of option `symbol` | @@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/pl-PL/faq/README.md b/docs/pl-PL/faq/README.md index 9fe9b6767..b789f656d 100644 --- a/docs/pl-PL/faq/README.md +++ b/docs/pl-PL/faq/README.md @@ -56,9 +56,35 @@ Jeżeli podczas używania gotowych instalacji (np. na CentOS 6 lub 7) pojawia si sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` -## W wierszu poleceń zauważyłem symbole których się nie spodziewałem bądź nie rozumiem. Co one oznaczają? +## Why do I see `Executing command "..." timed out.` warnings? -Jeśli zauważyłeś symbole których nie rozpoznajesz, możesz użyć `starship explain` aby uzyskać szczegółowy opis obecnie wyświetlanych modułów. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. + +## I see symbols I don't understand or expect, what do they mean? + +If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. + +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` ## Why don't I see a glyph symbol in my prompt? @@ -79,9 +105,9 @@ The first line should produce a [snake emoji](https://emojipedia.org/snake/), wh 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) -## Jak odinstalować Starship? +## How do I uninstall Starship? -Starship można odinstalować równie łatwo jak przebiega proces instalacji. +Starship is just as easy to uninstall as it is to install in the first place. 1. Usuń zawartość konfiguracji powłoki (np. `~/.bashrc`) służącą do zainicjalizowania Starship. 1. Usuń plik wykonywalny programu Starship. diff --git a/docs/pl-PL/guide/README.md b/docs/pl-PL/guide/README.md index e5f014bcc..1b081bf76 100644 --- a/docs/pl-PL/guide/README.md +++ b/docs/pl-PL/guide/README.md @@ -181,7 +181,7 @@ #### Instalacja za pomocą menedżera pakietów - ##### Przykład: [Homebrew](https://brew.sh/): + ##### With [Homebrew](https://brew.sh/): ```sh brew install starship @@ -304,37 +304,9 @@ Jeśli płynnie władasz językiem innym niż angielski, bardzo doceniamy każd Jeżeli chcesz wspomóc tworzenie starship, zapoznaj się z naszym [Poradnikiem Współpracy](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Ponadto możesz wejść na nasz [serwer Discord](https://discord.gg/8Jzqu3T) i się przywitać. 👋 -### Współtwórcy kodu - -Ten projekt istnieje dzięki pomocy wszystkich zaangażowanych osób. [[Wspomóż nas](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. - - -### Wsparcie finansowe - -Udziel wsparcia finansowego i pomóż nam utrzymywać społeczność. [[Wspomóż nas](https://opencollective.com/starship/contribute)] - -#### Osoby prywatne - - - -#### Organizacje - -Wspieraj ten projekt za pomocą swojej organizacji. Twoje logo pojawi się tutaj z linkiem do Twojej witryny. [[Wspomóż nas](https://opencollective.com/starship/contribute)] - - - - - - - - - - - - ## 💭Inspiracje -Zapoznaj się z wcześniejszymi projektami które zainspirowały nas do stworzenia starship. 🙏 +Please check out these previous works that helped inspire the creation of starship. 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Wiersz poleceń ZSH dla astronautów. diff --git a/docs/pl-PL/installing/README.md b/docs/pl-PL/installing/README.md index 7675d70a9..1ba11e283 100644 --- a/docs/pl-PL/installing/README.md +++ b/docs/pl-PL/installing/README.md @@ -35,6 +35,16 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Instalacja + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) ### Getting the Binary diff --git a/docs/pl-PL/presets/README.md b/docs/pl-PL/presets/README.md index 8bb7b266d..d6858fa18 100644 --- a/docs/pl-PL/presets/README.md +++ b/docs/pl-PL/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### Konfiguracja + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/pt-BR/advanced-config/README.md b/docs/pt-BR/advanced-config/README.md index cf90c06e7..dbf1601fa 100644 --- a/docs/pt-BR/advanced-config/README.md +++ b/docs/pt-BR/advanced-config/README.md @@ -31,11 +31,23 @@ trap blastoff DEBUG # Trap Inicia o debug antes de iniciar o starship eval $(starship init bash) ``` -## Altera o título da janela +## Custom pre-prompt and pre-execution Commands in PowerShell -Alguns shell prompts iram alterar o titulo da janela automaticamente para você (e.x: para espelhar o diretório atual). Fish faz isso por padrão. Starship não faz isso, mas é bastante simples adicionar esta funcionalidade ao `bash` ou `zsh`. +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering: -Primeiro, defina uma função de alteração de titulo de janela (é o mesmo para bash e zsh): +Create a function named `Invoke-Starship-PreCommand` + +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") +} +``` + +## 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(){ @@ -43,23 +55,23 @@ function set_win_title(){ } ``` -Você pode usar variáveis para customizar o titulo (`$USER`, `$HOSTNAME`, e `$PWD` são escolhas populares). +You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). -No `bash`, defina esta função como a precedente da função starship: +In `bash`, set this function to be the precmd starship function: ```bash starship_precmd_user_func="set_win_title" ``` -No `zsh`, adicione no array `precmd_functions`: +In `zsh`, add this to the `precmd_functions` array: ```bash precmd_functions+=(set_win_title) ``` -Se você gostar do resultado, adicione esta linha ao seu arquivo de configuração de shell (`~/.bashrc` or `~/.zshrc`) para torna-lo permanente. +If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. -Por exemplo, se você quiser exibir seu diretório atual no seu titulo de aba do terminal, adicione o seguinte snippet ao seu `~/.bashrc` ou `~/.zshrc`: +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(){ @@ -68,9 +80,20 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` -## Ativando o Prompt Direito +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. -Alguns shells suportam um prompt no lado direito que renderiza na mesma linha do input. Starship consegue definir o conteúdo do prompt direito usando a opção `right_format`. Qualquer módulo pode ser usado no `format` é suportado o `right_format`. A variável `$all` só irá alterar os módulos que não usaram de forma explicita o `format` ou `right_format`. +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + +## Enable Right Prompt + +Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [fill module](/config/#fill). @@ -81,14 +104,14 @@ Note: The right prompt is a single line following the input location. To right a ```toml # ~/.config/starship.toml -# Um prompt esquerdo minimo +# A minimal left prompt format = """$character""" -# Move o resto do prompt para direita +# move the rest of the prompt to the right right_format = """$all""" ``` -Gera um prompt parecido com o seguinte: +Produces a prompt like the following: ``` ▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s diff --git a/docs/pt-BR/config/README.md b/docs/pt-BR/config/README.md index 60afc3a1b..e39b100e9 100644 --- a/docs/pt-BR/config/README.md +++ b/docs/pt-BR/config/README.md @@ -142,13 +142,13 @@ Está é a lista de opções de configuração de prompt. ### Opções -| Opções | Padrão | Descrição | -| ----------------- | ------------------------------ | ---------------------------------------------------------------- | -| `format` | [link](#default-prompt-format) | Configura o formato do prompt. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | -| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | -| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | -| `add_newline` | `true` | Inserts blank line between shell prompts. | +| Opções | Padrão | Descrição | +| ----------------- | ------------------------------ | ---------------------------------------------------------------------- | +| `format` | [link](#default-prompt-format) | Configura o formato do prompt. | +| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `scan_timeout` | `30` | Tempo limite para escanear arquivos (em milissegundos). | +| `command_timeout` | `500` | Tempo limite de execução de comandos pelo starship (em milissegundos). | +| `add_newline` | `true` | Insere linha vazia entre os prompts do shell. | ### Exemplo @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -252,13 +253,13 @@ format="$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +O módulo `aws` exibi a região e perfil atual do AWS. Isto é baseado nas variáveis de env `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` contidas no arquivo `~/.aws/config`. Este modulo exibi também tempo de expiração de credenciais temporarias. -When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. +Quando usar [aws-vault](https://github.com/99designs/aws-vault) o perfil é lido da variável `AWS_VAULT` e o tempo de expiração de credenciais é lida da variável de env `AWS_SESSION_EXPIRATION`. -When using [awsu](https://github.com/kreuzwerker/awsu) the profile is read from the `AWSU_PROFILE` env var. +Quando usar [awsu](https://github.com/kreuzwerker/awsu) o perfil é lido da varável de env `AWSU_PROFILE`. -When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var. +Quando usar [AWSume](https://awsu.me) o perfil é lido da variável `AWSUME_PROFILE` e o tempo de expiração de credenciais é lida da variável de env `AWSUME_EXPIRATION`. ### Opções @@ -281,7 +282,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | Espelha o valor da opção `símbolo` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplos @@ -326,7 +327,7 @@ symbol = "🅰 " ## Bateria -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%. +O módulo `battery` exibe o quanto a bateria do dispositivo está carregada e o estado atual de carregamento. O módulo é visível somente quando a bateria está abaixo de 10%. ### Opções @@ -354,7 +355,7 @@ discharging_symbol = "💀 " ### Indicador de bateria -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. Os valores padrão são os seguintes: +A configuração `display` é usada para definir quando o indicador de bateria deve ser exibido (threshold), qual deve ser o simbolo(symbol) e como você gostaria de exibir (style). Se nenhum `display` for fornecido. Os valores padrão são os seguintes: ```toml [[battery.display]] @@ -362,11 +363,11 @@ threshold = 10 style = "bold red" ``` -The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option. +O valor padrão das opções `charging_symbol` e `discharging_symbol`é respectivamente o valor das opções `battery`'s `charging_symbol` e `discharging_symbol`. #### Opções -The `display` option is an array of the following table. +A opção `display` é um array da seguinte tabela. | Opções | Padrão | Descrição | | -------------------- | ---------- | -------------------------------------------------------------------------------------------------- | @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -393,24 +394,24 @@ discharging_symbol = 💦 ## Caractere -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +O módulo `character` exibe um caracter (normalmente uma seta) ao lado de onde o texto começa a ser inserido no terminal. -The character will tell you whether the last command was successful or not. It can do this in two ways: +O caractere vai te dizer se o ultimo comando foi bem sucedido ou não. Você pode fazer isto de duas maneiras: - alterando a cor (`red`/`green`) - alterando a forma (`❯`/`✖`) -By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). +Por padrão ele apenas muda de cor. Se você deseja alterar o formato de uma olhada [neste exemplo](#with-custom-error-shape). ::: warning -`error_symbol` is not supported on elvish and nu shell. +`error_symbol` não é suportado no elvish e nu shell. ::: ::: warning -`vicmd_symbol` is only supported in fish and zsh. +`vicmd_symbol` é suportado apenas no fish e zsh. ::: @@ -463,7 +464,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: +O módulo `cmake` exibe a versão instalada do [CMake](https://cmake.org/). Por padrão o módulo será ativo se qualquer das condições a seguir for atendida: - O diretorio atual cotem um arquivo `CMakeLists.txt` - O diretorio atual tem um arquivo `CMakeCache.txt` @@ -489,7 +490,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ## COBOL / GNUCOBOL @@ -519,46 +520,46 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ## Tempo de execução do comando -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. +O módulo `cmd_duration` exibi o tempo que o ultimo comando levou para executar. O módulo vai exibir somente se o comando levar mais de dois segundos, ou o valor de configuração `min_time` existir. -::: warning Do not hook the DEBUG trap in Bash +::: warning Não utilize o DEBUG-trap no 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. +Se você esta rodando o Starship no `bash`, você não deve ativar a armadilha `DEBUG` após rodar `eval $(starship init $0)`, ou este módulo **vai** quebrar. ::: -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. +Usuários do bash que precisam de funções pre-executadas podem usar [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simplesmente defina os arrays `preexec_functions` e `precmd_functions` antes de rodar `eval $(starship init $0)`, e depois pode proceder normalmente. ### Opções -| Opções | Padrão | Descrição | -| -------------------- | ----------------------------- | ---------------------------------------------------------- | -| `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) "` | O formato do módulo. | -| `style` | `"bold yellow"` | O estilo do módulo. | -| `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). | +| Opções | Padrão | Descrição | +| -------------------- | ----------------------------- | ------------------------------------------------------------- | +| `min_time` | `2_000` | Duração mais curta para exibir o tempo (em milissegundos). | +| `show_milliseconds` | `false` | Exibir milissegundos ou invés de segundos para duração. | +| `format` | `"took [$duration]($style) "` | O formato do módulo. | +| `style` | `"bold yellow"` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `cmd_duration`. | +| `show_notifications` | `false` | Exibi notificações no desktop quando o comando for concluído. | +| `min_time_to_notify` | `45_000` | Tempo minimo para notificação (em milissegundos). | ::: 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`. +Para exibir notificações requer que o starship seja construído com suporte para `rust-notify`. Você consegue verificar se seu starship suporta notificações rodando `STARSHIP_LOG=debug starship module cmd_duration -d 60000` quando `show_notifications` é definido como `true`. ::: ### Variáveis -| Variável | Exemplo | Descrição | -| --------- | -------- | --------------------------------------- | -| duration | `16m40s` | The time it took to execute the command | -| style\* | | Espelha o valor da opção `style` | +| Variável | Exemplo | Descrição | +| --------- | -------- | ----------------------------------------- | +| duration | `16m40s` | O tempo que levou para executar o comando | +| style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -576,30 +577,30 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e ::: tip -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +Isso não suprime o modificador de prompt do conda, você pode executar `conda config --set changeps1 False`. ::: ### Opções -| Opções | Padrão | Descrição | -| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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"` | O estilo do módulo. | -| `format` | `"via [$symbol$environment]($style) "` | O formato do módulo. | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | Disables the `conda` module. | +| Opções | Padrão | Descrição | +| ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | O número de diretórios do envirionment path deve ser truncado, se o environment foi criado via `conda create -p [path]`. `0` quer dizer sem truncação. Também consulte o módulo [`directory`](#directory). | +| `symbol` | `"🅒 "` | O simbolo usado antes do nome do environment. | +| `style` | `"bold green"` | O estilo do módulo. | +| `format` | `"via [$symbol$environment]($style) "` | O formato do módulo. | +| `ignore_base` | `true` | Ignora o environment `base` quando ativado. | +| `disabled` | `false` | Desabilita o módulo `conda`. | ### Variáveis | Variável | Exemplo | Descrição | | ----------- | ------------ | --------------------------------- | -| environment | `astronauts` | The current conda environment | +| environment | `astronauts` | O environment atual do conda | | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -612,33 +613,33 @@ format = "[$symbol$environment](dimmed green) " ## Crystal -The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `crystal` exibe a versão instalada atual do [Crystal](https://crystal-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: -- The current directory contains a `shard.yml` file -- The current directory contains a `.cr` file +- O diretório atual contem um arquivo `shard.yml` +- O diretório atual contem um arquivo `.cr` ### Opções | Opções | Padrão | Descrição | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `symbol` | `"🔮 "` | O simbolo usado antes de exibir a versão do crystal. | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | | `style` | `"bold red"` | O estilo do módulo. | | `detect_extensions` | `["cr"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["shard.yml"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `disabled` | `false` | Disables the `crystal` module. | +| `disabled` | `false` | Desabilita o módulo `crystal`. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | --------- | --------------------------------- | -| version | `v0.32.1` | The version of `crystal` | +| version | `v0.32.1` | A versão do `crystal` | | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -651,11 +652,11 @@ format = "via [✨ $version](bold blue) " ## Dart -The `dart` module shows the currently installed version of [Dart](https://dart.dev/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `dart` exibe a versão atual instalada do [Dart](https://dart.dev/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: -- The current directory contains a file with `.dart` extension -- The current directory contains a `.dart_tool` directory -- The current directory contains a `pubspec.yaml`, `pubspec.yml` or `pubspec.lock` file +- O diretório atual contem algum arquivo com extensão `.dart` +- O diretório atual contem um diretório `.dart_tool` +- O diretório atual contem um arquivo `pubspec.yaml`, `pubspec.yml` ou `pubspec.lock` ### Opções @@ -663,12 +664,12 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `symbol` | `"🎯 "` | Um formato de string que representa o simbolo do Dart | | `detect_extensions` | `["dart"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[".dart_tool"]` | Quais pastas devem ativar este módulo. | | `style` | `"bold blue"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `dart` module. | +| `disabled` | `false` | Desabilita o módulo `dart`. | ### Variáveis @@ -678,7 +679,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -691,8 +692,8 @@ format = "via [🔰 $version](bold red) " ## Deno -The `deno` module shows you your currently installed version of [Deno](https://deno.land/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: -- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file +O módulo `deno` exibe a versão instalada atual do [Deno](https://deno.land/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +- O diretório contem um arquivo `mod.ts`, `mod.js`, `deps.ts` ou `deps.js` ### Opções @@ -700,18 +701,18 @@ The `deno` module shows you your currently installed version of [Deno](https://d | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------ | | `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🦕 "` | A format string representing the symbol of Deno | +| `symbol` | `"🦕 "` | Um formato de string que representa o simbolo do Deno | | `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | | `style` | `"green bold"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `deno` module. | +| `disabled` | `false` | Desabilita o módulo `deno`. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------- | --------------------------------- | -| version | `v1.8.3` | The version of `deno` | +| version | `v1.8.3` | A versão do `deno` | | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | @@ -726,28 +727,28 @@ format = "via [🦕 $version](green bold) " ## Diretório -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. +O módulo `directory` exibe o caminho do diretório atual, truncando as três pastas pai. Seu diretório será truncando na raiz do repositório git que você estiver atualmente. -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. +Quando usar a opção de estilo fish pwd, ao invés de esconder o caminho que é truncado, você vai ver um nome encurtado de cada diretório baseado no número que você habilitar para a opção. -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`. +Por exemplo, dado `~/Dev/Nix/nixpkgs/pkgs` onde `nixpkgs` é o repositório raiz e a opção esta definida para `1`. Você verá `~/D/N/nixpkgs/pkgs`, enquanto antes seria `nixpkgs/pkgs`. ### Opções -| Opções | Padrão | Descrição | -| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | -| `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) "` | O formato do módulo. | -| `style` | `"bold cyan"` | O estilo do módulo. | -| `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. | +| Opções | Padrão | Descrição | +| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------------ | +| `truncation_length` | `3` | O número de pastas pais do diretório atual que serão truncadas. | +| `truncate_to_repo` | `true` | Seu diretório será truncado ou não para a raiz do repositório git atual. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | O formato do módulo. | +| `style` | `"bold cyan"` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `directory`. | +| `read_only` | `"🔒"` | O simbolo que indica que o diretório atual é somente leitura. | +| `read_only_style` | `"red"` | O estilo para o simbolo de somente leitura. | +| `truncation_symbol` | `""` | O simbolo para prefixo de caminhos truncados. ex: "…/" | +| `home_symbol` | `"~"` | O simbolo para indicar o diretório home. |
-This module has a few advanced configuration options that control how the directory is displayed. +Este módulo tem algumas configurações avançadas que controlam como o diretório é exibido. | Advanced Option | Padrão | Descrição | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -771,10 +772,10 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Variável | Exemplo | Descrição | | --------- | --------------------- | -------------------------------- | -| path | `"D:/Projects"` | The current directory path | +| path | `"D:/Projects"` | O caminho do diretório atual | | style\* | `"black bold dimmed"` | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -788,30 +789,30 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### Opções -| Opções | Padrão | Descrição | -| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `format` | `"via [$symbol$context]($style) "` | O formato do módulo. | -| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. | -| `only_with_files` | `true` | Only show when there's a match | -| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | -| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `docker_context` module. | +| Opções | Padrão | Descrição | +| ------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------ | +| `format` | `"via [$symbol$context]($style) "` | O formato do módulo. | +| `symbol` | `"🐳 "` | O simbolo usado antes de exibir a versão do contexto docker. | +| `only_with_files` | `true` | Exibe somente quando houver um arquivo | +| `detect_extensions` | `[]` | Quais extensões devem acionar este módulo (precisa que `only_with_files` seja true). | +| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Quais arquivos devem acionar este módulo (precisa que `only_with_files` seja true). | +| `detect_folders` | `[]` | Quais pastas devem acionar este módulo (precisa que `only_with_files` seja true). | +| `style` | `"blue bold"` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `docker_context`. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------------- | --------------------------------- | -| context | `test_context` | The current docker context | +| context | `test_context` | O contexto atual do docker | | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -824,9 +825,9 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 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. +O módulo `dotnet` exibe a versão relevante do [.NET Core SDK](https://dotnet.microsoft.com/) para a pasta atual. Se o SDK foi fixado na pasta atual, a versão será exibida. Caso contrario será exibida a ultima versão instalada do SDK. -By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: +Por padrão o módulo vai apenas exibir no seu prompt quando um ou mais dos seguintes arquivos estiverem presente no diretório: - `global.json` - `project.json` @@ -837,11 +838,11 @@ By default this module will only be shown in your prompt when one or more of the - `*.fsproj` - `*.xproj` -You'll also need the .NET Core SDK installed in order to use it correctly. +Você também precisa do .NET Core SDK instalado para usá-lo corretamente. -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. +Internamente, este módulo usa seu próprio mecanismo de detecção de versão. Normalmente é duas vezes mais rápido que executar `dotnet --version`, mas pode exibir uma versão errado se o projeto .NET tiver o layout de diretório incomum. Se a precisão é mais importante que velocidade, você pode desabilitar o mecanismo definindo `heuristic = false` nas opções do modulo. -The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. +O módulo também vai exibir o Target Framework Moniker () quando o diretório atual tiver o arquivo csproj. ### Opções @@ -849,24 +850,24 @@ The module will also show the Target Framework Moniker ( Nothing is shown. -- 1 job -> `symbol` is shown. -- 2 jobs or more -> `symbol` + `number` are shown. +- 0 jobs -> Nada é exibido. +- 1 job -> `symbol` é exibido. +- 2 jobs or more -> `symbol` + `number` é exibido. ::: warning -This module is not supported on tcsh and nu. +Este módulo não é suportado em tcsh e nu. ::: ::: warning -The `threshold` option is deprecated, but if you want to use it, the module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running. +A opção `threshold` está obsoleta, mas se você quiser usa-la, o módulo vai exibir o numero de jobs rodando se for maior que 1 ou maior que o valor configurado na `threshold`, se ele existir. Se o valor `threshold` for definido como 0, então o módulo vai exibir quando tiver 0 jobs rodando. ::: ### Opções -| Opções | Padrão | Descrição | -| ------------------ | ----------------------------- | ------------------------------------------------------------------------ | -| `threshold`\* | `1` | Show number of jobs if exceeded. | -| `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | -| `number_threshold` | `2` | Show the number of jobs if the job count is at least `number_threshold`. | -| `format` | `"[$symbol$number]($style) "` | O formato do módulo. | -| `symbol` | `"✦"` | The string used to represent the `symbol` variable. | -| `style` | `"bold blue"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `jobs` module. | - \*: This option is deprecated, please use the +| Opções | Padrão | Descrição | +| ------------------ | ----------------------------- | ------------------------------------------------------------------------- | +| `threshold`\* | `1` | Exibe o número de jobs se excedido. | +| `symbol_threshold` | `1` | Exibe `symbol` se o número de jobs for ao menos `symbol_threshold`. | +| `number_threshold` | `2` | Exibe o número de jobs se o número de jobs é ao menos `number_threshold`. | +| `format` | `"[$symbol$number]($style) "` | O formato do módulo. | +| `symbol` | `"✦"` | A string usada para representar a variável `symbol`. | +| `style` | `"bold blue"` | O estilo do módulo. | +| `disabled` | `false` | Desabilita o módulo `jobs`. | + \*: Esta opção está obsoleta, por favor use o -`number_threshold` and `symbol_threshold` options instead. +`number_threshold` e `symbol_threshold` em vez disso. ### Variáveis | Variável | Exemplo | Descrição | | --------- | ------- | --------------------------------- | -| number | `1` | The number of jobs | +| number | `1` | O número de jobs | | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1608,11 +1608,11 @@ symbol_threshold = 0 ## Julia -The `julia` module shows the currently installed version of [Julia](https://julialang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `julia` exibe a versão atual instalada do [Julia](https://julialang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: -- The 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 +- O diretório atual contem um arquivo `Project.toml` +- O diretório atual contem um arquivo `Manifest.toml` +- O diretório atual contem arquivos com a extensão `.jl` ### Opções @@ -1623,19 +1623,19 @@ The `julia` module shows the currently installed version of [Julia](https://juli | `detect_extensions` | `["jl"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `["Project.toml", "Manifest.toml"]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. | +| `symbol` | `"ஃ "` | O formato de string que representa o simbolo do Julia. | | `style` | `"bold purple"` | O estilo do módulo. | -| `disabled` | `false` | Disables the `julia` module. | +| `disabled` | `false` | Desabilita o módulo `julia`. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | -------- | --------------------------------- | -| version | `v1.4.0` | The version of `julia` | +| version | `v1.4.0` | A versão do `julia` | | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1648,9 +1648,9 @@ symbol = "∴ " ## Kotlin -The `kotlin` module shows the currently installed version of [Kotlin](https://kotlinlang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: +O módulo `kotlin` exibie a versão atual instalada do [Kotlin](https://kotlinlang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: -- The current directory contains a `.kt` or a `.kts` file +- O diretório atual contem um arquivo `.kt` ou um arquivo `.kts` ### Opções @@ -1661,20 +1661,20 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko | `detect_extensions` | `["kt", "kts"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | -| `symbol` | `"🅺 "` | A format string representing the symbol of Kotlin. | +| `symbol` | `"🅺 "` | O formato de string que representa o simbolo do Kotlin. | | `style` | `"bold blue"` | O estilo do módulo. | -| `kotlin_binary` | `"kotlin"` | Configures the kotlin binary that Starship executes when getting the version. | -| `disabled` | `false` | Disables the `kotlin` module. | +| `kotlin_binary` | `"kotlin"` | Configura o binário do kotlin que o Starship executa para obter a versão. | +| `disabled` | `false` | Desabilita o módulo `kotlin`. | ### Variáveis | Variável | Exemplo | Descrição | | --------- | --------- | --------------------------------- | -| version | `v1.4.21` | The version of `kotlin` | +| version | `v1.4.21` | A versão do `kotlin` | | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1699,7 +1699,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo é desativado por padrão. Para ativa-lo, defina `disabled` para `false` no seu arquivo de configuração. ::: @@ -1710,19 +1710,19 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | O formato do módulo. | | `style` | `"cyan bold"` | O estilo do módulo. | -| `context_aliases` | | Table of context aliases to display. | -| `disabled` | `true` | Disables the `kubernetes` module. | +| `context_aliases` | | Tabela de aliases de contexto para exibir. | +| `disabled` | `true` | Desabilita o módulo `kubernetes`. | ### Variáveis -| Variável | Exemplo | Descrição | -| --------- | -------------------- | ---------------------------------------- | -| context | `starship-cluster` | The current kubernetes context | -| namespace | `starship-namespace` | If set, the current kubernetes namespace | -| symbol | | Espelha o valor da opção `symbol` | -| style\* | | Espelha o valor da opção `style` | +| Variável | Exemplo | Descrição | +| --------- | -------------------- | ------------------------------------------- | +| context | `starship-cluster` | O contexto atual do kubernetes | +| namespace | `starship-namespace` | Se definido o namespace atual do kubernetes | +| symbol | | Espelha o valor da opção `symbol` | +| style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1759,15 +1759,15 @@ Long and automatically generated cluster names can be identified and shortened u "gke_.*_(?P[\\w-]+)" = "gke-$cluster" ``` -## Line Break +## Quebra de linha -The `line_break` module separates the prompt into two lines. +O módulo `line_break` separa o prompt em duas linhas. ### Opções -| Opções | Padrão | Descrição | -| ---------- | ------- | ------------------------------------------------------------------ | -| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | +| Opções | Padrão | Descrição | +| ---------- | ------- | ----------------------------------------------------------------------------------- | +| `disabled` | `false` | Desabilita o módulo `line_break`, fazendo com que o prompt seja em uma unica linha. | ### Exemplo @@ -1808,7 +1808,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1819,7 +1819,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o format = "via [🌕 $version](bold blue) " ``` -## Memory Usage +## Uso de memória The `memory_usage` module shows current system memory and swap usage. @@ -1827,7 +1827,7 @@ 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. +Este módulo é desativado por padrão. Para ativa-lo, defina `disabled` para `false` no seu arquivo de configuração. ::: @@ -1878,7 +1878,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc | `style` | `"bold purple"` | O estilo do módulo. | | `format` | `"on [$symbol$branch]($style) "` | O formato do módulo. | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `truncation_symbol` | `"…"` | O simbolo usado para indicar que o nome braço foi truncado. | | `disabled` | `true` | Disables the `hg_branch` module. | ### Variáveis @@ -1889,7 +1889,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1906,7 +1906,7 @@ truncation_symbol = "" The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: -- The current directory contains a `nim.cfg` file +- O diretório atual contem um arquivo `nim.cfg` - 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 @@ -1915,7 +1915,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Opções | Padrão | Descrição | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | +| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | | `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | | `detect_extensions` | `["nim", "nims", "nimble"]` | Quais extensões devem ativar este módulo. | @@ -1932,7 +1932,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1968,7 +1968,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -1986,7 +1986,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: -- The current directory contains a `package.json` file +- O diretório atual contem o arquivo `package.json` - The current directory contains a `.node-version` file - The current directory contains a `.nvmrc` file - The current directory contains a `node_modules` directory @@ -2015,7 +2015,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2062,7 +2062,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2095,7 +2095,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2110,7 +2110,7 @@ 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`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2124,6 +2124,7 @@ The `package` module is shown when the current directory is the repository for a - [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present - [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present - [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present - [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present > ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. @@ -2147,7 +2148,7 @@ The `package` module is shown when the current directory is the repository for a | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2202,7 +2203,7 @@ format = "via [🦪 $version]($style) " The `php` module shows the currently installed version of [PHP](https://www.php.net/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida: -- The current directory contains a `composer.json` file +- O diretório atual contem um arquivo `composer.json` - The current directory contains a `.php-version` file - The current directory contains a `.php` extension @@ -2227,7 +2228,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2238,6 +2239,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +Por padrão o módulo vai exibir se uma das condições a seguir for atendida: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### Opções + +| Opções | Padrão | Descrição | +| ---------------- | -------------------------------- | ------------------------------------------------------------------------------------ | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | O estilo do módulo. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variáveis + +| Variável | Exemplo | Descrição | +| --------- | ---------- | --------------------------------- | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| symbol | | Espelha o valor da opção `symbol` | +| style\* | | Espelha o valor da opção `style` | + +\*: Essa variável só pode ser usada como parte de uma string de estilo + +### Exemplo + +#### With Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. Por padrão o módulo vai exibir se uma das condições a seguir for atendida: @@ -2266,7 +2324,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2435,7 +2493,7 @@ By default the `red` module shows the currently installed version of [Red](https | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2475,7 +2533,7 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2514,7 +2572,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2554,7 +2612,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2571,31 +2629,35 @@ The `shell` module shows an indicator for currently used shell. ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo é desativado por padrão. Para ativa-lo, defina `disabled` para `false` no seu arquivo de configuração. ::: ### Opções -| Opções | Padrão | Descrição | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | O formato do módulo. | -| `disabled` | `true` | Disables the `shell` module. | +| Opções | Padrão | Descrição | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | O formato do módulo. | +| `style` | `"white bold"` | O estilo do módulo. | +| `disabled` | `true` | Disables the `shell` module. | ### Variáveis | Variável | Padrão | Descrição | | --------- | ------ | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplos @@ -2606,6 +2668,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2632,7 +2695,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2666,7 +2729,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2683,7 +2746,7 @@ The `status` module displays the exit code of the previous command. The module w ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo é desativado por padrão. Para ativa-lo, defina `disabled` para `false` no seu arquivo de configuração. ::: @@ -2722,7 +2785,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2767,7 +2830,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2791,7 +2854,7 @@ By default the Terraform version is not shown, since this is slow for current ve Por padrão o módulo vai exibir se uma das condições a seguir for atendida: - The current directory contains a `.terraform` folder -- Current directory contains a file with the `.tf` or `.hcl` extensions +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### Opções @@ -2800,7 +2863,7 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Quais extensões devem ativar este módulo. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Quais extensões devem ativar este módulo. | | `detect_files` | `[]` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[".terraform"]` | Quais pastas devem ativar este módulo. | | `style` | `"bold 105"` | O estilo do módulo. | @@ -2815,7 +2878,7 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida: | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2843,7 +2906,7 @@ The `time` module shows the current **local** time. The `format` configuration v ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Este módulo é desativado por padrão. Para ativa-lo, defina `disabled` para `false` no seu arquivo de configuração. ::: @@ -2868,7 +2931,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -2955,7 +3018,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -3022,7 +3085,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Espelha o valor da opção `symbol` | | style\* | `black bold dimmed` | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -3060,7 +3123,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | Espelha o valor da opção `symbol` | | style\* | | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo ### Exemplo @@ -3101,11 +3164,19 @@ The order in which custom modules are shown can be individually set by including ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### Opções | Opções | Padrão | Descrição | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3126,9 +3197,9 @@ The order in which custom modules are shown can be individually set by including | symbol | Espelha o valor da opção `symbol` | | style\* | Espelha o valor da opção `style` | -\*: This variable can only be used as a part of a style string +\*: Essa variável só pode ser usada como parte de uma string de estilo -#### Comandos personalizados de shell +#### Custom command shell `shell` accepts a non-empty list of strings, where: @@ -3164,12 +3235,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/pt-BR/faq/README.md b/docs/pt-BR/faq/README.md index c660659dc..386049eb4 100644 --- a/docs/pt-BR/faq/README.md +++ b/docs/pt-BR/faq/README.md @@ -56,41 +56,67 @@ Se você está tendo um erro como "_version 'GLIBC_2.18' not found (required by sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` -## Eu vejo símbolos que não entendo ou não esperado, o que isso significa? +## Why do I see `Executing command "..." timed out.` warnings? -Se você vê símbolos que não reconhece você pode usar `starship explain` para exibir os módulos que estão sendo mostrados no momento. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. -## Por que não consigo visualizar um simbolo glifo no meu prompt? +## I see symbols I don't understand or expect, what do they mean? -A causa mais comum é a configuração incorreta do sistema. Algumas distribuições Linux em particular não vem com suporte de fontes pronto para uso. Você deve conferir os pontos abaixo: +If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. + +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + +## 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: - Sua localização está configurada como UTF-8, como por exemplo `de_DE.UTF-8` ou `ja_JP.UTF-8`. Se `LC_ALL` não estiver configurado como UTF-8, [você deve mudar](https://www.tecmint.com/set-system-locales-in-linux/). - Você tem uma fonte de emoji instalda. A maioria dos sistemas vem com uma fonte de emoji instalada como padrão, mas alguns não (principalmente o Arch Linux). Você pode instalar uma em seu sistema, através do gerenciador de pacotes-[noto emoji](https://www.google.com/get/noto/help/emoji/) é uma escolha popular. - Você está usando uma [Nerd Font](https://www.nerdfonts.com/). -Para testar seu sistema, execute o comando abaixo em um terminal: +To test your system, run the following commands in a terminal: ```sh echo -e "\xf0\x9f\x90\x8d" echo -e "\xee\x82\xa0" ``` -A primeira linha deve produzir um [emoji de cobra](https://emojipedia.org/snake/), enquanto a segunda linha deve produzir um [um simbolo de bifurcação (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). +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). -Se um dos símbolos acima falhar seu sistema ainda está configurado de forma errada. Infelizmente, obter a configuração de fontes correta as vezes é difícil. Usuários no Discord podem te ajudar. Se os dois símbolos acima exibirem de forma correta, mas você ainda continua sem visualizar no Starship, [registre um erro!](https://github.com/starship/starship/issues/new/choose) +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) -## Como eu desinstalo o Starship? +## How do I uninstall Starship? -O Starship é tão fácil de desinstalar tão como é para instalar. +Starship is just as easy to uninstall as it is to install in the first place. 1. Remova qualquer linha da configuração do seu shell (ex: `~/.bashrc`) usada para iniciar o Starship. 1. Delete o binário do Starship. -Se o Starship foi instalando usando algum gerenciador de pacotes, por favor consulte as documentações do mesmo para instruções de desinstalação. +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. -Se o Starship foi instalado usando o script de instalação, o comando abaixo irá remover o binário: +If Starship was installed using the install script, the following command will delete the binary: ```sh -# Localiza e deleta o binario do starship +# Locate and delete the starship binary sh -c 'rm "$(which starship)"' ``` diff --git a/docs/pt-BR/guide/README.md b/docs/pt-BR/guide/README.md index e17fedccc..1fad88d8d 100644 --- a/docs/pt-BR/guide/README.md +++ b/docs/pt-BR/guide/README.md @@ -181,7 +181,7 @@ #### Instalar via gerenciador de pacotes - ##### Exemplo: [Homebrew](https://brew.sh/): + ##### Com o [Homebrew](https://brew.sh/): ```sh brew install starship @@ -304,37 +304,9 @@ Se você é fluente em uma linguá não inglesa, nos ficaríamos gratos por qual Se você está interessado em ajudar contribuindo com o projeto, dê uma olhada no nosso [Guia de Contribuição](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Além disso, sinta-se à vontade para entrar no nosso [servidor no Discord](https://discord.gg/8Jzqu3T) e dizer oi. 👋 -### Contribuidores de código - -Este projeto existe graças a todas as pessoas que contribuem. [[Contribuir](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. - - -### Contribuidores Financeiros - -Torne-se um contribuidor financeiro e nos ajude a sustentar a nossa comunidade. [[Contribuir](https://opencollective.com/starship/contribute)] - -#### Pessoas - - - -#### Organizações - -Apoie este projeto com sua organização. Seu logotipo aparecerá aqui com um link para o seu site. [[Contribuir](https://opencollective.com/starship/contribute)] - - - - - - - - - - - - ## 💭 Inspirado por -Por favor, confira estes projetos anteriores que ajudaram a inspirar a criação do startship. 🙏 +Please check out these previous works that helped inspire the creation of starship. 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - Um prompt ZSH para astronautas. @@ -344,9 +316,9 @@ Por favor, confira estes projetos anteriores que ajudaram a inspirar a criação


- Ícone de foguete do Starship + Starship rocket icon

## 📝 Licença -Todos os direitos reservados © 2019-Presente, [Contribuidores Starship](https://github.com/starship/starship/graphs/contributors).
Este projeto está licenciado pelo [ISC](https://github.com/starship/starship/blob/master/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/pt-BR/installing/README.md b/docs/pt-BR/installing/README.md index 6b8a7e233..1283fa1c2 100644 --- a/docs/pt-BR/installing/README.md +++ b/docs/pt-BR/installing/README.md @@ -35,9 +35,19 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Instalação + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) -### Obtendo o Binário +### Getting the Binary #### Imperativamente @@ -47,7 +57,7 @@ nix-env -iA nixos.starship #### Declarativo, usuário único, via [home-manager](https://github.com/nix-community/home-manager) -Ative o modulo `programs.starship` em seu arquivo `home.nix`, e adicione suas configurações +Enable the `programs.starship` module in your `home.nix` file, and add your settings ```nix { @@ -69,7 +79,7 @@ Ative o modulo `programs.starship` em seu arquivo `home.nix`, e adicione suas co } ``` -então execute +then run ```sh home-manager switch @@ -77,7 +87,7 @@ home-manager switch #### Declarativo, em todo o sistema com NixOS -Adicione `pkgs.starship` em `environment.systemPackages` no arquivo `configuration.nix`, então execute +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch diff --git a/docs/pt-BR/presets/README.md b/docs/pt-BR/presets/README.md index 8668fe579..1bd43e102 100644 --- a/docs/pt-BR/presets/README.md +++ b/docs/pt-BR/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### Configuração + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/pt-PT/advanced-config/README.md b/docs/pt-PT/advanced-config/README.md index d7b9ec4dc..1bda2ae1a 100644 --- a/docs/pt-PT/advanced-config/README.md +++ b/docs/pt-PT/advanced-config/README.md @@ -31,6 +31,18 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship eval $(starship init bash) ``` +## Custom pre-prompt and pre-execution Commands in PowerShell + +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +Create a function named `Invoke-Starship-PreCommand` + +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") +} +``` + ## 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`. @@ -68,6 +80,17 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. diff --git a/docs/pt-PT/config/README.md b/docs/pt-PT/config/README.md index 2fb31aa12..fe9357b7b 100644 --- a/docs/pt-PT/config/README.md +++ b/docs/pt-PT/config/README.md @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -788,7 +789,7 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### Options @@ -983,7 +984,7 @@ default = "unknown user" | Option | Default | Description | | ---------- | ------------------------------ | ---------------------------------------------------------------------------- | -| `symbol` | | The symbol used before displaying the variable value. | +| `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. | @@ -1065,10 +1066,11 @@ The `fill` module fills any extra space on the line with a symbol. If multiple ` ### Options -| Option | Default | Description | -| -------- | -------------- | --------------------------------- | -| `symbol` | `"."` | The symbol used to fill the line. | -| `style` | `"bold black"` | The style for the module. | +| Option | Default | Description | +| ---------- | -------------- | --------------------------------- | +| `symbol` | `"."` | The symbol used to fill the line. | +| `style` | `"bold black"` | The style for the module. | +| `disabled` | `false` | Disables the `fill` module | ### Example @@ -2110,7 +2112,7 @@ 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`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a - [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present - [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present - [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present - [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present > ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### Options + +| Option | Default | Description | +| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | The style for the module. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| 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 Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: @@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | The format for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | The format for the module. | +| `style` | `"white bold"` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables | Variable | Default | Description | | --------- | ------- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: This variable can only be used as a part of a style string ### Examples @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve By default 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 +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### Options @@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met: | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | | `style` | `"bold 105"` | The style for the module. | @@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### Options | Option | Default | Description | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/pt-PT/faq/README.md b/docs/pt-PT/faq/README.md index 2b3096c17..8422ee2e3 100644 --- a/docs/pt-PT/faq/README.md +++ b/docs/pt-PT/faq/README.md @@ -56,10 +56,36 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` +## Why do I see `Executing command "..." timed out.` warnings? + +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. + ## I see symbols I don't understand or expect, what do they mean? If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + ## 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: diff --git a/docs/pt-PT/guide/README.md b/docs/pt-PT/guide/README.md index b91ef6c44..fb4093b57 100644 --- a/docs/pt-PT/guide/README.md +++ b/docs/pt-PT/guide/README.md @@ -181,7 +181,7 @@ #### Install via Package Manager - ##### Example: [Homebrew](https://brew.sh/): + ##### With [Homebrew](https://brew.sh/): ```sh brew install starship @@ -304,34 +304,6 @@ 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)]. - - -### 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. 🙏 diff --git a/docs/pt-PT/installing/README.md b/docs/pt-PT/installing/README.md index 6bb768504..305af749d 100644 --- a/docs/pt-PT/installing/README.md +++ b/docs/pt-PT/installing/README.md @@ -35,6 +35,16 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Installation + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) ### Getting the Binary diff --git a/docs/pt-PT/presets/README.md b/docs/pt-PT/presets/README.md index 61165f5b7..9c58dfd9e 100644 --- a/docs/pt-PT/presets/README.md +++ b/docs/pt-PT/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### Configuration + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/ru-RU/advanced-config/README.md b/docs/ru-RU/advanced-config/README.md index 551c8d970..84c3487af 100644 --- a/docs/ru-RU/advanced-config/README.md +++ b/docs/ru-RU/advanced-config/README.md @@ -31,11 +31,23 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship eval $(starship init bash) ``` -## Изменение заголовка окна +## Custom pre-prompt and pre-execution Commands in PowerShell -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish даже делает это по умолчанию. Starship не делает этого, но достаточно легко добавить эту функциональность к `bash` или `zsh`. +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Тем не менее, Starship дает вам ограниченную возможность вставить собственные функции в процедуру отображения подсказки: -Сначала задайте функцию изменения заголовка окна (идентичную в bash и zsh): +Create a function named `Invoke-Starship-PreCommand` + +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") +} +``` + +## 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(){ @@ -43,15 +55,15 @@ function set_win_title(){ } ``` -Вы можете использовать переменные для настройки этого заголовка (`$USER`, `$HOSTNAME`, и `$PWD` являются популярными вариантами). +You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). -В `bash`, установите эту функцию как функцию precmd в Starship: +In `bash`, set this function to be the precmd starship function: ```bash starship_precmd_user_func="set_win_title" ``` -В `zsh`, добавьте это в массив `precmd_functions`: +In `zsh`, add this to the `precmd_functions` array: ```bash precmd_functions+=(set_win_title) @@ -59,7 +71,7 @@ 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. -Например, если вы хотите отобразить ваш текущий каталог в заголовке вкладки терминала, добавьте следующие строки в `~/. bashrc` или `~/.zshrc`: +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(){ @@ -68,6 +80,17 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. diff --git a/docs/ru-RU/config/README.md b/docs/ru-RU/config/README.md index c33c9e9b6..14ad54fc9 100644 --- a/docs/ru-RU/config/README.md +++ b/docs/ru-RU/config/README.md @@ -146,7 +146,7 @@ format = ''' | ----------------- | -------------------------------- | ---------------------------------------------------------------- | | `format` | [ссылка](#default-prompt-format) | Настройка форматирования оболочки. | | `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | -| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | +| `scan_timeout` | `30` | Тайм-аут запуска сканирования файлов (в миллисекундах). | | `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | | `add_newline` | `true` | Inserts blank line between shell prompts. | @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -252,7 +253,7 @@ format="$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +Модуль `aws` показывает текущий регион и профиль AWS. Основано на `AWS_REGION`, `AWS_DEFAULT_REGION`, и `AWS_PROFILE` переменных окружения и файле`~/.aws/config`. This module also shows an expiration timer when using temporary credentials. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -281,7 +282,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Примеры @@ -326,7 +327,7 @@ symbol = "🅰 " ## Батарея -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%. +Модуль `battery` показывает насколько заряжена батарея девайса и статус зарядки на данный момент. Модуль виден только, если заряд батареи устройства меньше 10%. ### Опции @@ -354,7 +355,7 @@ discharging_symbol = "💀 " ### Отображение батареи -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. Значение по умолчанию: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). Если `display` не предоставлено. Значение по умолчанию: ```toml [[battery.display]] @@ -366,7 +367,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### Опции -The `display` option is an array of the following table. +Опция `display` представляет собой массив следующей таблицы. | Параметр | По умолчанию | Описание | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -393,9 +394,9 @@ discharging_symbol = 💦 ## Символ -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +Модуль `character` показывает символ (обычно, стрелка) рядом с вводимым текстом в терминале. -The character will tell you whether the last command was successful or not. It can do this in two ways: +Символ показывает, была ли последняя команда успешной или нет. It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -489,7 +490,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ## COBOL / GNUCOBOL @@ -519,33 +520,33 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ## Длительность команды -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. +Модуль `cmd_duration` показывает время исполнения последней команды. Модуль будет показан только, если команда заняла более двух секунд, или если задан параметр `min_time`. -::: warning Do not hook the DEBUG trap in Bash +::: предупреждение Не подключайте ловушку DEBUG к 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. +Если вы испоьзуете Starship в `bash`, не подключайте ловушку `DEBUG` после запуска `eval $(starship init $0)`, иначе этот модуль сломается. ::: -Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. +Пользователи Bash, которым нужна функциональность, подобная preexec, могут использовать [фреймворк bash_preexec от rcaloras](https://github.com/rcaloras/bash-preexec). Просто определите массивы `preexec_functions` и `precmd_functions` перед запуском `eval $(starship init $0)`, а затем продолжайте нормально. ### Опции -| Параметр | По умолчанию | Описание | -| -------------------- | ----------------------------- | ---------------------------------------------------------- | -| `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) "` | Формат модуля. | -| `style` | `"bold yellow"` | Стиль модуля. | -| `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). | +| Параметр | По умолчанию | Описание | +| -------------------- | ----------------------------- | -------------------------------------------------------------------- | +| `min_time` | `2_000` | Кратчайшая продолжительность для показа времени (в миллисекундах). | +| `show_milliseconds` | `false` | Показывать миллисекунды в дополнение к секундам в продолжительности. | +| `format` | `"took [$duration]($style) "` | Формат модуля. | +| `style` | `"bold yellow"` | Стиль модуля. | +| `disabled` | `false` | Отключает модуль `cmd_duration`. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | -::: tip +::: 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`. @@ -558,7 +559,7 @@ Showing desktop notifications requires starship to be built with `rust-notify` s | duration | `16m40s` | The time it took to execute the command | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -570,26 +571,26 @@ min_time = 500 format = "underwent [$duration](bold yellow)" ``` -## Conda +## Конда The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. -::: tip +::: tip Подсказка -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +Это не подавляет модификатор командной строки самой conda. Возможно, вы захотите запустить `conda config --set changeps1 False`. ::: ### Опции -| Параметр | По умолчанию | Описание | -| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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"` | Стиль модуля. | -| `format` | `"via [$symbol$environment]($style) "` | Формат модуля. | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | Disables the `conda` module. | +| Параметр | По умолчанию | Описание | +| ------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `truncation_length` | `1` | Количество каталогов, в которых путь к окружению должен быть усечен, если окружение было создано через `conda create -p [path]`. `0` означает без усечения. Также смотрите модуль [`directory`](#directory). | +| `symbol` | `"🅒 "` | Символ перед названием окружения. | +| `style` | `"bold green"` | Стиль модуля. | +| `format` | `"via [$symbol$environment]($style) "` | Формат модуля. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | Отключает модуль `conda`. | ### Переменные @@ -599,7 +600,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -614,21 +615,21 @@ format = "[$symbol$environment](dimmed green) " The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default 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 +- Текущий каталог содержит файл `shard.yml` +- Текущий каталог содержит файл `.cr` ### Опции | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `symbol` | `"🔮 "` | Символ, используемый перед отображением версии crystal. | | `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `"bold red"` | Стиль модуля. | | `detect_extensions` | `["cr"]` | Which extensions should trigger this module. | | `detect_files` | `["shard.yml"]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -| `disabled` | `false` | Disables the `crystal` module. | +| `disabled` | `false` | Отключает модуль `crystal`. | ### Переменные @@ -638,7 +639,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -678,7 +679,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -692,7 +693,7 @@ format = "via [🔰 $version](bold red) " ## Deno The `deno` module shows you your currently installed version of [Deno](https://deno.land/). By default the module will be shown if any of the following conditions are met: -- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file +- Текущий каталог содержит файл `mod.ts`, `mod.js`, `deps.ts` или `deps.js` ### Опции @@ -726,33 +727,33 @@ format = "via [🦕 $version](green bold) " ## Каталог -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. +Модуль `directory` показывает путь к вашей текущей директории, усеченной до трех родительских папок. Ваш каталог также будет отсечен до корня git репозитория, в котором вы находитесь. -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. +При использовании стиля оболочки fish, вместо скрытия усеченного каталога, вы увидите укороченное имя каталога, зависимое от числа символов вы установите для этой опции. -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`. +Например, возьмем `~/Dev/Nix/nixpkgs/pkgs` где `nixpkgs` является корневым репозиторием, и в опции установлено `1`. Вы увидите `~/D/N/nixpkgs/pkgs`, а до этого было бы `nixpkgs/pkgs`. ### Опции -| Параметр | По умолчанию | Описание | -| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | -| `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) "` | Формат модуля. | -| `style` | `"bold cyan"` | Стиль модуля. | -| `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. | +| Параметр | По умолчанию | Описание | +| ------------------- | -------------------------------------------------- | ---------------------------------------------------------------------------- | +| `truncation_length` | `3` | Количество родительских папок, к которым должен быть усечен текущий каталог. | +| `truncate_to_repo` | `true` | Следует или нет обрезать до корня репозитория git, в котором вы находитесь. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Формат модуля. | +| `style` | `"bold cyan"` | Стиль модуля. | +| `disabled` | `false` | Отключает модуль `directory`. | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
-This module has a few advanced configuration options that control how the directory is displayed. +Этот модуль имеет несколько расширенных опций конфигурации, которые контролируют отображение каталога. | Advanced Option | По умолчанию | Описание | | --------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | +| `fish_style_pwd_dir_length` | `0` | Количество символов, используемых при использовании логики создания пути из fish. | | `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. | `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. @@ -763,7 +764,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an "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`. +`fish_style_pwd_dir_length` взаимодействует со стандартными параметрами усечения, которые могут сначала показаться странными: если он не равен нулю, элементы пути, который обычно усекается, вместо этого отображаются с указанным количеством символов. For example, the path `/built/this/city/on/rock/and/roll`, which would normally be displayed as as `rock/and/roll`, would be displayed as `/b/t/c/o/rock/and/roll` with `fish_style_pwd_dir_length = 1`--the path components that would normally be removed are displayed with a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/on/rock/and/roll`.
@@ -774,7 +775,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | path | `"D:/Projects"` | The current directory path | | style\* | `"black bold dimmed"` | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -786,9 +787,9 @@ truncation_length = 8 truncation_symbol = "…/" ``` -## Docker Context +## Контекст Docker -The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### Опции @@ -811,7 +812,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -824,7 +825,7 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 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. +The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. Если SDK был закреплен в текущей директории, будет показана закрепленная версия. В противном случае модуль отображает последнюю установленную версию SDK. By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: @@ -839,7 +840,7 @@ By default this module will only be shown in your prompt when one or more of the You'll also need the .NET Core SDK installed in order to use it correctly. -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. +Внутренне этот модуль использует свой собственный механизм определения версий. Обычно он в два раза быстрее, чем `dotnet --version`, но он может показывать неправильную версию, если ваш .NET проект имеет необычный формат каталога. Если точность важнее, чем скорость, вы можете отключить механизм опцией `heuristic = false` в настройках модуля. The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. @@ -849,13 +850,13 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$cluster" ``` -## Line Break +## Перевод Строки -The `line_break` module separates the prompt into two lines. +Модуль `line_break` разделяет командную строку на две строки. ### Опции -| Параметр | По умолчанию | Описание | -| ---------- | ------------ | ------------------------------------------------------------------ | -| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | +| Параметр | По умолчанию | Описание | +| ---------- | ------------ | ------------------------------------------------------------------------ | +| `disabled` | `false` | Отключает модуль `line_break`, отображая командную строку в одну строку. | ### Пример @@ -1808,7 +1810,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -1819,27 +1821,27 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o format = "via [🌕 $version](bold blue) " ``` -## Memory Usage +## Использование памяти -The `memory_usage` module shows current system memory and swap usage. +Модуль `memory_usage` отображает текущую системную память и использование подкачки. -By default the swap usage is displayed if the total system swap is non-zero. +По умолчанию использование подкачки отображается, если общая сумма подкачки системы не равна нулю. -::: tip +::: tip Подсказка -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. ::: ### Опции -| Параметр | По умолчанию | Описание | -| ----------- | ----------------------------------------------- | -------------------------------------------------------- | -| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Формат модуля. | -| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | -| `style` | `"bold dimmed white"` | Стиль модуля. | -| `disabled` | `true` | Disables the `memory_usage` module. | +| Параметр | По умолчанию | Описание | +| ----------- | ----------------------------------------------- | ------------------------------------------------------------------ | +| `threshold` | `75` | Скрывать использование памяти, если она не превышает этот процент. | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | Формат модуля. | +| `symbol` | `"🐏"` | Символ, используемый перед отображением использования памяти. | +| `style` | `"bold dimmed white"` | Стиль модуля. | +| `disabled` | `true` | Отключает модуль `memory_usage`. | ### Переменные @@ -1866,20 +1868,20 @@ symbol = " " style = "bold dimmed green" ``` -## Mercurial Branch +## Ветка Mercurial -The `hg_branch` module shows the active branch of the repo in your current directory. +Модуль `hg_branch` показывает активную ветку репозитория в вашем текущем каталоге. ### Опции -| Параметр | По умолчанию | Описание | -| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- | -| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | -| `style` | `"bold purple"` | Стиль модуля. | -| `format` | `"on [$symbol$branch]($style) "` | Формат модуля. | -| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | -| `disabled` | `true` | Disables the `hg_branch` module. | +| Параметр | По умолчанию | Описание | +| ------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- | +| `symbol` | `" "` | Символ, используемый перед закладкой hg или именем ветки репозитория в текущем каталоге. | +| `style` | `"bold purple"` | Стиль модуля. | +| `format` | `"on [$symbol$branch]($style) "` | Формат модуля. | +| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | +| `truncation_symbol` | `"…"` | Символ, используемый для обозначения усечения названия ветки. | +| `disabled` | `true` | Отключает модуль `hg_branch`. | ### Переменные @@ -1889,7 +1891,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -1906,7 +1908,7 @@ truncation_symbol = "" The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). By default the module will be shown if any of the following conditions are met: -- The current directory contains a `nim.cfg` file +- Текущий каталог содержит файл `nim.cfg` - 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 @@ -1915,7 +1917,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | Параметр | По умолчанию | Описание | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format for the module | +| `format` | `"via [$symbol($version )]($style)"` | Формат модуля | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. | | `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. | @@ -1932,7 +1934,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -1946,7 +1948,7 @@ symbol = "🎣 " ## Nix-shell -The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. +The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. Модуль будет показываться внутри среды nix-shell. ### Опции @@ -1957,7 +1959,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | `style` | `"bold blue"` | Стиль модуля. | | `impure_msg` | `"impure"` | A format string shown when the shell is impure. | | `pure_msg` | `"pure"` | A format string shown when the shell is pure. | -| `disabled` | `false` | Disables the `nix_shell` module. | +| `disabled` | `false` | Отключает модуль `nix_shell`. | ### Переменные @@ -1968,7 +1970,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -1986,10 +1988,10 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). By default the module will be shown if any of the following conditions are met: -- The current directory contains a `package.json` file +- Текущий каталог содержит файл `package.json` - The current directory contains a `.node-version` file - The current directory contains a `.nvmrc` file -- The current directory contains a `node_modules` directory +- Текущий каталог содержит каталог `node_modules` - The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension - The current directory contains a file with the `.ts` extension @@ -2004,7 +2006,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | | `style` | `"bold green"` | Стиль модуля. | -| `disabled` | `false` | Disables the `nodejs` module. | +| `disabled` | `false` | Отключает модуль `nodejs`. | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Переменные @@ -2015,7 +2017,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2062,7 +2064,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2095,7 +2097,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2108,9 +2110,9 @@ 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`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. +Модуль `package` отображается, когда текущий каталог является репозиторием для пакета и показывает его текущую версию. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a - [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present - [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present - [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present - [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present > ⚠ Показана версия пакета, исходный код которого находится в текущем каталоге, а не в менеджере пакетов. @@ -2133,11 +2136,11 @@ The `package` module is shown when the current directory is the repository for a | Параметр | По умолчанию | Описание | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | | `format` | `"is [$symbol$version]($style) "` | Формат модуля. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `symbol` | `"📦 "` | Символ, используемый перед отображением версии пакета. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `"bold 208"` | Стиль модуля. | | `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | Disables the `package` module. | +| `disabled` | `false` | Отключает модуль `package`. | ### Переменные @@ -2147,7 +2150,7 @@ The `package` module is shown when the current directory is the repository for a | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2202,8 +2205,8 @@ format = "via [🦪 $version]($style) " The `php` module shows the currently installed version of [PHP](https://www.php.net/). By default 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 +- Текущий каталог содержит файл `composer.json` +- Текущий каталог содержит файл `.php-version` - The current directory contains a `.php` extension ### Опции @@ -2212,12 +2215,12 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | Формат модуля. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `symbol` | `"🐘 "` | Символ, используемый перед отображением версии PHP. | | `detect_extensions` | `["php"]` | Which extensions should trigger this module. | | `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `style` | `"147 bold"` | Стиль модуля. | -| `disabled` | `false` | Disables the `php` module. | +| `disabled` | `false` | Отключает модуль `php`. | ### Переменные @@ -2227,7 +2230,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip Подсказка + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### Опции + +| Параметр | По умолчанию | Описание | +| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | Стиль модуля. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Переменные + +| Переменная | Пример | Описание | +| ---------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| symbol | | Отражает значение параметра `symbol` | +| style\* | | Отражает значение параметра `style` | + +\*: Эта переменная может использоваться только в качестве части строки style + +### Пример + +#### With Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: @@ -2266,7 +2326,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2311,7 +2371,7 @@ By default the module will be shown if any of the following conditions are met: | `detect_folders` | `[]` | Which folders should trigger this module | | `disabled` | `false` | Disables the `python` module. | -::: tip +::: tip Подсказка The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used. @@ -2435,7 +2495,7 @@ By default the `red` module shows the currently installed version of [Red](https | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2475,7 +2535,7 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2514,7 +2574,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2554,7 +2614,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2569,33 +2629,37 @@ symbol = "🌟 " The `shell` module shows an indicator for currently used shell. -::: tip +::: tip Подсказка -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. ::: ### Опции -| Параметр | По умолчанию | Описание | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | Формат модуля. | -| `disabled` | `true` | Disables the `shell` module. | +| Параметр | По умолчанию | Описание | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | Формат модуля. | +| `style` | `"white bold"` | Стиль модуля. | +| `disabled` | `true` | Disables the `shell` module. | ### Переменные | Переменная | По умолчанию | Описание | | ---------- | ------------ | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: Эта переменная может использоваться только в качестве части строки style ### Примеры @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2632,7 +2697,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2666,7 +2731,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2681,9 +2746,9 @@ format = '[📦 \[$env\]]($style) ' The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. -::: tip +::: tip Подсказка -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. ::: @@ -2722,7 +2787,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2767,7 +2832,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2782,7 +2847,7 @@ format = "via [🏎 $version](red bold)" The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. -::: tip +::: tip Подсказка By default the Terraform version is not shown, since this is slow for current versions of Terraform when a lot of plugins are in use. If you still want to enable it, [follow the example shown below](#with-terraform-version). @@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve By default 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 +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### Опции @@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met: | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | | `style` | `"bold 105"` | Стиль модуля. | @@ -2815,7 +2880,7 @@ By default the module will be shown if any of the following conditions are met: | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2841,9 +2906,9 @@ format = "[🏎💨 $workspace]($style) " The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. -::: tip +::: tip Подсказка -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +По умолчанию этот модуль отключен. Чтобы включить его, установите `disabled` на `false` в файле конфигурации. ::: @@ -2868,7 +2933,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -2892,7 +2957,7 @@ The `username` module shows active user's username. The module will be shown if - The user is currently connected as an SSH session - The variable `show_always` is set to true -::: tip +::: 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. @@ -2955,7 +3020,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -3022,7 +3087,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Отражает значение параметра `symbol` | | style\* | `black bold dimmed` | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -3060,7 +3125,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | Отражает значение параметра `symbol` | | style\* | | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style ### Пример @@ -3083,29 +3148,37 @@ These modules will be shown if any of the following conditions are met: - The `when` command returns 0 - The current Operating System (std::env::consts::OS) matchs with `os` field if defined. -::: tip +::: tip Подсказка Multiple custom modules can be defined by using a `.`. ::: -::: tip +::: tip Подсказка The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined. ::: -::: tip +::: tip Подсказка [Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there! ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### Опции | Параметр | По умолчанию | Описание | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3126,7 +3199,7 @@ The order in which custom modules are shown can be individually set by including | symbol | Отражает значение параметра `symbol` | | style\* | Отражает значение параметра `style` | -\*: This variable can only be used as a part of a style string +\*: Эта переменная может использоваться только в качестве части строки style #### Custom command shell @@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/ru-RU/faq/README.md b/docs/ru-RU/faq/README.md index 08073b013..c5603f6e2 100644 --- a/docs/ru-RU/faq/README.md +++ b/docs/ru-RU/faq/README.md @@ -56,10 +56,36 @@ starship prompt --help sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` +## Why do I see `Executing command "..." timed out.` warnings? + +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. + ## I see symbols I don't understand or expect, what do they mean? If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + ## 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: @@ -79,7 +105,7 @@ The first line should produce a [snake emoji](https://emojipedia.org/snake/), wh 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) -## Как удалить Starship? +## How do I uninstall Starship? Starship is just as easy to uninstall as it is to install in the first place. diff --git a/docs/ru-RU/guide/README.md b/docs/ru-RU/guide/README.md index 081b8daea..ee270d2b4 100644 --- a/docs/ru-RU/guide/README.md +++ b/docs/ru-RU/guide/README.md @@ -181,7 +181,7 @@ #### Установить через менеджер пакетов - ##### [Homebrew](https://brew.sh/): + ##### С [Homebrew](https://brew.sh/): ```sh brew install starship @@ -304,37 +304,9 @@ Если вы хотите помочь в создании Starship, пожалуйста, ознакомьтесь с нашим [Руководством по содействию](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Кроме того, заходите на наш [Discord сервер](https://discord.gg/8Jzqu3T) и поздоровайтесь. 👋 -### Соавторы кода - -Этот проект существует благодаря всем тем, кто внес свой вклад. [[Внести вклад](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]. - - -### Финансовые спонсоры - -Станьте финансовым спонсором и помогайте нам поддерживать наше сообщество. [[Внести вклад](https://opencollective.com/starship/contribute)] - -#### Частные лица - - - -#### Организации - -Поддержите этот проект вашей организацией. Ваш логотип будет отображаться здесь со ссылкой на ваш сайт. [[Внести вклад](https://opencollective.com/starship/contribute)] - - - - - - - - - - - - ## 💭 Вдохновления -Пожалуйста, ознакомьтесь с этими предыдущими работами, которые помогли вдохновить создание Starship. 🙏 +Please check out these previous works that helped inspire the creation of starship. 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - командная строка ZSH для астронавтов. @@ -344,9 +316,9 @@


- Иконка ракеты Starship + Starship rocket icon

## 📝 Лицензия -Авторское право © 2019-настоящее, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
Этот проект лицензирован под лицензией [ISC](https://github.com/starship/starship/blob/master/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/ru-RU/installing/README.md b/docs/ru-RU/installing/README.md index 13e4f75ea..864cba5c2 100644 --- a/docs/ru-RU/installing/README.md +++ b/docs/ru-RU/installing/README.md @@ -35,6 +35,16 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Installation + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) ### Getting the Binary diff --git a/docs/ru-RU/presets/README.md b/docs/ru-RU/presets/README.md index e696862a4..9978fed78 100644 --- a/docs/ru-RU/presets/README.md +++ b/docs/ru-RU/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### Конфигурация + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/tr-TR/advanced-config/README.md b/docs/tr-TR/advanced-config/README.md index 89301d9f8..b57f31a6f 100644 --- a/docs/tr-TR/advanced-config/README.md +++ b/docs/tr-TR/advanced-config/README.md @@ -30,7 +30,19 @@ trap blastoff DEBUG # Trap DEBUG *before* running starship eval $(starship init bash) ``` -## Pencere Başlığını Değiştirme +## Custom pre-prompt and pre-execution Commands in PowerShell + +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Ancak Starship, size istem oluşturma prosedürü sayesinde kendi işlevlerinizi ekleme konusunda sınırlı bir yetenek sağlar: + +Create a function named `Invoke-Starship-PreCommand` + +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") +} +``` + +## 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`. @@ -67,6 +79,17 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. diff --git a/docs/tr-TR/config/README.md b/docs/tr-TR/config/README.md index 5cc5fd4fb..65186ff57 100644 --- a/docs/tr-TR/config/README.md +++ b/docs/tr-TR/config/README.md @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -788,7 +789,7 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### Options @@ -983,7 +984,7 @@ default = "unknown user" | Option | Default | Description | | ---------- | ------------------------------ | ---------------------------------------------------------------------------- | -| `symbol` | | The symbol used before displaying the variable value. | +| `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. | @@ -1065,10 +1066,11 @@ The `fill` module fills any extra space on the line with a symbol. If multiple ` ### Options -| Option | Default | Description | -| -------- | -------------- | --------------------------------- | -| `symbol` | `"."` | The symbol used to fill the line. | -| `style` | `"bold black"` | The style for the module. | +| Option | Default | Description | +| ---------- | -------------- | --------------------------------- | +| `symbol` | `"."` | The symbol used to fill the line. | +| `style` | `"bold black"` | The style for the module. | +| `disabled` | `false` | Disables the `fill` module | ### Example @@ -2110,7 +2112,7 @@ 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`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. +The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a - [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present - [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present - [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present - [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present > ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### Options + +| Option | Default | Description | +| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | The style for the module. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| 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 Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: @@ -2577,25 +2637,29 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y ### Options -| Option | Default | Description | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | The format for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | Default | Description | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | The format for the module. | +| `style` | `"white bold"` | The style for the module. | +| `disabled` | `true` | Disables the `shell` module. | ### Variables | Variable | Default | Description | | --------- | ------- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: This variable can only be used as a part of a style string ### Examples @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve By default 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 +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### Options @@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met: | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | | `style` | `"bold 105"` | The style for the module. | @@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### Options | Option | Default | Description | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/tr-TR/faq/README.md b/docs/tr-TR/faq/README.md index 2b3096c17..8422ee2e3 100644 --- a/docs/tr-TR/faq/README.md +++ b/docs/tr-TR/faq/README.md @@ -56,10 +56,36 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` +## Why do I see `Executing command "..." timed out.` warnings? + +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. + ## I see symbols I don't understand or expect, what do they mean? If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + ## 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: diff --git a/docs/tr-TR/guide/README.md b/docs/tr-TR/guide/README.md index a8d049750..7db695b94 100644 --- a/docs/tr-TR/guide/README.md +++ b/docs/tr-TR/guide/README.md @@ -181,7 +181,7 @@ #### Install via Package Manager - ##### Example: [Homebrew](https://brew.sh/): + ##### With [Homebrew](https://brew.sh/): ```sh brew install starship @@ -304,34 +304,6 @@ 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)]. - - -### 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. 🙏 diff --git a/docs/tr-TR/installing/README.md b/docs/tr-TR/installing/README.md index 4ef45c008..5acd12742 100644 --- a/docs/tr-TR/installing/README.md +++ b/docs/tr-TR/installing/README.md @@ -35,9 +35,19 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Kurulum + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) -### Binary Alma +### Getting the Binary #### Zorunlu olarak @@ -47,7 +57,7 @@ nix-env -iA nixos.starship #### Açıklayıcı, tek kullanıcı, via [home-manager](https://github.com/nix-community/home-manager) -`home.nix` dosyanızda, `programs.starship` modülünü etkinleştirin, ayarlarınızı ekleyin +Enable the `programs.starship` module in your `home.nix` file, and add your settings ```nix { @@ -69,7 +79,7 @@ nix-env -iA nixos.starship } ``` -sonra çalıştırın +then run ```sh home-manager switch diff --git a/docs/tr-TR/presets/README.md b/docs/tr-TR/presets/README.md index 1e9e1785e..056591516 100644 --- a/docs/tr-TR/presets/README.md +++ b/docs/tr-TR/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### Yapılandırma + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/vi-VN/advanced-config/README.md b/docs/vi-VN/advanced-config/README.md index f7253df38..278abdcde 100644 --- a/docs/vi-VN/advanced-config/README.md +++ b/docs/vi-VN/advanced-config/README.md @@ -31,11 +31,23 @@ trap blastoff DEBUG # Bẫy DEBUG *trước khi* starship chạy eval $(starship init bash) ``` -## Thay đổi tên gọi trên cửa sổ của chương trình terminal +## Custom pre-prompt and pre-execution Commands in PowerShell -Một vài shell có khả năng tự động thay đổi tên hiển thị (chẳng hạn như tên của thư mục hiện thời) trên cửa số của trình mô phỏng terminal. Fish shell mặc định thực hiện thay đổi này. Tuy không được set mặc định trên Starship, chức năng này có thể được tích hợp dễ dàng trên `bash` shell và `zsh` shell. +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. Tuy nhiên, Starship cho phép bạn viết các hàm riêng của bạn để tùy biến việc render prompt: -Đầu tiên, ta cần định nghĩa một hàm thay đổi tiêu đề cửa sổ (dùng chung cho cả bash và zsh): +Create a function named `Invoke-Starship-PreCommand` + +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") +} +``` + +## 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(){ @@ -43,23 +55,23 @@ function set_win_title(){ } ``` -Ta có thể sử dụng biến số để tuỳ chỉnh tên hiển thị này (`$USER`, `$HOSTNAME`, và `$PWD` là những biến số thường được dùng). +You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). -Với `bash` shell, set precmd của starship bằng tên của hàm này: +In `bash`, set this function to be the precmd starship function: ```bash starship_precmd_user_func="set_win_title" ``` -Với `zsh` shell, thêm hàm này vào mảng `precmd_functions`: +In `zsh`, add this to the `precmd_functions` array: ```bash precmd_functions+=(set_win_title) ``` -Nếu ta hài lòng với các tùy biến đã được thiết lập, thêm những dòng sau vào cấu hình shell (`~/.bashrc` hoặc `~/.zshrc`) để thực thi chúng mỗi khi ta khởi tạo một shell mới. +If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. -Ví dụ, nếu ta muốn hiển thị đường dẫn thư mục hiện tại trong tiêu đề của một terminal tab, thêm đoạn code sau vào `~/.bashrc` hoặc `~/.zshrc`: +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(){ @@ -68,6 +80,17 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. diff --git a/docs/vi-VN/config/README.md b/docs/vi-VN/config/README.md index 510ce9983..2b3ac7363 100644 --- a/docs/vi-VN/config/README.md +++ b/docs/vi-VN/config/README.md @@ -142,13 +142,13 @@ 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. | -| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | -| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | -| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | -| `add_newline` | `true` | Inserts blank line between shell prompts. | +| Tuỳ chọn | Mặc định | Mô tả | +| ----------------- | ------------------------------ | ------------------------------------------------------------------------ | +| `format` | [link](#default-prompt-format) | Cấu hình định dạng của prompt. | +| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | +| `scan_timeout` | `30` | Timeout của starship cho việc quét các tập tin (tính theo milliseconds). | +| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | +| `add_newline` | `true` | Chèn dòng trắng giữa các dấu nhắc lệnh. | ### Ví dụ @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -252,7 +253,7 @@ format="$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +`aws` module cho biết region và profile hiện tại của AWS. Cái này dựa trên các biến môi trường `AWS_REGION`, `AWS_DEFAULT_REGION`, và `AWS_PROFILE` với tập tin `~/.aws/config`. This module also shows an expiration timer when using temporary credentials. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -281,7 +282,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Các vị dụ @@ -326,7 +327,7 @@ 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%. +`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 @@ -354,7 +355,7 @@ discharging_symbol = "💀 " ### Hiển thị pin -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. Mặc định như sau: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). Nếu `display` không được cung cấp. Mặc định như sau: ```toml [[battery.display]] @@ -366,7 +367,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### Các tuỳ chọn -The `display` option is an array of the following table. +Tuỳ chọn `display` là một mảng của của bảng sau. | Tuỳ chọn | Mặc định | Mô tả | | -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- | @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -393,14 +394,14 @@ discharging_symbol = 💦 ## Character -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +Module `character` cho biết một kí tự (thường là một mũi tên) bên cạnh nơi văn bản được nhập trong terminal của bạn. -The character will tell you whether the last command was successful or not. It can do this in two ways: +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 (`❯`/`✖`) -By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape). +Mặc định, nó chỉ thay đổi màu. If you also want to change its shape take a look at [this example](#with-custom-error-shape). ::: cảnh báo @@ -463,7 +464,7 @@ vicmd_symbol = "[V](bold green) " ## CMake -The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). By default the module will be activated if any of the following conditions are met: +The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). Mặc định module sẽ được kích hoạt nếu thoả mãn bất kì điều kiện nào dưới đây: - Đườ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` @@ -489,7 +490,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ## COBOL / GNUCOBOL @@ -519,46 +520,46 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần củ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. +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. -::: warning Do not hook the DEBUG trap in Bash +::: cảnh báo Không thể hook DEBUG trap trong 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. +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. ::: -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. +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` | Shortest duration to show time for (in milliseconds). | -| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | -| `format` | `"took [$duration]($style) "` | Định dạng cho module. | -| `style` | `"bold yellow"` | Kiểu cho 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). | +| 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). | -::: tip +::: thử thuật -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`. +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` | The time it took to execute the command | -| style\* | | Giá trị ghi đè của `style` | +| 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` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -574,9 +575,9 @@ format = "underwent [$duration](bold yellow)" The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) environment, if `$CONDA_DEFAULT_ENV` is set. -::: tip +::: thử thuật -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +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`. ::: @@ -584,22 +585,22 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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. | +| `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` | Ignores `base` environment when activated. | -| `disabled` | `false` | Disables the `conda` 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` | The current conda environment | -| symbol | | Giá trị ghi đè tuỳ chọn `symbol` | -| style\* | | Giá trị ghi đè của `style` | +| 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` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -614,31 +615,31 @@ format = "[$symbol$environment](dimmed green) " The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: -- The current directory contains a `shard.yml` file -- The current directory contains a `.cr` file +- Đườ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` ### Các tuỳ chọn | Tuỳ chọn | Mặc định | Mô tả | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. | +| `symbol` | `"🔮 "` | Kí hiệu sử dụng trước phiên bản hiển thị của crystal. | | `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `"bold red"` | Kiểu cho module. | | `detect_extensions` | `["cr"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | | `detect_files` | `["shard.yml"]` | Tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[]` | Những thư mục nào sẽ kích hoạt mô-đun này. | -| `disabled` | `false` | Disables the `crystal` module. | +| `disabled` | `false` | Vô hiệu hoá module `crystal`. | ### Các biến | Biến | Ví dụ | Mô tả | | --------- | --------- | -------------------------------- | -| version | `v0.32.1` | The version of `crystal` | +| 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` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -653,9 +654,9 @@ format = "via [✨ $version](bold blue) " The `dart` module shows the currently installed version of [Dart](https://dart.dev/). Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: -- The current directory contains a file with `.dart` extension -- The current directory contains a `.dart_tool` directory -- The current directory contains a `pubspec.yaml`, `pubspec.yml` or `pubspec.lock` file +- Đườ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` +- Đường dẫn hiện tại chứa một tệp tin `pubspec.yaml`, `pubspec.yml` hoặc `pubspec.lock` ### Các tuỳ chọn @@ -663,22 +664,22 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🎯 "` | A format string representing the symbol of Dart | +| `symbol` | `"🎯 "` | Một chuỗi định dạng hiển thị biểu tượng của Dart | | `detect_extensions` | `["dart"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | | `detect_files` | `["pubspec.yaml", "pubspec.yml", "pubspec.lock"]` | Tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[".dart_tool"]` | Những thư mục nào sẽ kích hoạt mô-đun này. | | `style` | `"bold blue"` | Kiểu cho module. | -| `disabled` | `false` | Disables the `dart` module. | +| `disabled` | `false` | Vô hiệu `dart` module. | ### Các biến | Biến | Ví dụ | Mô tả | | --------- | -------- | -------------------------------- | -| version | `v2.8.4` | The version of `dart` | +| version | `v2.8.4` | Phiên bản của `dart` | | 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 +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -726,30 +727,30 @@ format = "via [🦕 $version](green bold) " ## Đường dẫn -The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in. +`directory` module hiển thị đường dẫn thư mục hiện hành của bạn,, cắt ngắn ba thư mục cha. Đường dẫn của bạn cũng sẽ được cắt ngắn tới đường dẫn gốc của git repo hiện tại của bạn. -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. +Khi sử dụng fish style pwd option, thay vì ẩn đường dẫn được rút gọn, bạn sẽ thấy một tên ngắn cho mỗi thư mục dựa trên số bạn cho phép trng tùy chọn. -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`. +Cho ví dụ, `~/Dev/Nix/nixpkgs/pkgs` nơi `nixpkgs` là gốc của repo, và tuỳ chọn thiết lập sang `1`. Bây giờ bạn sẽ thấy `~/D/N/nixpkgs/pkgs`, trong khi trước nó là `nixpkgs/pkgs`. ### 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. | +| Tuỳ chọn | Mặc định | Mô tả | +| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------ | +| `truncation_length` | `3` | Số lượng thư mục cha của thư mục hiện tại nên được rút gọn. | +| `truncate_to_repo` | `true` | Có hoặc không rút gọn đường dẫn gốc của git repo hiện tại của bạn. | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | Định dạng cho module. | +| `style` | `"bold cyan"` | Kiểu cho module. | +| `disabled` | `false` | Vô hiệu mô đun `directory`. | +| `read_only` | `"🔒"` | Biểu tượng để nhận biết thư mục hiện tại là chỉ đọc. | +| `read_only_style` | `"red"` | Style cho biểu tượng chỉ đọc. | +| `truncation_symbol` | `""` | Biểu tượng tiền tố cho các đường dẫn rút gọn. ví dụ: "…/" | +| `home_symbol` | `"~"` | Biểu tượng nhận biết thư mục home. |
-This module has a few advanced configuration options that control how the directory is displayed. +Mô đun này có một vài tùy chọn nâng cao để điều khiển cách thư mục được hiển thị. -| Advanced Option | Mặc định | Mô tả | +| Tùy chọn nâng cao | 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. | @@ -771,10 +772,10 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an | Biến | Ví dụ | Mô tả | | --------- | --------------------- | -------------------------- | -| path | `"D:/Projects"` | The current directory path | +| path | `"D:/Projects"` | Đường dẫn thư mục hiện tại | | style\* | `"black bold dimmed"` | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -788,30 +789,30 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### 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. | -| `only_with_files` | `true` | Only show when there's a match | -| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). | -| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Which filenames should trigger this module (needs `only_with_files` to be true). | -| `detect_folders` | `[]` | Which folders should trigger this module (needs `only_with_files` to be true). | -| `style` | `"blue bold"` | Kiểu cho module. | -| `disabled` | `false` | Disables the `docker_context` module. | +| Tuỳ chọn | Mặc định | Mô tả | +| ------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `format` | `"via [$symbol$context]($style) "` | Định dạng cho module. | +| `symbol` | `"🐳 "` | Biểu tượng sử dụng để hiển thị trước Docker context. | +| `only_with_files` | `true` | Chỉ hiển thị khi có một tệp tin khớp | +| `detect_extensions` | `[]` | Các mở rộng nào nên kích hoạt mô đun này (cần `only_with_files` thiết lập là true). | +| `detect_files` | `["docker-compose.yml", "docker-compose.yaml", "Dockerfile"]` | Tên tệp tin nào nên kích hoạt mô đun này (cần `only_with_files` được thiết lập là true). | +| `detect_folders` | `[]` | Thư mục nào nên kích hoạt mô đun này (cần `only_with_files` được thiết lập là true). | +| `style` | `"blue bold"` | Kiểu cho module. | +| `disabled` | `false` | Vô hiệu mô đun `docker_context`. | ### Các biến | Biến | Ví dụ | Mô tả | | --------- | -------------- | -------------------------------- | -| context | `test_context` | The current docker context | +| context | `test_context` | Docker context hiện tại | | 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 +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -824,9 +825,9 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 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. +The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. Nếu SDK được ghim trong thư mục hiện tại, phiên bản ghim đó được hiển thị. Ngược lại, mô đun hiển thị phiên bản cuối cùng của SDK được cài đặt. -By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: +Mặc định, mô đun này sẽ chỉ được hiển thị trong dấu nhắc lệnh của bạn khi một hoặc nhiều tệp tin dưới đây xuất hiện trong thư mục hiện tại: - `global.json` - `project.json` @@ -837,11 +838,11 @@ By default this module will only be shown in your prompt when one or more of the - `*.fsproj` - `*.xproj` -You'll also need the .NET Core SDK installed in order to use it correctly. +Bạn cũng sẽ cần cài đặt .NET Core SDK đúng cách để sử dụng một cách chính xác. -Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options. +Mô đun này sử dụng cơ chế của bản thân để phát hiện phiên bản của chính nó. Thông thường, nó nhanh gấp đôi nếu chạy `dotnet --version`, nhưng nó có thể hiện sai phiên bản nếu dự án .NET của bạn có một cấu trúc thư mục bất thường. Nếu độ chính xác quan trọng hơn tốc độ, bạn có thể vô hiệu cơ chế bằng cài đặt `heuristic = false` trong các tùy chọn mô đun. -The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. +Mô đun cũng sẽ hiện Target Framework Moniker () khi có một tệp tin csproj trong thư mục hiện tại. ### Các tuỳ chọn @@ -849,24 +850,24 @@ The module will also show the Target Framework Moniker ( ⚠️ The version being shown is that of the package whose source code is in your current directory, not your package manager. @@ -2147,7 +2150,7 @@ The `package` module is shown when the current directory is the repository for a | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -2202,7 +2205,7 @@ format = "via [🦪 $version]($style) " The `php` module shows the currently installed version of [PHP](https://www.php.net/). Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: -- The current directory contains a `composer.json` file +- Đường dẫn hiện tại chứa một tập tin `composer.json` - The current directory contains a `.php-version` file - The current directory contains a `.php` extension @@ -2227,7 +2230,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: thử thuật + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### Các tuỳ chọn + +| Tuỳ chọn | Mặc định | Mô tả | +| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | Kiểu cho module. | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Các biến + +| Biến | Ví dụ | Mô tả | +| --------- | ---------- | -------------------------------- | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| 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 Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: @@ -2266,7 +2326,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -2311,7 +2371,7 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki | `detect_folders` | `[]` | Thư mục nào sẽ kích hoạt mô-đun này | | `disabled` | `false` | Disables the `python` module. | -::: tip +::: 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. @@ -2435,7 +2495,7 @@ By default the `red` module shows the currently installed version of [Red](https | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -2475,7 +2535,7 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt | 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 +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -2514,7 +2574,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -2554,7 +2614,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -2569,33 +2629,37 @@ symbol = "🌟 " The `shell` module shows an indicator for currently used shell. -::: tip +::: thử thuật -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn. ::: ### Các tuỳ chọn -| Tuỳ chọn | Mặc định | Mô tả | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | Định dạng cho module. | -| `disabled` | `true` | Disables the `shell` module. | +| Tuỳ chọn | Mặc định | Mô tả | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | Định dạng cho module. | +| `style` | `"white bold"` | Kiểu cho module. | +| `disabled` | `true` | Disables the `shell` module. | ### Các biến | Biến | Mặc định | Mô tả | | --------- | -------- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Các vị dụ @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2632,7 +2697,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -2666,7 +2731,7 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -2681,9 +2746,9 @@ format = '[📦 \[$env\]]($style) ' The `status` module displays the exit code of the previous command. The module will be shown only if the exit code is not `0`. -::: tip +::: thử thuật -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn. ::: @@ -2722,7 +2787,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y | 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 +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -2767,7 +2832,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -2782,7 +2847,7 @@ format = "via [🏎 $version](red bold)" The `terraform` module shows the currently selected [Terraform workspace](https://www.terraform.io/docs/language/state/workspaces.html) and version. -::: tip +::: 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-terraform-version). @@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn: - The current directory contains a `.terraform` folder -- Current directory contains a file with the `.tf` or `.hcl` extensions +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### Các tuỳ chọn @@ -2800,7 +2865,7 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. | | `detect_files` | `[]` | Tên tệp nào sẽ kích hoạt mô-đun này. | | `detect_folders` | `[".terraform"]` | Những thư mục nào sẽ kích hoạt mô-đun này. | | `style` | `"bold 105"` | Kiểu cho module. | @@ -2815,7 +2880,7 @@ Mặc định module sẽ được hiển thị nếu có bất kì điều ki | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -2841,9 +2906,9 @@ format = "[🏎💨 $workspace]($style) " The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available. -::: tip +::: thử thuật -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiết lập `disabled` sang `false` trong tập tin cấu hình của bạn. ::: @@ -2868,7 +2933,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de | time | `13:08:10` | The current time. | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -2892,7 +2957,7 @@ The `username` module shows active user's username. The module will be shown if - The user is currently connected as an SSH session - The variable `show_always` is set to true -::: tip +::: 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. @@ -2955,7 +3020,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -3022,7 +3087,7 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | `black bold dimmed` | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -3060,7 +3125,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h | symbol | | Giá trị ghi đè tuỳ chọn `symbol` | | style\* | | Giá trị ghi đè của `style` | -\*: This variable can only be used as a part of a style string +\*: Biến này có thể chỉ được sử dụng như một phần của style string ### Ví dụ @@ -3083,29 +3148,37 @@ These modules will be shown if any of the following conditions are met: - The `when` command returns 0 - The current Operating System (std::env::consts::OS) matchs with `os` field if defined. -::: tip +::: thử thuật Multiple custom modules can be defined by using a `.`. ::: -::: tip +::: 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. ::: -::: tip +::: 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! ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### 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. | +| `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`. | @@ -3126,7 +3199,7 @@ The order in which custom modules are shown can be individually set by including | 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 +\*: Biến này có thể chỉ được sử dụng như một phần của style string #### Custom command shell @@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/vi-VN/faq/README.md b/docs/vi-VN/faq/README.md index f6dd8f06b..6ab57a616 100644 --- a/docs/vi-VN/faq/README.md +++ b/docs/vi-VN/faq/README.md @@ -56,37 +56,63 @@ Nếu bạn nhận được một lỗi giống như "_version 'GLIBC_2.18' not sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` -## Tôi thấy các biểu tượng tôi không hiểu hoặc không mong muốn, chúng có nghĩa là gì? +## Why do I see `Executing command "..." timed out.` warnings? -Nếu bạn thấy các biểu tượng bạn không biết, bạn có thể sử dụng `starship explain` để giải thích các mô đun hiện tại đang hiển thị. +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. -## Tại sao tôi không thấy một biểu tượng glyph trong dấu nhắc lệnh của tôi? +## I see symbols I don't understand or expect, what do they mean? -Đa số lí do phổ biến là do cái này mất cấu hình hệ thống. Một số bản phân phối Linux cụ thể không đi kèm việ hõ trợ font out-of-the-box. Bạn cần chắc chắn rằng: +If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. + +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + +## 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: - 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 bên dưới trong terminal: +To test your system, run the following commands in a 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). +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). -Nếu biểu tượng không hiển thị đúng, hệ thống của bạn vẫn cấu hình sai. Thật không may, lấy cấu hình font đúng đôi khi khó khăn. Người dùng trên Discord có thể có giúp đỡ được. Nếu các biểu tượng 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) +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) -## Là thế nào để tôi gỡ cài đặt Starship? +## How do I uninstall Starship? -Starship thì dễ dàng gỡ cài đặt như cài đặt ngay từ đầu. +Starship is just as easy to uninstall as it is to install in the first place. 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. +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. If Starship was installed using the install script, the following command will delete the binary: diff --git a/docs/vi-VN/guide/README.md b/docs/vi-VN/guide/README.md index c9c3ed228..da05728f8 100644 --- a/docs/vi-VN/guide/README.md +++ b/docs/vi-VN/guide/README.md @@ -55,7 +55,7 @@ >Deutsch   Español   Français   日本語   Русский   简体中文   繁體中文

@@ -181,7 +181,7 @@ #### Cài đặt thông qua Trình quản lí gói - ##### Ví dụ: [Homebrew](https://brew.sh/): + ##### Với [Homebrew](https://brew.sh/): ```sh brew install starship @@ -304,37 +304,9 @@ Nếu bạn thành thạo một ngôn ngữ không phải Tiếng Anh, chúng t 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. 🙏 +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 cho những phi hành gia. @@ -349,4 +321,4 @@ Xin hãy xem qua những công việc này trước đây, những thứ đã gi ## 📝 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. +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/vi-VN/installing/README.md b/docs/vi-VN/installing/README.md index 7dc3498e1..9f1b83066 100644 --- a/docs/vi-VN/installing/README.md +++ b/docs/vi-VN/installing/README.md @@ -35,9 +35,19 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### Cài đặt + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) -### Lấy tệp tin nhị phân +### Getting the Binary #### Lệnh @@ -47,14 +57,14 @@ nix-env -iA nixos.starship #### Khai báo, người dùng đơn, thông qua [home-manager](https://github.com/nix-community/home-manager) -Kích hoạt mô đun `programs.starship` trong tệp `home.nix` của bạn, và thêm các cài đặt của bạn +Enable the `programs.starship` module in your `home.nix` file, and add your settings ```nix { programs.starship = { enable = true; enableZshIntegration = true; - # Cấu hình viết vào ~/.config/starship.toml + # Configuration written to ~/.config/starship.toml settings = { # add_newline = false; @@ -69,7 +79,7 @@ Kích hoạt mô đun `programs.starship` trong tệp `home.nix` của bạn, v } ``` -sau đó chạy +then run ```sh home-manager switch @@ -77,7 +87,7 @@ home-manager switch #### Khai báo, system-wide, với NixOS -Thêm`pkgs.starship` vào `environment.systemPackages` trong `configuration.nix` của bạn, sau đó chạy +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch diff --git a/docs/vi-VN/presets/README.md b/docs/vi-VN/presets/README.md index 065c850a1..b793fecc6 100644 --- a/docs/vi-VN/presets/README.md +++ b/docs/vi-VN/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### Cấu hình + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/zh-CN/advanced-config/README.md b/docs/zh-CN/advanced-config/README.md index 65fc5ff41..08ee734c9 100644 --- a/docs/zh-CN/advanced-config/README.md +++ b/docs/zh-CN/advanced-config/README.md @@ -21,7 +21,7 @@ function blastoff(){ 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/). 然而,您**必须**在捕捉 DEBUG 信号*之前*启动 Starship! Starship 可以保留 DEBUG trap 的值,但如果该 trap 在 starship 启动后被覆盖,一些功能将会被破坏。 +- 要在一个命令运行前运行自定义函数,您可以使用 [`DEBUG` trap 机制](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/)。 然而,您**必须**在捕捉 DEBUG 信号*之前*启动 Starship! Starship 可以保留 DEBUG trap 的值,但如果该 trap 在 starship 启动后被覆盖,一些功能将会被破坏。 ```bash function blastoff(){ @@ -31,11 +31,23 @@ trap blastoff DEBUG # 启动 starship *之前* 设置 DEBUG trap eval $(starship init bash) ``` -## 更改窗口标题 +## Custom pre-prompt and pre-execution Commands in PowerShell -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish 甚至默认会执行此功能。 Starship 没有实现此功能,但将这个功能添加到 `bash` 或 `zsh` 是相当简单的。 +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. 然而,Starship 确实能使您有限地在提示符渲染过程中插入自己的函数执行: -首先,定义窗口标题更改函数(在 bash 和 zsh 中相同): +Create a function named `Invoke-Starship-PreCommand` + +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") +} +``` + +## 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(){ @@ -43,15 +55,15 @@ function set_win_title(){ } ``` -您可以使用变量来定制标题(常用的有 `$USER`,`$HOSTNAME` 和 `$PWD`)。 +You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). -在 `bash` 中,设置此函数为 starship 预执行函数: +In `bash`, set this function to be the precmd starship function: ```bash starship_precmd_user_func="set_win_title" ``` -在 `zsh`中,将此函数添加到 `reservmd_functions` 列表: +In `zsh`, add this to the `precmd_functions` array: ```bash precmd_functions+=(set_win_title) @@ -68,6 +80,17 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md index 68e7e2696..9db6a26a8 100644 --- a/docs/zh-CN/config/README.md +++ b/docs/zh-CN/config/README.md @@ -146,9 +146,9 @@ format = ''' | ----------------- | ----------------------------- | ---------------------------------------------------------------- | | `format` | [见下文](#default-prompt-format) | 配置提示符的格式。 | | `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | -| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | -| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). | -| `add_newline` | `true` | Inserts blank line between shell prompts. | +| `scan_timeout` | `30` | Starship 扫描文件的超时时间(单位:毫秒)。 | +| `command_timeout` | `500` | Startship 执行命令的超时时间(单位:毫秒)。 | +| `add_newline` | `true` | 在 shell 提示符之间插入空行。 | ### 示例 @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -252,7 +253,7 @@ format="$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +`aws` 组件显示当前 AWS 主机所在区域与配置信息。 各组件基于 `AWS_REGION`,`AWS_DEFAULT_REGION` 和 `AWS_PROFILE` 环境变量与 `~/.aws/config` 文件。 This module also shows an expiration timer when using temporary credentials. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -326,7 +327,7 @@ 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%. +`battery` 组件显示电池充电情况和当前充电状态。 这个组件只会在当前电量低于 10% 时显示。 ### 配置项 @@ -354,7 +355,7 @@ discharging_symbol = "💀 " ### Battery 组件的显示 -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. 默认设置如下: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). 如果 `display` 没有设置, 默认设置如下: ```toml [[battery.display]] @@ -366,7 +367,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### 配置项 -The `display` option is an array of the following table. +`display` 字段的子字段如下: | Option | 默认值 | 描述 | | -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- | @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -393,9 +394,9 @@ discharging_symbol = 💦 ## Character -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +`character` 组件用于在您输入终端的文本旁显示一个字符(通常是一个箭头)。 -The character will tell you whether the last command was successful or not. It can do this in two ways: +这个字符可以告诉您最后一个命令是否执行成功。 It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -523,27 +524,27 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ## 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. +`cmd_duration` 组件显示上一个命令执行的时间。 此组件只在命令执行时间长于两秒时显示,或者当其 `min_time` 字段被设置时,按此值为执行时间的显示下限。 -::: warning Do not hook the DEBUG trap in Bash +::: warning 不要在 Bash 里捕获 DEBUG 信号 -If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. +如果您正在 `bash` 上使用 Starship,在运行 `eval $(starship)` 后,不要捕获 `DEBUG` 信号,否则此组件**将会**坏掉。 ::: -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. +需要在自动每一条命令前执行某些操作的 Bash 用户可以使用 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只需要在执行 `eval $(starship init $0)` 前简单地定义 `preexec_functions` 和 `precmd_functions` 两个列表,就可以照常运行了。 ### 配置项 -| Option | 默认值 | 描述 | -| -------------------- | ----------------------------- | ---------------------------------------------------------- | -| `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) "` | 组件格式化模板。 | -| `style` | `"bold yellow"` | 此组件的样式。 | -| `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). | +| Option | 默认值 | 描述 | +| -------------------- | ----------------------------- | ----------------------------------------------------- | +| `min_time` | `2_000` | 显示此组件所需的最短执行时长(单位:毫秒)。 | +| `show_milliseconds` | `false` | 除了秒数外在执行时长中额外显示毫秒。 | +| `format` | `"took [$duration]($style) "` | 组件格式化模板。 | +| `style` | `"bold yellow"` | 此组件的样式。 | +| `disabled` | `false` | 禁用 `cmd_duration` 组件。 | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | ::: tip @@ -576,20 +577,20 @@ The `conda` module shows the current [Conda](https://docs.conda.io/en/latest/) e ::: tip -This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. +此组件没有禁用 conda 自带的提示符修改,您可能需要执行 `conda config --set changeps1 False`。 ::: ### 配置项 -| Option | 默认值 | 描述 | -| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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"` | 此组件的样式。 | -| `format` | `"via [$symbol$environment]($style) "` | 组件格式化模板。 | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | Disables the `conda` module. | +| Option | 默认值 | 描述 | +| ------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | 如果这个 conda 环境是通过 `conda create -p [path]` 创建的,环境路径的目录深度应该被截断到此数量。 `0` 表示不用截断。 另请参阅 [`directory`](#directory) 组件。 | +| `symbol` | `"🅒 "` | 在环境名之前显示的符号。 | +| `style` | `"bold green"` | 此组件的样式。 | +| `format` | `"via [$symbol$environment]($style) "` | 组件格式化模板。 | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | 禁用 `conda` 组件。 | ### Variables @@ -614,7 +615,7 @@ format = "[$symbol$environment](dimmed green) " The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default the module will be shown if any of the following conditions are met: -- The current directory contains a `shard.yml` file +- 当前目录包含 `shard.yml` 文件 - The current directory contains a `.cr` file ### 配置项 @@ -655,7 +656,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d - The current directory contains a file with `.dart` extension - The current directory contains a `.dart_tool` directory -- The current directory contains a `pubspec.yaml`, `pubspec.yml` or `pubspec.lock` file +- 当前目录包含 `pubspec.yaml`,`pubspec.yml` 或 `pubspec.lock` 文件 ### 配置项 @@ -726,33 +727,33 @@ format = "via [🦕 $version](green bold) " ## 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. +`directory` 组件显示当前目录的路径,显示的路径会截断到三个父目录以内。 如果您处于一个 git 仓库中,显示的路径则最多会截断到该仓库的根目录。 -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. +当使用 fish 风格的当前目录显示样式时,您会看到基于您的设置的每个上级目录的短名称,而不是隐藏被截断的上级目录。 -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`. +例如,对于 `~/Dev/Nix/nixpkgs/pkgs`,其中 `nixpkgs` 是 git 仓库根目录,fish 风格相关选项设置为 `1`。 您将会看到 `~/D/N/nixpkgs/pkgs`,而在设置 fish 风格之前,当前路径将显示成 `nixpkgs/pkgs`。 ### 配置项 -| Option | 默认值 | 描述 | -| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | -| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | -| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | 组件格式化模板。 | -| `style` | `"bold cyan"` | 此组件的样式。 | -| `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. | +| Option | 默认值 | 描述 | +| ------------------- | -------------------------------------------------- | ----------------------------------------------------- | +| `truncation_length` | `3` | 当前目录路径被截断后最多保留的父目录数量。 | +| `truncate_to_repo` | `true` | 是否只截断到您当前处于的 git 仓库根目录下。 | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | 组件格式化模板。 | +| `style` | `"bold cyan"` | 此组件的样式。 | +| `disabled` | `false` | 禁用 `directory` 组件。 | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
-This module has a few advanced configuration options that control how the directory is displayed. +此组件有几个高级配置选项来控制当前目录路径的显示方式。 | Advanced Option | 默认值 | 描述 | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | +| `fish_style_pwd_dir_length` | `0` | 使用 fish shell 当前目录路径逻辑时每个省略目录名使用的字符数。 | | `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. | `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. @@ -788,7 +789,7 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### 配置项 @@ -824,7 +825,7 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 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. +The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 如果当前目录已被绑定了一个版本的 SDK,则显示被帮定的版本。 否则此组件将显示最新安装的 SDK 版本。 By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: @@ -839,7 +840,7 @@ By default this module will only be shown in your prompt when one or more of the You'll also need the .NET Core SDK installed in order to use it correctly. -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. +在内部,此组件使用自己的版本检测机制。 一般来说此组件是直接执行 `dotnet --version` 的两倍快,但当你的 .NET 项目使用了不常见的目录布局时此组件可能显示一个错误的版本。 如果相比于速度您更需要正确的版本号,您可以在组件设置中设置 `heuristic = false` 来禁用该机制。 The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. @@ -849,13 +850,13 @@ The module will also show the Target Framework Moniker ( ⚠ 此组件显示的是源代码在当前目录中的软件包的版本,而不是包管理器的版本。 @@ -2133,11 +2136,11 @@ The `package` module is shown when the current directory is the repository for a | Option | 默认值 | 描述 | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | | `format` | `"is [$symbol$version]($style) "` | 组件格式化模板。 | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `symbol` | `"📦 "` | 这个字段的内容会显示在当前软件包版本之前。 | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `"bold 208"` | 此组件的样式。 | | `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | Disables the `package` module. | +| `disabled` | `false` | 禁用 `package` 组件。 | ### Variables @@ -2202,7 +2205,7 @@ format = "via [🦪 $version]($style) " The `php` module shows the currently installed version of [PHP](https://www.php.net/). By default the module will be shown if any of the following conditions are met: -- The current directory contains a `composer.json` file +- 当前目录包含一个 `composer.json` 文件 - The current directory contains a `.php-version` file - The current directory contains a `.php` extension @@ -2212,12 +2215,12 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. | +| `symbol` | `"🐘 "` | 这个字段的内容会显示在当前 PHP 版本之前。 | | `detect_extensions` | `["php"]` | Which extensions should trigger this module. | | `detect_files` | `["composer.json", ".php-version"]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `style` | `"147 bold"` | 此组件的样式。 | -| `disabled` | `false` | Disables the `php` module. | +| `disabled` | `false` | 禁用 `php` 组件。 | ### Variables @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### 配置项 + +| Option | 默认值 | 描述 | +| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | 此组件的样式。 | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variables + +| 字段 | 示例 | 描述 | +| --------- | ---------- | ------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| symbol | | `symbol`对应值 | +| style\* | | `style`对应值 | + +\*: This variable can only be used as a part of a style string + +### 示例 + +#### With Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: @@ -2571,31 +2631,35 @@ The `shell` module shows an indicator for currently used shell. ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。 ::: ### 配置项 -| Option | 默认值 | 描述 | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | 组件格式化模板。 | -| `disabled` | `true` | Disables the `shell` module. | +| Option | 默认值 | 描述 | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | 组件格式化模板。 | +| `style` | `"white bold"` | 此组件的样式。 | +| `disabled` | `true` | Disables the `shell` module. | ### Variables | 字段 | 默认值 | 描述 | | --------- | --- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: This variable can only be used as a part of a style string ### Examples @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2683,7 +2748,7 @@ The `status` module displays the exit code of the previous command. The module w ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。 ::: @@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve By default 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 +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### 配置项 @@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met: | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | | `style` | `"bold 105"` | 此组件的样式。 | @@ -2843,7 +2908,7 @@ The `time` module shows the current **local** time. The `format` configuration v ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +此组件默认被禁用。 若要启用此组件,请在配置文件中设置 `disable` 字段为 `false`。 ::: @@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### 配置项 | Option | 默认值 | 描述 | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/zh-CN/faq/README.md b/docs/zh-CN/faq/README.md index f275123a2..0164a624e 100644 --- a/docs/zh-CN/faq/README.md +++ b/docs/zh-CN/faq/README.md @@ -56,13 +56,39 @@ If you get an error like "_version 'GLIBC_2.18' not found (required by starship) sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` +## Why do I see `Executing command "..." timed out.` warnings? + +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. + ## I see symbols I don't understand or expect, what do they mean? If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + ## Why don't I see a glyph symbol in my prompt? -最常见的原因是系统配置有问题。 有个别Linux发行版不自带对字体的支持。 请确保: +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/). - 安装了 emoji 字体。 大部分系统都会自带 emoji 字体,但有些系统(例如 Arch Linux)则没有。 字体一般可以用系统的包管理器安装,常见的字体有 [Noto emoji](https://www.google.com/get/noto/help/emoji/) 等。 @@ -75,20 +101,20 @@ echo -e "\xf0\x9f\x90\x8d" echo -e "\xee\x82\xa0" ``` -第一行应该显示出一个[蛇的 emoji](https://emojipedia.org/snake/),第二行应该显示出 [powerline 的分支符号(e0a0)。](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). +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) -## 如何卸载 Starship? +## How do I uninstall Starship? -Starship 的卸载过程与安装过程一样简单。 +Starship is just as easy to uninstall as it is to install in the first place. 1. 将 shell 的配置文件(比如 `~/.bashrc`)中初始化 Starship 的部分全部删除。 1. 删除 Starship 的二进制文件。 -如果 Starship 是用包管理器安装的,请到包管理器的文档中查找卸载的步骤。 +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. -如果 Starship 是用安装脚本安装的,可以用以下命令删除二进制文件: +If Starship was installed using the install script, the following command will delete the binary: ```sh # Locate and delete the starship binary diff --git a/docs/zh-CN/guide/README.md b/docs/zh-CN/guide/README.md index 13fecf892..57f1a3a24 100644 --- a/docs/zh-CN/guide/README.md +++ b/docs/zh-CN/guide/README.md @@ -181,7 +181,7 @@ #### 通过软件包管理器安装 - ##### Example: [Homebrew](https://brew.sh/): + ##### 使用 [Homebrew](https://brew.sh/): ```sh brew install starship @@ -304,37 +304,9 @@ If you are fluent in a non-English language, we greatly appreciate any help keep 如果您有兴趣贡献于 Starship,请查看我们的[贡献指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)。 另外,你可以自由加入我们的 [Discord 服务器](https://discord.gg/8Jzqu3T) 。 👋 -### 代码贡献者 - -这个项目的存在要感谢所有贡献者。 [[贡献说明](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)] - - -### 项目资助者 - -成为项目资助者,并帮助我们维持我们的社区。 [[成为项目资助者](https://opencollective.com/starship/contribute)] - -#### 资助人 - - - -#### 资助组织 - -与您的组织一起支持该项目。 您的组织的徽标将显示在此处,并带有指向您的组织的网站的链接。 [[成为项目资助者](https://opencollective.com/starship/contribute)] - - - - - - - - - - - - ## 💭该项目受以下项目启发 -请参考这些曾经为 Starship 提供启发的工程。 🙏 +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. diff --git a/docs/zh-CN/installing/README.md b/docs/zh-CN/installing/README.md index fc85ff854..c9d7e07a8 100644 --- a/docs/zh-CN/installing/README.md +++ b/docs/zh-CN/installing/README.md @@ -35,6 +35,16 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### 安装 + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) ### Getting the Binary diff --git a/docs/zh-CN/presets/README.md b/docs/zh-CN/presets/README.md index 7fc4df607..6a6567536 100644 --- a/docs/zh-CN/presets/README.md +++ b/docs/zh-CN/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### 配置 + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +``` diff --git a/docs/zh-TW/advanced-config/README.md b/docs/zh-TW/advanced-config/README.md index d73720bf1..a4b98cd57 100644 --- a/docs/zh-TW/advanced-config/README.md +++ b/docs/zh-TW/advanced-config/README.md @@ -31,33 +31,45 @@ trap blastoff DEBUG # 在 Starship 啟用*前*對 DEBUG 訊號設下 trap eval $(starship init bash) ``` -## 改變視窗標題 +## Custom pre-prompt and pre-execution Commands in PowerShell -Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish 甚至預設就會這樣做。 Starship 沒有幫你這樣做,但是可以用直覺的方式加入這個功能到 `bash` 或 `zsh` 之中。 +PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. 然而,Starship 有提供給你有限的能力來插入你自己的函式到渲染提示字元的程序中: -首先,定義一個改變視窗標題的函式(在 bash 與 zsh 之中都一樣): +Create a function named `Invoke-Starship-PreCommand` -```bash -function set_win_title(){ - echo -ne "\033]0; 你的標題在此 \007" +```powershell +function Invoke-Starship-PreCommand { + $host.ui.Write("🚀") } ``` -你可以利用變數來自定義這個標題(`$USER`、`$HOSTNAME` 與 `$PWD` 是很受歡迎的選項)。 +## Change Window Title -在 `bash` 中,將這個函式設定為 Starship 的預執行函式: +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" ``` -在 `zsh` 中,將這個函式加入 `precmd_functions` 陣列: +In `zsh`, add this to the `precmd_functions` array: ```bash precmd_functions+=(set_win_title) ``` -如果你喜歡這個結果,把這幾行加入你的 shell 設定檔中(`~/.bashrc` or `~/.zsrhc`)來將此設為永久設定。 +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`: @@ -68,6 +80,17 @@ function set_win_title(){ starship_precmd_user_func="set_win_title" ``` +You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`. + +```powershell +# edit $PROFILE +function Invoke-Starship-PreCommand { + $host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") +} + +Invoke-Expression (&starship init powershell) +``` + ## Enable Right Prompt Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`. diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md index 1e984112d..3bca18ec6 100644 --- a/docs/zh-TW/config/README.md +++ b/docs/zh-TW/config/README.md @@ -212,6 +212,7 @@ $nodejs\ $ocaml\ $perl\ $php\ +$pulumi\ $purescript\ $python\ $rlang\ @@ -252,7 +253,7 @@ format="$all$directory$character" ## AWS -The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. This module also shows an expiration timer when using temporary credentials. +`aws` 模組顯示現在 AWS 的區域與概況。 這是根據 `AWS_REGION`、`AWS_DEFAULT_REGION` 與 `AWS_PROFILE` 環境變數及 `~/.aws/config` 檔案。 This module also shows an expiration timer when using temporary credentials. When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var. @@ -326,7 +327,7 @@ symbol = "🅰 " ## 電池 -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%. +`battery` 模組顯示電池的電量以及現在的充電狀態。 這個模組只會在裝置的電量低於 10% 的時候看見。 ### 選項 @@ -354,7 +355,7 @@ discharging_symbol = "💀 " ### 電池顯示 -The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. 預設如下: +The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). 如果沒有提供 `display`。 預設如下: ```toml [[battery.display]] @@ -366,7 +367,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r #### 選項 -The `display` option is an array of the following table. +`display` 選項是一個下列表格的陣列。 | Option | 預設 | 說明 | | -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- | @@ -385,7 +386,7 @@ style = "bold red" [[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = "bold yellow" -discharging_symbol = 💦 +discharging_symbol = "💦" # when capacity is over 30%, the battery indicator will not be displayed @@ -393,9 +394,9 @@ discharging_symbol = 💦 ## 字元 -The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. +`character` 模組在你的文字輸入處旁顯示一個字元 (通常是箭頭)。 -The character will tell you whether the last command was successful or not. It can do this in two ways: +這個字元會告訴你最後的指令是成功還是失敗。 It can do this in two ways: - changing color (`red`/`green`) - changing shape (`❯`/`✖`) @@ -523,27 +524,27 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ## 指令持續時間 -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. +`cmd_duration` 模組顯示最後一個指令執行所花費的時間。 這個模組只會在指令花費超過兩秒或是有設定 `min_time` 時,超過設定值時出現。 -::: warning Do not hook the DEBUG trap in Bash +::: warning 不要在 Bash 中設置 DEBUG trap -If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. +如果你在 `bash` 中使用 Starship,不要在執行 `eval $(starship init $0)` 之後設置 `DEBUG` trap,不然這個模組**會**壞掉。 ::: -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. +想使用類似 preexec 功能的 Bash 使用者可以 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只要在 `eval $(starship init $0)` 之前簡單地定義 `preexec_functions` 與 `precmd_functions` 兩個陣列,然後就可以照常進行。 ### 選項 -| Option | 預設 | 說明 | -| -------------------- | ----------------------------- | ---------------------------------------------------------- | -| `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"` | 這個模組的風格。 | -| `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). | +| Option | 預設 | 說明 | +| -------------------- | ----------------------------- | ----------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | 顯示時間除了以秒為單位外,亦以毫秒顯示 | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | 這個模組的風格。 | +| `disabled` | `false` | 停用 `cmd_duration` 模組。 | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | ::: tip @@ -582,14 +583,14 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### 選項 -| Option | 預設 | 說明 | -| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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"` | 這個模組的風格。 | -| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | -| `ignore_base` | `true` | Ignores `base` environment when activated. | -| `disabled` | `false` | Disables the `conda` module. | +| Option | 預設 | 說明 | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | 如果環境變數由所`conda create -p [path]`產生時,環境變數的資料夾需要截斷的數目。 `0` 表示不截斷 也請參考 [`directory`](#directory)模組 | +| `symbol` | `"🅒 "` | 環境名稱前使用的符號。 | +| `style` | `"bold green"` | 這個模組的風格。 | +| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `ignore_base` | `true` | Ignores `base` environment when activated. | +| `disabled` | `false` | 停用 `conda` 模組。 | ### Variables @@ -614,8 +615,8 @@ format = "[$symbol$environment](dimmed green) " The `crystal` module shows the currently installed version of [Crystal](https://crystal-lang.org/). By default 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 +- 現在資料夾中含有一個 `shard.yml` 檔案 +- 現在資料夾中含有一個`.cr`檔案 ### 選項 @@ -655,7 +656,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d - The current directory contains a file with `.dart` extension - The current directory contains a `.dart_tool` directory -- The current directory contains a `pubspec.yaml`, `pubspec.yml` or `pubspec.lock` file +- 現在資料夾中包含一個 `pubspec.yaml`、`pubspec.yml` 或 `pubspec.lock` 檔案 ### 選項 @@ -726,33 +727,33 @@ format = "via [🦕 $version](green bold) " ## 資料夾 -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. +`directory` 模組顯示到現在資料夾的路徑,並裁減到前三層資料夾。 你的資料夾也會被裁減到你所在的 git 儲存庫的根目錄。 -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. +如果正在使用 fish 風格的 pwd 選項,將不會隱藏被裁減的資料夾,而是會根據你在選項中設定的數字看到每一層資料夾的縮寫。 -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`. +例如,給定一個右列的路徑 `~/Dev/Nix/nixpkgs/pkgs` 其中 `nixpkgs` 是儲存庫的根目錄,而且該選項被設定為 `1`。 你會看到 `~/D/N/nixpkgs/pkgs`,而在這個設定之前則是 `nixpkgs/pkgs`。 ### 選項 -| Option | 預設 | 說明 | -| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- | -| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | -| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | -| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | -| `style` | `"bold cyan"` | 這個模組的風格。 | -| `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. | +| Option | 預設 | 說明 | +| ------------------- | -------------------------------------------------- | ----------------------------------------------------- | +| `truncation_length` | `3` | 到達現在資料夾的路徑中,要被裁減掉的資料夾數目。 | +| `truncate_to_repo` | `true` | 是否要裁減到你現在所在的 git 儲存庫的根目錄。 | +| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | +| `style` | `"bold cyan"` | 這個模組的風格。 | +| `disabled` | `false` | 停用 `directory` 模組。 | +| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | +| `read_only_style` | `"red"` | The style for the read only symbol. | +| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | +| `home_symbol` | `"~"` | The symbol indicating home directory. |
-This module has a few advanced configuration options that control how the directory is displayed. +這個模組有些進階設定選項可以控制顯示資料夾。 | Advanced Option | 預設 | 說明 | | --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | +| `fish_style_pwd_dir_length` | `0` | 當使用 fish shell 的 pwd 路徑邏輯時使用的字元數量。 | | `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. | `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. @@ -788,7 +789,7 @@ 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` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). +The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_MACHINE_NAME`, `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use). ### 選項 @@ -824,7 +825,7 @@ format = "via [🐋 $context](blue bold)" ## Dotnet -The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 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. +The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 如果這個資料夾已經選定一個 SDK,則顯示這個 SDK 的版本。 如果沒有的話,則顯示最新安裝的 SDK 版本。 By default this module will only be shown in your prompt when one or more of the following files are present in the current directory: @@ -839,7 +840,7 @@ By default this module will only be shown in your prompt when one or more of the You'll also need the .NET Core SDK installed in order to use it correctly. -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. +這個模組內部是使用它自己的機制來偵測版本。 一般來說這個模組有 `dotnet --version` 的兩倍快,但是它可能會在你的 .NET 專案有不尋常的資料夾結構時顯示不正確的版本。 如果精確度比速度更重要的話,你可以藉由設定模組中的 `heuristic = false` 選項來停用這個功能。 The module will also show the Target Framework Moniker () when there is a csproj file in the current directory. @@ -849,13 +850,13 @@ The module will also show the Target Framework Moniker ([\\w-]+)" = "gke-$cluster" ``` -## Line Break +## 換行 -The `line_break` module separates the prompt into two lines. +`line_break` 模組將提示字元分成兩行。 ### 選項 -| Option | 預設 | 說明 | -| ---------- | ------- | ------------------------------------------------------------------ | -| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. | +| Option | 預設 | 說明 | +| ---------- | ------- | ----------------------------- | +| `disabled` | `false` | 停用 `line_break` 模組,讓提示字元變成一行。 | ### 範例 @@ -1819,27 +1821,27 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o format = "via [🌕 $version](bold blue) " ``` -## Memory Usage +## 記憶體使用量 -The `memory_usage` module shows current system memory and swap usage. +`memory_usage` 模組顯示現在系統記憶體與 swap 的使用量。 -By default the swap usage is displayed if the total system swap is non-zero. +預設 swap 使用量會在系統總 swap 使用量不為 0 時顯示出來。 ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。 ::: ### 選項 -| Option | 預設 | 說明 | -| ----------- | ----------------------------------------------- | -------------------------------------------------------- | -| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. | -| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. | -| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. | -| `style` | `"bold dimmed white"` | 這個模組的風格。 | -| `disabled` | `true` | Disables the `memory_usage` module. | +| Option | 預設 | 說明 | +| ----------- | ----------------------------------------------- | -------------------------- | +| `threshold` | `75` | 將記憶體使用量隱藏,除非使用量超過指定值。 | +| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. | +| `symbol` | `"🐏"` | 顯示在記憶體使用量之前的符號。 | +| `style` | `"bold dimmed white"` | 這個模組的風格。 | +| `disabled` | `true` | 停用 `memory_usage` 模組。 | ### Variables @@ -1878,7 +1880,7 @@ The `hg_branch` module shows the active branch of the repo in your current direc | `style` | `"bold purple"` | 這個模組的風格。 | | `format` | `"on [$symbol$branch]($style) "` | The format for the module. | | `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes | -| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. | +| `truncation_symbol` | `"…"` | 用來指示分支名稱被縮減的符號。 | | `disabled` | `true` | Disables the `hg_branch` module. | ### Variables @@ -1906,7 +1908,7 @@ truncation_symbol = "" The `nim` module shows the currently installed version of [Nim](https://nim-lang.org/). By default the module will be shown if any of the following conditions are met: -- The current directory contains a `nim.cfg` file +- 現在資料夾中含有一個 `nim.cfg` 檔案 - 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 @@ -1946,7 +1948,7 @@ symbol = "🎣 " ## Nix-shell -The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment. +The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. 這個模組會在 nix-shell 環境中顯示。 ### 選項 @@ -1957,7 +1959,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | `style` | `"bold blue"` | 這個模組的風格。 | | `impure_msg` | `"impure"` | A format string shown when the shell is impure. | | `pure_msg` | `"pure"` | A format string shown when the shell is pure. | -| `disabled` | `false` | Disables the `nix_shell` module. | +| `disabled` | `false` | 停用 `nix_shell` 模組。 | ### Variables @@ -1986,10 +1988,10 @@ format = 'via [☃️ $state( \($name\))](bold blue) ' The `nodejs` module shows the currently installed version of [Node.js](https://nodejs.org/). By default the module will be shown if any of the following conditions are met: -- The current directory contains a `package.json` file +- 現在資料夾中包含一個 `package.json` 檔案 - The current directory contains a `.node-version` file - The current directory contains a `.nvmrc` file -- The current directory contains a `node_modules` directory +- 現在資料夾中包含一個 `node_modules` 資料夾 - The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension - The current directory contains a file with the `.ts` extension @@ -2004,7 +2006,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. | | `detect_folders` | `["node_modules"]` | Which folders should trigger this module. | | `style` | `"bold green"` | 這個模組的風格。 | -| `disabled` | `false` | Disables the `nodejs` module. | +| `disabled` | `false` | 停用 `nodejs` 模組。 | | `not_capable_style` | `bold red` | The style for the module when an engines property in package.json does not match the Node.js version. | ### Variables @@ -2108,9 +2110,9 @@ 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`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages. +The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並顯示他的現在版本。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `composer`, `gradle`, `julia`, `mix`, `helm` and `shards` packages. - [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present in the current directory - [**Cargo**](https://doc.rust-lang.org/cargo/) – The `cargo` package version is extracted from the `Cargo.toml` present in the current directory @@ -2124,6 +2126,7 @@ The `package` module is shown when the current directory is the repository for a - [**Helm**](https://helm.sh/docs/helm/helm_package/) - The `helm` chart version is extracted from the `Chart.yaml` present - [**Maven**](https://maven.apache.org/) - The `maven` package version is extracted from the `pom.xml` present - [**Meson**](https://mesonbuild.com/) - The `meson` package version is extracted from the `meson.build` present +- [**Shards**](https://crystal-lang.org/reference/the_shards_command/index.html) - The `shards` package version is extracted from the `shard.yml` present - [**V**](https://vlang.io) - The `vlang` package version is extracted from the `v.mod` present > ⚠️ 顯示出來的版本是從你的現在資料夾之中擷取出來的,並非從套件管理員取得。 @@ -2133,11 +2136,11 @@ The `package` module is shown when the current directory is the repository for a | Option | 預設 | 說明 | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | | `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `symbol` | `"📦 "` | 顯示在套件的版本之前的符號。 | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `style` | `"bold 208"` | 這個模組的風格。 | | `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | Disables the `package` module. | +| `disabled` | `false` | 停用 `package` 模組。 | ### Variables @@ -2202,7 +2205,7 @@ format = "via [🦪 $version]($style) " The `php` module shows the currently installed version of [PHP](https://www.php.net/). By default the module will be shown if any of the following conditions are met: -- The current directory contains a `composer.json` file +- 現在資料夾中含有一個 `composer.json` 檔案 - The current directory contains a `.php-version` file - The current directory contains a `.php` extension @@ -2238,6 +2241,63 @@ The `php` module shows the currently installed version of [PHP](https://www.php. format = "via [🔹 $version](147 bold) " ``` +## Pulumi + +The `pulumi` module shows the currently selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/) and version. + +::: tip + +By default the Pulumi version is not shown, since it takes an order of magnitude longer to load then most plugins (~70ms). If you still want to enable it, [follow the example shown below](#with-pulumi-version). + +::: + +By default the module will be shown if any of the following conditions are met: + +- The current directory contains either `Pulumi.yaml` or `Pulumi.yml` +- A parent directory contains either `Pulumi.yaml` or `Pulumi.yml` + +### 選項 + +| Option | 預設 | 說明 | +| ---------------- | -------------------------------- | ------------------------------------------------------------------------- | +| `format` | `"via [$symbol$stack]($style) "` | The format string for the module. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `symbol` | `" "` | A format string shown before the Pulumi stack. | +| `style` | `"bold 5"` | 這個模組的風格。 | +| `disabled` | `false` | Disables the `pulumi` module. | + +### Variables + +| 變數 | 範例 | 說明 | +| --------- | ---------- | ------------------------------------ | +| version | `v0.12.24` | The version of `pulumi` | +| stack | `dev` | The current Pulumi stack | +| 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 + +### 範例 + +#### With Pulumi Version + +```toml +# ~/.config/starship.toml + +[pulumi] +format = "[🛥 ($version )$stack]($style) " +``` + +#### Without Pulumi version + +```toml +# ~/.config/starship.toml +[pulumi] +symbol = "🛥 " +format = "[$symbol$stack]($style) " + +``` + ## PureScript The `purescript` module shows the currently installed version of [PureScript](https://www.purescript.org/) version. By default the module will be shown if any of the following conditions are met: @@ -2571,31 +2631,35 @@ The `shell` module shows an indicator for currently used shell. ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。 ::: ### 選項 -| Option | 預設 | 說明 | -| ---------------------- | ------------ | ------------------------------------------------------------ | -| `bash_indicator` | `bsh` | A format string used to represent bash. | -| `fish_indicator` | `fsh` | A format string used to represent fish. | -| `zsh_indicator` | `zsh` | A format string used to represent zsh. | -| `powershell_indicator` | `psh` | A format string used to represent powershell. | -| `ion_indicator` | `ion` | A format string used to represent ion. | -| `elvish_indicator` | `esh` | A format string used to represent elvish. | -| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | -| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | -| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | -| `format` | `$indicator` | The format for the module. | -| `disabled` | `true` | Disables the `shell` module. | +| Option | 預設 | 說明 | +| ---------------------- | ------------------------- | ------------------------------------------------------------ | +| `bash_indicator` | `bsh` | A format string used to represent bash. | +| `fish_indicator` | `fsh` | A format string used to represent fish. | +| `zsh_indicator` | `zsh` | A format string used to represent zsh. | +| `powershell_indicator` | `psh` | A format string used to represent powershell. | +| `ion_indicator` | `ion` | A format string used to represent ion. | +| `elvish_indicator` | `esh` | A format string used to represent elvish. | +| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. | +| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. | +| `unknown_indicator` | | The default value to be displayed when the shell is unknown. | +| `format` | `"[$indicator]($style) "` | The format for the module. | +| `style` | `"white bold"` | 這個模組的風格。 | +| `disabled` | `true` | Disables the `shell` module. | ### Variables | 變數 | 預設 | 說明 | | --------- | -- | ---------------------------------------------------------- | | indicator | | Mirrors the value of `indicator` for currently used shell. | +| style\* | | Mirrors the value of option `style`. | + +\*: This variable can only be used as a part of a style string ### Examples @@ -2606,6 +2670,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y fish_indicator = "" powershell_indicator = "_" unknown_indicator = "mystery shell" +style = "cyan bold" disabled = false ``` @@ -2683,7 +2748,7 @@ The `status` module displays the exit code of the previous command. The module w ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。 ::: @@ -2791,7 +2856,7 @@ By default the Terraform version is not shown, since this is slow for current ve By default 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 +- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions ### 選項 @@ -2800,7 +2865,7 @@ By default the module will be shown if any of the following conditions are met: | `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. | | `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | | `symbol` | `"💠"` | A format string shown before the terraform workspace. | -| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. | +| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. | | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[".terraform"]` | Which folders should trigger this module. | | `style` | `"bold 105"` | 這個模組的風格。 | @@ -2843,7 +2908,7 @@ The `time` module shows the current **local** time. The `format` configuration v ::: tip -This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file. +這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`。 ::: @@ -3101,11 +3166,19 @@ The order in which custom modules are shown can be individually set by including ::: +::: warning Command output is printed unescaped to the prompt + +Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. `\h`, but this module will not work in a fish or zsh shell. + +Format strings can also contain shell specific prompt sequences, e.g. [Bash](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html), [Zsh](https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html). + +::: + ### 選項 | Option | 預設 | 說明 | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. | +| `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`. | @@ -3164,12 +3237,12 @@ Automatic detection of shells and proper parameters addition are currently imple [custom.foo] command = "echo foo" # shows output of command -files = ["foo"] # can specify filters +files = ["foo"] # can specify filters but wildcards are not supported when = """ test "$HOME" == "$PWD" """ format = " transcending [$output]($style)" [custom.time] command = "time /T" -files = ["*.pst"] +extensions = ["pst"] # filters *.pst files shell = ["pwsh.exe", "-NoProfile", "-Command", "-"] ``` diff --git a/docs/zh-TW/faq/README.md b/docs/zh-TW/faq/README.md index 33690cea4..8c9a7683b 100644 --- a/docs/zh-TW/faq/README.md +++ b/docs/zh-TW/faq/README.md @@ -56,41 +56,67 @@ Starship prompt 會盡可能的使用被提供的上下文參數,但使用者 sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl ``` -## 我發現一些看不懂或意料外的符號,那是代表什麼意思? +## Why do I see `Executing command "..." timed out.` warnings? -如果你看見了一些不認得的符號,你可以使用 `starship explain` 來列出當下顯示出的 modules 的解釋。 +Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout` key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. -## 為什麼我無法在我的提示字元中看到字形符號? +## I see symbols I don't understand or expect, what do they mean? -會導致這種狀況,通常是因為系統配置錯誤。 有些 Linux 發行版不支援隨開隨用的字體。 你需要確保: +If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules. + +## Starship is doing something unexpected, how can I debug it? + +You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module. + +```sh +env STARHIP_LOG=trace starship module rust +``` + +If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame. + +```sh +env STARHIP_LOG=trace starship timings +``` + +This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output. + +Finally if you find a bug you can use the `bug-report` command to create a Github issue. + +```sh +starship bug-report +``` + +## 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: - 你的當地語言設置為 UTF-8,如 `de_DE.UTF-8` 或 `ja_JP.UTF-8`。 如果 `LC_ALL` 不是 UTF-8,[你會需要改變他](https://www.tecmint.com/set-system-locales-in-linux/)。 - 你已經安裝一個表情符號字體。 大多數的系統在預設情況下皆有支持表情符號字體,然後有些(尤其 Arch Linux)沒有。 你通常可以透過系統的套件管理器安裝一個表情符號字體 —— [noto emoji](https://www.google.com/get/noto/help/emoji/) 是個受歡迎的選擇。 - 你正在使用 [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" ``` -第一行指令應該會顯示一個 [snake emoji](https://emojipedia.org/snake/),同時,第二行指令應該顯示 [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs)。 +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). -如果任何一個符號顯示錯誤,代表你的系統配置仍然是錯誤的。 不幸的是,正確的設置字體有時候是件困難的事。 Discord 上的使用者可能可以提供協助。 如果兩種符號皆正確顯示,但你仍然無法在 starship 中看到他們,請[發送 bug 回報](https://github.com/starship/starship/issues/new/choose)! +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) -## 我要如何從電腦中移除 Starship? +## How do I uninstall Starship? -移除 Starship 的過程與安裝過程一樣簡單。 +Starship is just as easy to uninstall as it is to install in the first place. 1. 刪除 Shell 的設定檔案 (比如 `~/.bashrc`) 中用來初始化 Starship 的部分。 1. 刪除 Starship 的執行檔 -如果你是透過套件管理器安裝 Starship 的,請到套件管理器的文件中尋找相關的移除步驟指示。 +If Starship was installed using a package manager, please refer to their docs for uninstallation instructions. -如果你是透過安裝腳本來安裝 Starship 的,可以執行以下的命令來移除執行檔。 +If Starship was installed using the install script, the following command will delete the binary: ```sh -# 定位並且刪除 starship 執行檔 +# Locate and delete the starship binary sh -c 'rm "$(which starship)"' ``` diff --git a/docs/zh-TW/guide/README.md b/docs/zh-TW/guide/README.md index 3e45dfecb..b779b7baa 100644 --- a/docs/zh-TW/guide/README.md +++ b/docs/zh-TW/guide/README.md @@ -304,37 +304,9 @@ 如果你對貢獻 Starship 有興趣,請看我們的 [貢獻指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) 。 另外,請不用客氣加入我們的 [Discord 伺服器](https://discord.gg/8Jzqu3T) 並來問候一下。 👋 -### 專案貢獻者 - -感謝所有做出貢獻的人,使這個專案能夠存在。 [[我要貢獻](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)] - - -### 專案資助者 - -成為專案資助者,推動社群永續經營 [[成為贊助者](https://opencollective.com/starship/contribute)] - -#### 個人 - - - -#### 組織 - -以組織名義資助專案 這裏會產生一個能連向您組織網站的連結標誌。 [[成為贊助組織](https://opencollective.com/starship/contribute)] - - - - - - - - - - - - ## 💭 發想來自 -請看之前這些幫助我們創造 Starship 的前任作品。 🙏 +Please check out these previous works that helped inspire the creation of starship. 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - 給太空人的 ZSH 提示。 @@ -349,4 +321,4 @@ ## 📝 許可 -Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).
這個專案使用 [ISC](https://github.com/starship/starship/blob/master/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/zh-TW/installing/README.md b/docs/zh-TW/installing/README.md index f41c0796d..8989c1cac 100644 --- a/docs/zh-TW/installing/README.md +++ b/docs/zh-TW/installing/README.md @@ -35,9 +35,19 @@ pkg install getconf sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin ``` +## [Funtoo Linux](https://www.funtoo.org/Welcome) + +### 安裝 + +On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: + +```sh +emerge app-shells/starship +``` + ## [Nix](https://nixos.wiki/wiki/Nix) -### 獲得執行檔 +### Getting the Binary #### 命令式 @@ -47,7 +57,7 @@ nix-env -iA nixos.starship #### 聲明式、單個使用者,使用 [home-manager](https://github.com/nix-community/home-manager) -在 `home.nix` 檔案中,啟用 `programs.starship` 模組,並且添加你的設定: +Enable the `programs.starship` module in your `home.nix` file, and add your settings ```nix { @@ -69,7 +79,7 @@ nix-env -iA nixos.starship } ``` -然後執行 +then run ```sh home-manager switch @@ -77,7 +87,7 @@ home-manager switch #### 聲明式、全系統,使用 NixOS -將 `pkgs.starship` 添加至 `configuration.nix` 檔案內的 `environment.systemPackages` 下,並且執行 +Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run ```sh sudo nixos-rebuild switch diff --git a/docs/zh-TW/presets/README.md b/docs/zh-TW/presets/README.md index a85d05b5f..4d4aa13d1 100644 --- a/docs/zh-TW/presets/README.md +++ b/docs/zh-TW/presets/README.md @@ -202,6 +202,9 @@ format = '\[[$symbol($version)]($style)\]' [php] format = '\[[$symbol($version)]($style)\]' +[pulumi] +format = '\[[$symbol$stack]($style)\]' + [purescript] format = '\[[$symbol($version)]($style)\]' @@ -350,6 +353,9 @@ symbol = "pl " [php] symbol = "php " +[pulumi] +symbol = "pulumi " + [purescript] symbol = "purs " @@ -435,6 +441,9 @@ format = 'via [$symbol]($style)' [php] format = 'via [$symbol]($style)' +[pulumi] +format = 'via [$symbol$stack]($style)' + [purescript] format = 'via [$symbol]($style)' @@ -462,3 +471,60 @@ format = 'via [$symbol]($style)' [zig] format = 'via [$symbol]($style)' ``` + +## Pure + +This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure). + +![Screenshot of Pure preset](/presets/pure-prompt.png) + +### 設定 + +```toml +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$line_break\ +$python\ +$character""" + +[directory] +style = "blue" + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vicmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" +```