diff --git a/docs/ar-SA/advanced-config/README.md b/docs/ar-SA/advanced-config/README.md index f16f8268..e33ec300 100644 --- a/docs/ar-SA/advanced-config/README.md +++ b/docs/ar-SA/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Custom pre-prompt and pre-execution Commands in Cmd Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -205,7 +225,9 @@ Some shells support a right prompt which renders on the same line as the input. 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` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### مثال diff --git a/docs/ar-SA/config/README.md b/docs/ar-SA/config/README.md index 23325dc0..f00c2b14 100644 --- a/docs/ar-SA/config/README.md +++ b/docs/ar-SA/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/ar-SA/installing/README.md b/docs/ar-SA/installing/README.md index 69b986a5..197cade3 100644 --- a/docs/ar-SA/installing/README.md +++ b/docs/ar-SA/installing/README.md @@ -1,19 +1,19 @@ -# التثبيت المتقدم +# Advanced Installation -To install starship, you need to do two things: +لثتبيت starship تحتاج للقيام بشيئين هما: -1. Get the **starship** binary onto your computer -1. Tell your shell to use the starship binary as its prompt by modifying its init scripts +1. ثبت ملفات **starship** على جهازك +1. تنبيه موجه الأوامر بإن يقوم بجعل سطر الأوامر ل starship وذلك بتعديل كود الإبتداء -For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed. +غالبية المستخدمين [الصفحة الرئيسية ](/guide/#🚀-installation) سوف تلبي احتياجاتهم. لكن، من أجل الاستخدام المتقدم، هناك حاجة لتوجيهات أخرى. -There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out! +هناك العديد من الحالات التي لا تلبي المعلومات في ملف README.md احتياجها ولذلك هذه بعض إرشادات التثبيت الإضافية مقدمة من مجتمع starship. إذا كانت لديك ملاحظة وقمت بحلها ولم تجد هذا الحل لها ضمن الحلول التالية، الرجاء أضفها هنا! ## [Chocolatey](https://chocolatey.org) ### المتطلبات الأساسية -Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey. +إذهب إلى [ صفحة تثبيت Chocolatey ](https://chocolatey.org/install) و اتبع الإرشادات لتثبيت البرنامج. ### التثبيت @@ -39,7 +39,7 @@ curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.term ### التثبيت -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: +يمكن تثبيت starship في Funtoo linux باستخدام [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage: ```sh emerge app-shells/starship @@ -47,17 +47,17 @@ emerge app-shells/starship ## [Nix](https://nixos.wiki/wiki/Nix) -### Getting the Binary +### احصل على ملفات الباينري -#### Imperatively +#### بشكل مباشر ```sh nix-env -iA nixos.starship ``` -#### Declarative, single user, via [home-manager](https://github.com/nix-community/home-manager) +#### بشكل تصريحي، من أجل مستخدم واحد، عبر [home-manager](https://github.com/nix-community/home-manager) -Enable the `programs.starship` module in your `home.nix` file, and add your settings +مكن كود`programs.starship` في ملف`home.nix` و أضف إلى الإعدادات الإعدادات التالية ```nix { @@ -78,15 +78,15 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett } ``` -then run +ثم بعد ذلك شغل ```sh home-manager switch ``` -#### Declarative, system-wide, with NixOS +#### بشكل تصريحي، لعدة مستخدمين -Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run +أضف `pkgs.starship` إلى `environment.systemPackages` في `configuration.nix`, بعد ذلك شغل ```sh sudo nixos-rebuild switch diff --git a/docs/ar-SA/migrating-to-0.45.0/README.md b/docs/ar-SA/migrating-to-0.45.0/README.md index 18661c3b..62e754e0 100644 --- a/docs/ar-SA/migrating-to-0.45.0/README.md +++ b/docs/ar-SA/migrating-to-0.45.0/README.md @@ -1,10 +1,10 @@ -# Migrating to v0.45.0 +# الإنتقال إلى النسخة v0.45.0 -Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization. +النسخة 0.45.0 سوف تستمر في تقديم تحديثات جذرية حتى الوصول للنسخة المستقرة 1.0.0. لقد قمنا بتغييرات رئيسية لكيفية إعداد سطر الأوامر، وذلك يسمح بطيف أكبر من قابلية التخصيص. -This guide is intended to walk you through the breaking changes. +هذا الدليل هو جولة خلال التغييرات الرئيسية التي قمنا بها. -## `prompt_order` has been replaced by a root-level `format` +## `prompt_order`تم استبداله بتنسيق root-level `` Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship. diff --git a/docs/bn-BD/advanced-config/README.md b/docs/bn-BD/advanced-config/README.md index 9dc0b4c6..2e6c8aa0 100644 --- a/docs/bn-BD/advanced-config/README.md +++ b/docs/bn-BD/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Custom pre-prompt and pre-execution Commands in Cmd Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -205,7 +225,9 @@ Some shells support a right prompt which renders on the same line as the input. 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` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### Example diff --git a/docs/bn-BD/config/README.md b/docs/bn-BD/config/README.md index dccdabf2..1619411e 100644 --- a/docs/bn-BD/config/README.md +++ b/docs/bn-BD/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/ckb-IR/advanced-config/README.md b/docs/ckb-IR/advanced-config/README.md index 9b407722..24f66b42 100644 --- a/docs/ckb-IR/advanced-config/README.md +++ b/docs/ckb-IR/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Custom pre-prompt and pre-execution Commands in Cmd Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -205,7 +225,9 @@ Some shells support a right prompt which renders on the same line as the input. 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` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### نموونە diff --git a/docs/ckb-IR/config/README.md b/docs/ckb-IR/config/README.md index 7bc81eea..8c7b62f0 100644 --- a/docs/ckb-IR/config/README.md +++ b/docs/ckb-IR/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/de-DE/README.md b/docs/de-DE/README.md index 032a544d..6b2e0011 100644 --- a/docs/de-DE/README.md +++ b/docs/de-DE/README.md @@ -45,7 +45,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P curl -sS https://starship.rs/install.sh | sh ``` - Um Starship selbst zu aktualisieren, führe das Skript oben erneut aus. Die vorhandene Version wird ersetzt, ohne das deine Konfiguration von Starship verloren geht. + Führe das Skript oben erneut aus, um Starship selbst zu aktualisieren. Die vorhandene Version wird ersetzt, ohne dass deine Starship-Konfiguration verloren geht. #### Installation mithilfe eines Paket-Managers @@ -66,7 +66,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P #### Bash - Trage folgendes am Ende der `~/.bashrc` ein: + Füge dies ans Ende von `~/.bashrc`: ```sh # ~/.bashrc @@ -99,7 +99,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P #### Powershell - Trage das folgende am Ende von `Microsoft.PowerShell_profile.ps1` ein. Du kannst den Speicherort dieser Datei überprüfen, indem du die `$PROFILE` Variable in PowerShell abfragst. Der Pfat lautet normalerweise `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` unter Windows und `~/.config/powershell/Microsoft.PowerShell_profile.ps1` auf -Nix. + Füge das Folgende ans Ende von `Microsoft.PowerShell_profile.ps1` an. Du kannst den Speicherort dieser Datei überprüfen, indem du die `$PROFILE` Variable in PowerShell abfragst. Normalerweise ist der Pfad `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` oder `~/.config/powershell/Microsoft.PowerShell_profile.ps1` auf -Nix. ```sh Invoke-Expression (&starship init powershell) @@ -153,7 +153,7 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P ::: - Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell): + Füge folgendes zum Ende deiner Nushell env Datei hinzu (finde sie, indem du `$nu.env-path` in Nushell ausführst): ```sh mkdir ~/.cache/starship starship init nu | save -f ~/.cache/starship/init.nu diff --git a/docs/de-DE/advanced-config/README.md b/docs/de-DE/advanced-config/README.md index ff7eb281..34f09cdf 100644 --- a/docs/de-DE/advanced-config/README.md +++ b/docs/de-DE/advanced-config/README.md @@ -1,6 +1,6 @@ # Erweiterte Konfiguration -Auch wenn Starship eine vielseitige Shell ist, reichen manche Konfigurationen in der `starship.toml` nicht aus, um erweiterte Einstellungen vorzunehmen. Diese Seite beschreibt einige fortgeschrittene Konfigurationen für Starship. +Auch wenn Starship eine vielseitige Shell ist, reichen manche Konfigurationen in der `starship.toml` nicht aus, um manche Sachen zu erreichen. Diese Seite beschreibt einige fortgeschrittene Konfigurationen für Starship. ::: warning @@ -10,7 +10,7 @@ Die hier beschriebenen Konfigurationen werden sich mit kommenden Updates von Sta ## TransientPrompt in PowerShell -It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`. +Es ist möglich, die zuvor geprintete Prompt mit einem benutzerdefinierten String zu ersetzen. Das ist in Fällen nützlich, in denen nicht immer die ganze Information der Prompt gebraucht wird. Führe `Enable-TransientPrompt` in deiner Shell-Session aus, um dieses Verhalten zu aktivieren. Füge das Statement in dein `$PROFILE` ein, um diese Funktion dauerhaft zu aktivieren. Transience can be disabled on-the-fly with `Disable-TransientPrompt`. By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do @@ -26,7 +26,7 @@ Enable-TransientPrompt ## TransientPrompt and TransientRightPrompt in Cmd -Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient ` where \ can be one of: +Clink allows you to replace the previous-printed prompt with custom strings. Das ist in Fällen nützlich, in denen nicht immer die ganze Information der Prompt gebraucht wird. To enable this, run `clink set prompt.transient ` where \ can be one of: - `always`: always replace the previous prompt - `same_dir`: replace the previous prompt only if the working directory is same @@ -56,7 +56,7 @@ load(io.popen('starship init cmd'):read("*a"))() ## TransientPrompt and TransientRightPrompt in Fish -It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`. +Es ist möglich, die zuvor geprintete Prompt mit einem benutzerdefinierten String zu ersetzen. Das ist in Fällen nützlich, in denen nicht immer die ganze Information der Prompt gebraucht wird. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`. Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct. @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Custom pre-prompt and pre-execution Commands in Cmd Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -129,7 +149,7 @@ eval $(starship init bash) set +o functrace ``` -## Custom pre-prompt and pre-execution Commands in PowerShell +## Benutzerdefinierte Pre-Prompt- und Pre-Execution-Befehle 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`. Starship bietet daher die begrenzte Möglichkeit, eigene Funktionen in das prompt rendering Verfahren einzufügen: @@ -205,7 +225,9 @@ Some shells support a right prompt which renders on the same line as the input. 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` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### Beispiel diff --git a/docs/de-DE/config/README.md b/docs/de-DE/config/README.md index 96b5ba07..32d6f4d9 100644 --- a/docs/de-DE/config/README.md +++ b/docs/de-DE/config/README.md @@ -1,6 +1,6 @@ # Konfiguration -Um mit der Konfiguration von Starship zu beginnen, muss eine leere Datei in diesem Pfad erstellt werden: `~/.config/starship.toml`. +Um mit der Konfiguration von Starship zu beginnen, musst du die folgende Datei erstellen: `~/.config/starship.toml`. ```sh mkdir -p ~/.config && touch ~/.config/starship.toml @@ -9,24 +9,25 @@ mkdir -p ~/.config && touch ~/.config/starship.toml Die gesamte Konfiguration von Starship erfolgt in dieser [TOML](https://github.com/toml-lang/toml)-Datei: ```toml -# Get editor completions based on the config schema + +# Editor Vervollständigungen basierend auf dem Konfigurations-Schema erhalten "$schema" = 'https://starship.rs/config-schema.json' -# Inserts a blank line between shell prompts +# Fügt 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' +# Ersetzt das '❯' Zeichen in der Prompt mit '➜' +[character] # Der name des Moduls das wir ändern ist 'character' +success_symbol = '[➜](bold green)' # Der 'success_symbol' Teil wird auf '➜' mit der farbe 'bold green' gesetzt -# Disable the package module, hiding it from the prompt completely +# Deaktiviert das "package" Modul, damit es in der Eingabeaufforderung nicht mehr zu sehen ist [package] disabled = true ``` -### Config File Location +### Ort der Konfigurationsdatei -Die voreingestellte Konfigurations-Datei kann mit der `STARSHIP_CONFIG` Umgebungsvariable verändert werden. Hier z. Bsp. für die BASH shell, hinzuzufügen zur ~/. bashrc: +Du kannst die voreingestellte Konfigurations-Datei mit der `STARSHIP_CONFIG` Umgebungsvariable verändern: ```sh export STARSHIP_CONFIG=~/example/non/default/path/starship.toml @@ -38,7 +39,7 @@ export STARSHIP_CONFIG=~/example/non/default/path/starship.toml $ENV:STARSHIP_CONFIG = "$HOME\example\non\default\path\starship.toml" ``` -Or for Cmd (Windows) would be adding this line to your `starship.lua`: +Oder für Cmd (Windows) diese Zeile (wieder zur `starship.lua`): ```lua os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\starship.toml') @@ -46,7 +47,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### 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 an instance of your terminal. Das kann jedoch durch die Nutzung der `STARSHIP_CACHE` Umgebungsvariable verändert werden: +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 @@ -58,7 +59,7 @@ export STARSHIP_CACHE=~/.starship/cache $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" ``` -Or for Cmd (Windows) would be adding this line to your `starship.lua`: +Oder für Cmd (Windows) diese Zeile (wieder zur `starship.lua`): ```lua os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp') @@ -74,9 +75,9 @@ Die meisten Module haben einen Präfix der standardmäßigen terminal-Farbe (z.B ### Strings -In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`. +In der TOML Syntax werden [Zeichenketten](https://toml.io/en/v1.0.0#string) mit `'`, `"`, `'''`, oder `"""` eingesetzt. -The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`. +Die folgende Starship Syntax Symbole haben eine spezielle Rolle in einem String, und müssen demnach als Spezialzeichen markiert werden, um als normales Zeichen angezeigt zu werden: `$ [ ] ( )`. | Symbol | Type | Notes | | ------ | ------------------------- | ------------------------------------------------------ | @@ -543,7 +544,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 ``` @@ -1165,6 +1166,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/de-DE/guide/README.md b/docs/de-DE/guide/README.md index c2744e21..7c0ceaec 100644 --- a/docs/de-DE/guide/README.md +++ b/docs/de-DE/guide/README.md @@ -35,7 +35,7 @@ Stand With Ukraine

@@ -108,7 +108,7 @@ >Portugiesisch (Brasilien)   Vietnamesisch   -### Schritt 2. Set up your shell to use Starship +### Schritt 2. Richte deine Shell für die Nutzung von Starship ein -Konfigurieren deine Shell um Starship zu initialisieren. Wähle dafür deine Shell aus der Liste aus: +Konfiguriere deine Shell, um Starship automatisch zu starten. Wähle dafür deine Shell aus der Liste aus:
Bash -Trage folgendes am Ende der `~/.bashrc` ein: +Füge dies ans Ende von `~/.bashrc`: ```sh eval "$(starship init bash)" @@ -292,7 +292,7 @@ eval "$(starship init bash)"
⌘ Cmd -Du musst [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) mit Cmd verwenden. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: +Du musst [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) mit Cmd verwenden. Erstelle eine Datei in diesem Pfad `%LocalAppData%\clink\starship.lua` mit dem folgenden Inhalt: ```lua load(io.popen('starship init cmd'):read("*a"))() @@ -338,27 +338,27 @@ eval $(starship init ion)
Nushell -Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell): +Füge folgendes zum Ende deiner Nushell env Datei hinzu (finde sie, indem du `$nu.env-path` in Nushell ausführst): ```sh mkdir ~/.cache/starship starship init nu | save -f ~/.cache/starship/init.nu ``` -Und füge folgendes am Ende deiner Nushell-Konfiguration hinzu (du findest diese, indem du folgenden Befehl in Nushell ausführst `$nu.config-path`): +Und füge Folgendes am Ende deiner Nushell-Konfiguration hinzu (finde sie, indem du folgenden Befehl in Nushell ausführst `$nu.config-path`): ```sh use ~/.cache/starship/init.nu ``` -Note: Only Nushell v0.78+ is supported +Beachte: Nushell wird erst ab v0.78+ unterstützt
PowerShell -Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`): +Füge Folgendes am Ende deiner PowerShell-Konfiguration hinzu (finde sie, indem du folgenden Befehl ausführst `$PROFILE`): ```powershell Invoke-Expression (&starship init powershell) @@ -369,7 +369,7 @@ Invoke-Expression (&starship init powershell)
Tcsh -Trage folgendes am Ende von `~/.bashrc` ein: +Füge Folgendes am Ende von `~/.tcshrc` ein: ```sh eval `starship init tcsh` @@ -421,17 +421,17 @@ Falls du an Starship mitwirken willst, wirf bitte einen Blick auf den [Leitfaden Schaut euch bitte auch die Projekte an, die die Entstehung von Starship inspiriert haben. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – Eine ZSH Prompt für Astronauten. -- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. +- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-Shell robbyrussell Thema geschrieben in JavaScript. -- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. +- **[reujab/silber](https://github.com/reujab/silver)** – Eine cross-shell anpassbare Powerline-Prompt mit Icons. -## ❤️ Sponsors +## ❤️ Sponsoren -Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. +Unterstütze dieses Projekt, indem du [ein Sponsor wirst](https://github.com/sponsors/starship). Dein Name und Logo wird hier mit einem Link zu deiner Website erscheinen. -**Supporter Tier** +**Unterstützer** - [Appwrite](https://appwrite.io/) diff --git a/docs/de-DE/presets/README.md b/docs/de-DE/presets/README.md index 3d975aee..ca52d7e8 100644 --- a/docs/de-DE/presets/README.md +++ b/docs/de-DE/presets/README.md @@ -66,6 +66,6 @@ This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/t ## [Gruvbox Rainbow](./gruvbox-rainbow.md) -This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). +Diese Voreinstellung ist stark inspiriert von [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). -[![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) +[![Screenshot von Gruvbox Regenbogen](/presets/img/gruvbox-rainbow.png "Click to view Gruvbox Rainbow preset")](./gruvbox-rainbow) diff --git a/docs/de-DE/presets/gruvbox-rainbow.md b/docs/de-DE/presets/gruvbox-rainbow.md index 2d0ffec6..3bae1429 100644 --- a/docs/de-DE/presets/gruvbox-rainbow.md +++ b/docs/de-DE/presets/gruvbox-rainbow.md @@ -1,10 +1,10 @@ [Zurück zu den Voreinstellungen](./README.md#gruvbox-rainbow) -# Gruvbox Rainbow Preset +# Gruvbox Regenbogen -This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). +Diese Voreinstellung ist stark inspiriert von [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md). -![Screenshot of Gruvbox Rainbow preset](/presets/img/gruvbox-rainbow.png) +![Screenshot von Gruvbox Regenbogen](/presets/img/gruvbox-rainbow.png) ### Voraussetzungen diff --git a/docs/es-ES/advanced-config/README.md b/docs/es-ES/advanced-config/README.md index 5fbe8ab3..3944c29f 100644 --- a/docs/es-ES/advanced-config/README.md +++ b/docs/es-ES/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. Esto es útil en los casos en que la información del prompt no es siempre necesaria. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. Por ejemplo, para mostrar la hora en la que se inició el último comando aquí, lo harías + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Comandos pre-prompt y pre-ejecución personalizados en Cmd Clink proporciona una API extremadamente flexible para ejecutar comandos pre-prompt y pre-ejecución en la shell de Cmd. Es bastante sencillo de usar con Starship. Haz los siguientes cambios a tu archivo `starship.lua` según tus requisitos: @@ -205,7 +225,9 @@ Algunos intérpretes de comandos soportan un prompt derecho que se renderiza en Nota: El prompt derecho es una sola línea siguiendo la ubicación de entrada. Para alinear los módulos arriba de la línea de entrada en un prompt multi-línea, vea el [módulo `fill`](/config/#fill). -`right_format` está actualmente soportado para los siguientes intérpretes de comandos: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### Ejemplo diff --git a/docs/es-ES/config/README.md b/docs/es-ES/config/README.md index 5439fec7..1f1f7365 100644 --- a/docs/es-ES/config/README.md +++ b/docs/es-ES/config/README.md @@ -543,7 +543,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 ``` @@ -1155,19 +1155,20 @@ The `direnv` module shows the status of the current rc file if one is present. T ### Opciones -| Opción | Predeterminado | Descripción | -| ------------------- | -------------------------------------- | ----------------------------------------------------- | -| `format` | `'[$symbol$loaded/$allowed]($style) '` | El formato del módulo. | -| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | -| `style` | `'bold orange'` | El estilo del módulo. | -| `disabled` | `true` | Disables the `direnv` module. | -| `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | -| `detect_files` | `['.envrc']` | Qué nombres de archivo deberían activar este módulo. | -| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | -| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | -| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | -| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | -| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | +| Opción | Predeterminado | Descripción | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------- | +| `format` | `'[$symbol$loaded/$allowed]($style) '` | El formato del módulo. | +| `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | +| `style` | `'bold orange'` | El estilo del módulo. | +| `disabled` | `true` | Disables the `direnv` module. | +| `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. | +| `detect_files` | `['.envrc']` | Qué nombres de archivo deberían activar este módulo. | +| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. | +| `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'no permitido'` | El mensaje que se muestra cuando un archivo rc no está permitido. | +| `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | +| `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | +| `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | ### Variables @@ -3141,14 +3142,14 @@ El módulo `package` se muestra cuando el directorio actual es el repositorio de ### Opciones -| Opción | Predeterminado | Descripción | -| ---------------- | --------------------------------- | --------------------------------------------------------------------------------------- | -| `format` | `'is [$symbol$version]($style) '` | El formato del módulo. | -| `symbol` | `'📦 '` | El símbolo usado antes de mostrar la versión del paquete. | -| `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. | -| `'📦 '` | `false` | Activar la visualización de la versión para los paquetes marcados como privados. | -| `disabled` | `false` | Desactiva el módulo `package`. | +| Opción | Predeterminado | Descripción | +| ----------------- | --------------------------------- | --------------------------------------------------------------------------------------- | +| `format` | `'is [$symbol$version]($style) '` | El formato del módulo. | +| `symbol` | `'📦 '` | El símbolo usado antes de mostrar la versión del paquete. | +| `version_format` | `'v${raw}'` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` | +| `style` | `'bold 208'` | El estilo del módulo. | +| `display_private` | `false` | Activar la visualización de la versión para los paquetes marcados como privados. | +| `disabled` | `false` | Desactiva el módulo `package`. | ### Variables diff --git a/docs/fr-FR/advanced-config/README.md b/docs/fr-FR/advanced-config/README.md index 28cfcfd9..20125095 100644 --- a/docs/fr-FR/advanced-config/README.md +++ b/docs/fr-FR/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. Par exemple, pour afficher l'heure à laquelle la dernière commande a été lancée ici, vous feriez + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Commandes pré-invite et pré-exécution personnalisées dans Cmd Clink fournit des APIs extrêmement flexibles pour exécuter des commandes pre-invite et pre-exec dans Cmd. Il est assez simple à utiliser avec Starship. Effectuez les modifications suivantes dans votre fichier `starship.lua`, en fonction de vos besoins: @@ -205,7 +225,9 @@ Certains shells peuvent gérer une invite de commande à droite, sur la même li Note: l’invite à droite est une seule ligne, sur la même ligne que l’entrée. Pour aligner à droite les modules au-dessus de la ligne d’entrée d’une invite multiligne, voir le [module `fill`](/config/#fill). -`right_format` est actuellement supporté pour les shells suivants : elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### Exemple diff --git a/docs/fr-FR/config/README.md b/docs/fr-FR/config/README.md index b31a0ed1..5773f2c5 100644 --- a/docs/fr-FR/config/README.md +++ b/docs/fr-FR/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Les fichiers qui activent ce module. | | `detect_folders` | `[]` | Les dossiers qui activent ce module. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/id-ID/advanced-config/README.md b/docs/id-ID/advanced-config/README.md index 0bafc8d5..098b5669 100644 --- a/docs/id-ID/advanced-config/README.md +++ b/docs/id-ID/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Kustomisasi Perintah pre-prompt dan pre-execution Pada Cmd Clink menyediakan APIs yang sangat fleksibel untuk menjalankan perintah pre-prompt dan pre-exec di Cmd shell. Caranya sangat mudah dengan Starship. Ubahlah file `starship.lua` sesuai kebutuhanmu: @@ -205,7 +225,9 @@ Sebagian shells mendukung right prompt yang mana dirender di baris yang sama ses Catatan: Right propmt merupakan sebuah baris yang mengikuti lokasi baris inputan. Untuk membuat modul rata ke kanan di atas baris masukan di dalam multi-line prompt, lihat [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### Contoh diff --git a/docs/id-ID/config/README.md b/docs/id-ID/config/README.md index 7fa086e0..c0859def 100644 --- a/docs/id-ID/config/README.md +++ b/docs/id-ID/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | filenames mana yang sebaiknya memicu modul ini. | | `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/id-ID/installing/README.md b/docs/id-ID/installing/README.md index 2b8b8499..9cd40e13 100644 --- a/docs/id-ID/installing/README.md +++ b/docs/id-ID/installing/README.md @@ -1,6 +1,6 @@ # Advanced Installation -To install starship, you need to do two things: +Untuk memasang starship, ada dua hal yang perlu anda lakukan: 1. Get the **starship** binary onto your computer 1. Tell your shell to use the starship binary as its prompt by modifying its init scripts diff --git a/docs/it-IT/advanced-config/README.md b/docs/it-IT/advanced-config/README.md index 223ec1d8..b920d0d1 100644 --- a/docs/it-IT/advanced-config/README.md +++ b/docs/it-IT/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Custom pre-prompt and pre-execution Commands in Cmd Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -205,7 +225,9 @@ Some shells support a right prompt which renders on the same line as the input. 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` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### Esempio diff --git a/docs/it-IT/config/README.md b/docs/it-IT/config/README.md index 420fedd5..e9ba9676 100644 --- a/docs/it-IT/config/README.md +++ b/docs/it-IT/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Quali nomi di file dovrebbero attivare questo modulo. | | `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/ja-JP/advanced-config/README.md b/docs/ja-JP/advanced-config/README.md index 77256793..f1d7c59d 100644 --- a/docs/ja-JP/advanced-config/README.md +++ b/docs/ja-JP/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. 例えば、直前のコマンドを実行した時刻を表示するには次のようにします。 + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Cmdのカスタムの事前プロンプトおよび事前実行コマンド Clinkはプロンプト表示前と実行前にCmd shellコマンドを実行するための非常に柔軟なAPIを提供します。 It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -205,7 +225,9 @@ Invoke-Expression (&starship init powershell) 注意: 右プロンプトは入力の場所に続く単一の行です。 To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill). -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### 設定例 diff --git a/docs/ja-JP/config/README.md b/docs/ja-JP/config/README.md index 915a02ed..708400f8 100644 --- a/docs/ja-JP/config/README.md +++ b/docs/ja-JP/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | どのファイル名がこのモジュールをアクティブにするか | | `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/ko-KR/advanced-config/README.md b/docs/ko-KR/advanced-config/README.md index b18e3a05..c95445b8 100644 --- a/docs/ko-KR/advanced-config/README.md +++ b/docs/ko-KR/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Custom pre-prompt and pre-execution Commands in Cmd Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -205,7 +225,9 @@ Invoke-Expression (&starship init powershell) 알림: 오른쪽 프롬프트는 입력 위치에 따라 한 줄로 표시됩니다. 여러 줄 프롬프트에서 입력 선 위의 모듈을 오른쪽 정렬하려면, [`fill` 모듈](/config/#fill)을 참고하세요. -`right_format`은 현재 elvish, fish, zsh, xonsh, cmd, nushell에서 지원됩니다. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### 예시 diff --git a/docs/ko-KR/config/README.md b/docs/ko-KR/config/README.md index 4875c0e8..a79069c1 100644 --- a/docs/ko-KR/config/README.md +++ b/docs/ko-KR/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/nl-NL/advanced-config/README.md b/docs/nl-NL/advanced-config/README.md index 9dc0b4c6..2e6c8aa0 100644 --- a/docs/nl-NL/advanced-config/README.md +++ b/docs/nl-NL/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Custom pre-prompt and pre-execution Commands in Cmd Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -205,7 +225,9 @@ Some shells support a right prompt which renders on the same line as the input. 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` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### Example diff --git a/docs/nl-NL/config/README.md b/docs/nl-NL/config/README.md index dccdabf2..1619411e 100644 --- a/docs/nl-NL/config/README.md +++ b/docs/nl-NL/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/no-NO/advanced-config/README.md b/docs/no-NO/advanced-config/README.md index 9dc0b4c6..2e6c8aa0 100644 --- a/docs/no-NO/advanced-config/README.md +++ b/docs/no-NO/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Custom pre-prompt and pre-execution Commands in Cmd Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -205,7 +225,9 @@ Some shells support a right prompt which renders on the same line as the input. 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` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### Example diff --git a/docs/no-NO/config/README.md b/docs/no-NO/config/README.md index dccdabf2..1619411e 100644 --- a/docs/no-NO/config/README.md +++ b/docs/no-NO/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/pl-PL/advanced-config/README.md b/docs/pl-PL/advanced-config/README.md index dd5351f4..c32224cf 100644 --- a/docs/pl-PL/advanced-config/README.md +++ b/docs/pl-PL/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Custom pre-prompt and pre-execution Commands in Cmd Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -205,7 +225,9 @@ Some shells support a right prompt which renders on the same line as the input. 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` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### Example diff --git a/docs/pl-PL/config/README.md b/docs/pl-PL/config/README.md index a39cc9bb..5d0824c4 100644 --- a/docs/pl-PL/config/README.md +++ b/docs/pl-PL/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/pt-BR/advanced-config/README.md b/docs/pt-BR/advanced-config/README.md index 25e75a32..a8b75558 100644 --- a/docs/pt-BR/advanced-config/README.md +++ b/docs/pt-BR/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt e TransientRightPrompt em Bash + +O framework [Ble.sh](https://github.com/akinomyoga/ble.sh) permite substituir o prompt anteriormente impresso por strings personalizadas. Isso é útil em casos onde nem sempre todas as informações do prompt são necessárias. Para habilitar isso, coloque em `~/.bashrc` `bleopt prompt_ps1_transient=`: + +O \ aqui é uma lista separada por dois pontos de `always`, `same-dir` e `trim`. Quando `prompt_ps1_final` está vazio e esta opção tem um valor não-vazio, o prompt especificado pelo `PS1` é apagado ao sair da linha de comando atual. Se o valor contém um campo `trim`, apenas a última linha de multilinha `PS1` é preservada e as outras linhas são apagadas. Caso contrário, a linha de comando será redesenhada como se `PS1=` fosse especificado. Quando um campo `same-dir` está contido no valor e o diretório de trabalho atual difere do diretório final da linha de comando anterior, esta opção `prompt_ps1_transient` é ignorada. + +Faça as seguintes alterações no seu `~/.bashrc` para personalizar o que é exibido à esquerda e à direita: + +- Para personalizar o que o lado esquerdo do valor de entrada é substituído, configure a opção `prompt_ps1_final` Ble.sh. Por exemplo, para exibir o caractere da `Starship` aqui, você faria + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- Para personalizar o que o lado direito de entrada é substituído, configure a opção `prompt_rps1_final` Ble.sh. Por exemplo, para exibir o momento em que o último comando foi iniciado, você faria + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Comandos personalizados de pré-prompt e pré-execução no Cmd O Clink fornece APIs extremamente flexíveis para executar comandos pré-prompt e pré-execução em Cmd shell. É bastante simples de usar com o Starship. Faça as seguintes alterações no seu arquivo `starship.lua` conforme suas necessidades: @@ -205,7 +225,9 @@ Alguns shells suportam um prompt direito que é renderizado na mesma linha que a Nota: O prompt direito é uma única linha após o local de entrada. Para alinhar módulos à direita acima da linha de entrada em um prompt de várias linhas, consulte o [módulo `fill`](/config/#fill). -`right_format` é atualmente suportado pelos seguintes shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### Exemplo diff --git a/docs/pt-BR/config/README.md b/docs/pt-BR/config/README.md index c27f521a..5c13cf0f 100644 --- a/docs/pt-BR/config/README.md +++ b/docs/pt-BR/config/README.md @@ -536,16 +536,16 @@ A opção `display` é um array da seguinte tabela. #### Exemplo ```toml -[[battery.display]] # ''bold red' e discharging_symbol é exibido quando a capacidade está entre 0% e 10% +[[battery.display]] # 'bold red' style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = 'bold red' -[[battery.display]] # 'yellow' style e o símbolo 💦 é exibido quando a capacidade está entre 10% e 30% +[[battery.display]] # 'bold yellow' style and 💦 symbol when capacity is between 10% and 30% threshold = 30 style = 'bold yellow' -discharging_symbol = '💦' +discharging_symbol = '💦 ' -# quando a capacidade estiver acima de 30%, o indicador de bateria não será exibido +# when capacity is over 30%, the battery indicator will not be displayed ``` ## Buf @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Quais nomes de arquivos devem ativar este módulo. | | `detect_folders` | `[]` | Quais pastas devem ativar este módulo. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/pt-PT/advanced-config/README.md b/docs/pt-PT/advanced-config/README.md index 9dc0b4c6..2e6c8aa0 100644 --- a/docs/pt-PT/advanced-config/README.md +++ b/docs/pt-PT/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Custom pre-prompt and pre-execution Commands in Cmd Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -205,7 +225,9 @@ Some shells support a right prompt which renders on the same line as the input. 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` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### Example diff --git a/docs/pt-PT/config/README.md b/docs/pt-PT/config/README.md index dccdabf2..1619411e 100644 --- a/docs/pt-PT/config/README.md +++ b/docs/pt-PT/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/ru-RU/advanced-config/README.md b/docs/ru-RU/advanced-config/README.md index 005fff03..33c25f81 100644 --- a/docs/ru-RU/advanced-config/README.md +++ b/docs/ru-RU/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Custom pre-prompt and pre-execution Commands in Cmd Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -205,7 +225,9 @@ Some shells support a right prompt which renders on the same line as the input. 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` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### Пример diff --git a/docs/ru-RU/config/README.md b/docs/ru-RU/config/README.md index 5aeb02e1..196a4989 100644 --- a/docs/ru-RU/config/README.md +++ b/docs/ru-RU/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/ru-RU/faq/README.md b/docs/ru-RU/faq/README.md index 6fe2f96c..d030c244 100644 --- a/docs/ru-RU/faq/README.md +++ b/docs/ru-RU/faq/README.md @@ -10,9 +10,9 @@ - **Конфигурация**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish) - **Подсказка**: [Starship](https://starship.rs/) -## How do I get command completion as shown in the demo GIF? +## Как мне получить автодополнение команд, как показано на демонстрационной GIF? -Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). +Автодополнение команд обеспечивается выбранной вами оболочкой. В данном случае, демо было выполнено с [Fish Shell](https://fishshell.com/), которая обеспечивает дополнения по умолчанию. Если вы используете Z Shell (zsh), я бы посоветовал взглянуть на [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions). ## Do top level `format` and `.disabled` do the same thing? @@ -21,7 +21,7 @@ Completion support, or autocomplete, is provided by your shell of choice. In the - Disabling modules is more explicit than omitting them from the top level `format` - Новосозданные модули будут добавлены в подсказку по мере обновления Starship -## The docs say Starship is cross-shell. Why isn't my preferred shell supported? +## Доки говорят, что Starship поддерживается на всех оболочках *(cross-shell)*. Почему моя любимая оболочка не поддерживается? Starship устроен так, что есть возможность добавить поддержку практически любой оболочки. Бинарный файл Starship не зависит от оболочки и не имеет состояния, так что если ваша оболочка поддерживает расширение подстрок и настройку подсказки, то Starship может быть использован. @@ -56,15 +56,15 @@ starship prompt --help curl -sS https://starship.rs/install.sh | sh -s -- --platform unknown-linux-musl ``` -## Why do I see `Executing command "..." timed out.` warnings? +## Почему я вижу предупреждение `Executing command "..." timed out.`? -Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings. +Starship выполняет различные команды, чтобы получить информацию, отображаемую в промпте, например версию программы или текущий git status. Чтобы быть уверенными, что starship не зависнет во время выполнения этих команд, мы поставили лимит времени, и если команда выполняется дольше лимита, starship прекратит её выполнение и выведет это предупреждение, это нормальное поведение. Временной лимит можно изменить с помощью опции [`command_timeout`key](/config/#prompt), поэтому при желании вы можете увеличить это время. Вы так же можете следовать шагам для отладки ниже, чтобы понять, какая команда влияет на время и ускорить промпт. Наконец, вы можете изменить переменную окружения `STARSHIP_LOG` `error`, чтобы спрятать это предупреждение. -## 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 explain`, чтобы разъяснить показываемые модули. -## Starship is doing something unexpected, how can I debug it? +## Starship делает что-то неожиданное, как я могу отладить его? 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. @@ -86,24 +86,24 @@ Finally if you find a bug you can use the `bug-report` command to create a GitHu 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: +Наиболее распространенной причиной этого является неправильная конфигурация системы. В частности, некоторые Linux дистрибутивы не предоставляют поддержку шрифта из коробки. Необходимо убедиться, что: - Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/). - You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice. -- You are using a [Nerd Font](https://www.nerdfonts.com/). +- Вы используете [Nerd Font](https://www.nerdfonts.com/). -To test your system, run the following commands in a terminal: +Для тестирования системы запустите следующие команды в терминале: ```sh echo -e "\xf0\x9f\x90\x8d" echo -e "\xee\x82\xa0" ``` -The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs). +Первая строка должна создать [эмоджи змеи](https://emojipedia.org/snake/), а вторая - символ ветки [(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) +Если любой из символов не отображается корректно, ваша система все еще неправильно настроена. К сожалению, иногда сложно получить правильную конфигурацию шрифта. Пользователи в Discord могут помочь. Если оба символа отображаются верно, но вы всё ещё не видите их в starship, [отправьте bug report!](https://github.com/starship/starship/issues/new/choose) ## Как удалить Starship? @@ -121,10 +121,10 @@ If Starship was installed using the install script, the following command will d sh -c 'rm "$(command -v 'starship')"' ``` -## How do I install Starship without `sudo`? +## Как Starship без `sudo`? -The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. +Скрипт установки (`https://starship.rs/install. h`) использует `sudo` только если директория установки недоступна для записи текущим пользователем. Директория установки по умолчанию это значение переменной окружения `$BIN_DIR` или `/usr/local/bin`, если `$BIN_DIR` не установлен. Если вместо этого выбрать директорию установки, которая доступна для записи пользователем, вы можете установить starship без `sudo`. Например, в `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` флаг `-b` установочного скрипта используется, чтобы задать директорию установки на `~/.local/bin`. -For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. +Для неинтерактивной установки Starship не забудьте добавить опцию `-y` чтобы пропустить подтверждение. Проверьте исходник установочного скрипта, чтобы получить список всех поддерживаемых параметров установки. -When using a package manager, see the documentation for your package manager about installing with or without `sudo`. +При через пакетный менеджер, смотрите документацию для вашего пакетного менеджера об установке с `sudo` и без. diff --git a/docs/ru-RU/guide/README.md b/docs/ru-RU/guide/README.md index 5795e781..66a2794e 100644 --- a/docs/ru-RU/guide/README.md +++ b/docs/ru-RU/guide/README.md @@ -180,18 +180,18 @@ ### Обязательные требования -- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)). +- Установленный и включенный в вашем терминале [Nerd Font](https://www.nerdfonts.com/) (например, попробуйте [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)). ### Шаг 1. Установите Starship -Select your operating system from the list below to view installation instructions: +Выберите вашу операционную систему из списка ниже для просмотра инструкций по установке:
Android -Install Starship using any of the following package managers: +Установите Starship с помощью любого из следующих менеджеров пакетов: -| Repository | Instructions | +| Репозиторий | Команда | | --------------------------------------------------------------------------------- | ---------------------- | | [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` | @@ -200,32 +200,32 @@ Install Starship using any of the following package managers:
BSD -Install Starship using any of the following package managers: +Установите Starship с помощью любого из следующих менеджеров пакетов: -| Distribution | Repository | Instructions | -| ------------ | -------------------------------------------------------- | --------------------------------- | -| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | -| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | -| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` | +| Дистрибутив | Репозиторий | Команда | +| ----------- | -------------------------------------------------------- | --------------------------------- | +| **_Любой_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` | +| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
Linux -Install the latest version for your system: +Установите последнюю версию для вашей системы: ```sh curl -sS https://starship.rs/install.sh | sh ``` -Alternatively, install Starship using any of the following package managers: +Или же установите Starship с помощью любого из следующих пакетных менеджеров: -| Distribution | Repository | Instructions | +| Дистрибутив | Репозиторий | Команда | | ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | -| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | -| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | -| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | +| **_Любой_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | +| _Любой_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | +| _Любой_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | | Arch Linux | [Arch Linux Extra](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | @@ -240,15 +240,15 @@ Alternatively, install Starship using any of the following package managers:
macOS -Install the latest version for your system: +Установите последнюю версию для вашей системы: ```sh curl -sS https://starship.rs/install.sh | sh ``` -Alternatively, install Starship using any of the following package managers: +Или же установите Starship с помощью любого из следующих пакетных менеджеров: -| Repository | Instructions | +| Репозиторий | Команда | | -------------------------------------------------------- | --------------------------------------- | | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | @@ -262,9 +262,9 @@ Alternatively, install Starship using any of the following package managers: Install the latest version for your system with the MSI-installers from the [releases section](https://github.com/starship/starship/releases/latest). -Install Starship using any of the following package managers: +Установите Starship с помощью любого из следующих менеджеров пакетов: -| Repository | Instructions | +| Репозиторий | Команда | | -------------------------------------------------------------------------------------------- | --------------------------------------- | | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` | | [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` | @@ -274,9 +274,9 @@ Install Starship using any of the following package managers:
-### Шаг 2. Set up your shell to use Starship +### Шаг 2. Настройте оболочку для использования Starship -Configure your shell to initialize starship. Select yours from the list below: +Настройте оболочку для инициализации starship. Выберете вашу оболочку из списка:
Bash @@ -292,7 +292,7 @@ eval "$(starship init bash)"
Cmd -You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents: +Вам нужно использовать [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) с Cmd. Создайте файл по этому пути `%LocalAppData%\clink\starship.lua` со следующим содержанием: ```lua load(io.popen('starship init cmd'):read("*a"))() @@ -309,7 +309,7 @@ load(io.popen('starship init cmd'):read("*a"))() eval (starship init elvish) ``` -Note: Only Elvish v0.18+ is supported +Примечание: поддерживается только Elvish v0.18+
@@ -399,15 +399,15 @@ eval "$(starship init zsh)"
-### Шаг 3. Configure Starship +### Шаг 3. Настройте Starship -Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy! +Запустите новую сессию оболочки, и вы увидите ваш новый прекрасный промпт. Если вы довольны с настройками по умолчанию, наслаждайтесь! -If you're looking to further customize Starship: +Если вы хотите детальнее настроить Starship: -- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking +- **[Конфигурация](https://starship.rs/config/)** – узнайте, как настраивать Starship, чтобы подкорректировать промпт на ваш вкус -- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others +- **[Пресеты](https://starship.rs/presets/)** – вдохновиться готовой конфигурацией других ## 🤝 Помощь @@ -421,15 +421,15 @@ If you're looking to further customize Starship: Пожалуйста, ознакомьтесь с этими предыдущими работами, которые помогли вдохновить создание Starship. 🙏 -- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts. +- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – ZSH промпт для космонавтов. - **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript. - **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons. -## ❤️ Sponsors +## ❤️ Спонсоры -Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website. +Поддержите этот проект, [став спонсором](https://github.com/sponsors/starship). Ваше имя или логотип будут отображаться здесь со ссылкой на ваш сайт. **Supporter Tier** diff --git a/docs/ru-RU/installing/README.md b/docs/ru-RU/installing/README.md index 25615b14..3c5aeaa5 100644 --- a/docs/ru-RU/installing/README.md +++ b/docs/ru-RU/installing/README.md @@ -1,4 +1,4 @@ -# Advanced Installation +# Продвинутая установка To install starship, you need to do two things: diff --git a/docs/tr-TR/advanced-config/README.md b/docs/tr-TR/advanced-config/README.md index c874aab1..698071fd 100644 --- a/docs/tr-TR/advanced-config/README.md +++ b/docs/tr-TR/advanced-config/README.md @@ -81,6 +81,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Custom pre-prompt and pre-execution Commands in Cmd Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -205,7 +225,9 @@ Some shells support a right prompt which renders on the same line as the input. 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` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### Example diff --git a/docs/tr-TR/config/README.md b/docs/tr-TR/config/README.md index 6c01d99b..a0223f27 100644 --- a/docs/tr-TR/config/README.md +++ b/docs/tr-TR/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/uk-UA/advanced-config/README.md b/docs/uk-UA/advanced-config/README.md index 00762752..457c68f3 100644 --- a/docs/uk-UA/advanced-config/README.md +++ b/docs/uk-UA/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt та TransientRightPrompt в Bash + +[Ble.sh](https://github.com/akinomyoga/ble.sh) дозволяє замінювати попередньо надрукований командний рядок іншим рядком. Це корисно у випадках, коли вся інформація з командного рядка не потрібна. Для увімкнення цього додайте до `~/.bashrc` рядок `bleopt prompt_ps1_transient=`: + +\ тут  – це розділений двокрапкою список `always`, `same-dir` та `trim`. Якщо `prompt_ps1_final` порожній і цей параметр має не пусте значення, командний рядок, вказаний у `PS1` буде стертий при виході з поточного командного рядка. Якщо значення містить поле `trim`, тільки останній рядок багаторядкового `PS1` буде збережений, а інші вилучені. В іншому випадку командний рядок буде встановлено перестворено, якщо вказано `PS1=`. Коли поле `same-dir` міститься у значені та поточна тека є відмінною від останньої теки у попередньому виводі командного рядка, параметр `prompt_ps1_transient` не враховується. + +Зробіть наступні зміни у `~/.bashrc`, щоб налаштувати, що показується ліворуч і праворуч: + +- Для налаштування того, чим замінюється ліва частина вводу, налаштуйте параметр `prompt_ps1_final`. Наприклад, щоб показати тут модуль Starship `character`, вам потрібно + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- Для налаштування того, чим замінюється права частина вводу, налаштуйте параметр `prompt_rps1_final`. Наприклад, щоб показати час, коли була запущена остання команда, ви можете зробити + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Власні команди pre-prompt та pre-execution в Cmd Clink забезпечує надзвичайно гнучкий API для виконання команд pre-prompt і pre-exec в Cmd. Його досить просто використовувати в Starship. Зробіть наступні зміни у вашому `starship.lua` відповідно до ваших вимог: @@ -205,7 +225,9 @@ Invoke-Expression (&starship init powershell) Примітка: командний рядок праворуч – це один рядок, що знаходиться праворуч у рядку вводу. Щоб вирівняти модулі праворуч над рядком введення в багаторядковому запиті, перегляньте модуль [`fill`](/config/#fill). -`right_format` наразі підтримується для таких оболонок: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` наразі підтримується для таких оболонок: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Примітка: фреймворк [Ble.sh](https://github.com/akinomyoga/ble.sh) має бути встановлений для того, щоб використовувати розташування командного рядка в bash праворуч. ### Приклад diff --git a/docs/uk-UA/config/README.md b/docs/uk-UA/config/README.md index 179a76ee..0d965192 100644 --- a/docs/uk-UA/config/README.md +++ b/docs/uk-UA/config/README.md @@ -1165,6 +1165,7 @@ truncation_symbol = '…/' | `detect_files` | `['.envrc']` | Які імена файлів мають запускати цей модуль. | | `detect_folders` | `[]` | В яких теках цей модуль має запускатись. | | `allowed_msg` | `'allowed'` | Повідомлення, що показується коли використання rc-файлу дозволене. | +| `not_allowed_msg` | `'not allowed'` | Повідомлення, що показується коли використання rc-файлу заборонене. | | `denied_msg` | `'denied'` | Повідомлення, що показується коли використання rc-файлу заборонене. | | `loaded_msg` | `'loaded'` | Повідомлення, що показується коли rc-файл завантажений. | | `unloaded_msg` | `'not loaded'` | Повідомлення, що показується коли rc-файл не завантажений. | diff --git a/docs/uk-UA/faq/README.md b/docs/uk-UA/faq/README.md index afdb13d6..d3b3d41f 100644 --- a/docs/uk-UA/faq/README.md +++ b/docs/uk-UA/faq/README.md @@ -121,10 +121,10 @@ Starship так само легко видалити, як і встановит sh -c 'rm "$(command -v 'starship')"' ``` -## How do I install Starship without `sudo`? +## Як встановити Starship без `sudo`? -The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. +Скрипт для встановлення оболонки (`https://starship.rs/install.sh`) намагається використовувати `sudo` лише в тому випадку, якщо поточний користувач не може писати в цільову теку. Стандартна тека для встановлення – є значенням змінної `$BIN_DIR` або це `/usr/local/bin`, якщо змінну `$BIN_DIR` не встановлено. Якщо замісць стандартної теки вказати теку, в яку ви можете писати, starship можна встановити без використання `sudo`. Наприклад, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` використовує параметр `-b` для встановлення в теку`~/.local/bin`. -For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. +Якщо ви хочете виконати встановлення в повністю автоматичному режимі, не перериваючись на підтвердження в процесі, додайте параметр `-y`. Перегляньте сирці скрипту встановлення для ознайомлення зі всіма можливими параметрами. -When using a package manager, see the documentation for your package manager about installing with or without `sudo`. +У разі використання пакетного менеджера, ознайомтесь з документацією до нього що до можливості встановлення з застосуванням, чи без, `sudo`. diff --git a/docs/vi-VN/advanced-config/README.md b/docs/vi-VN/advanced-config/README.md index e4d0e527..c7f3c956 100644 --- a/docs/vi-VN/advanced-config/README.md +++ b/docs/vi-VN/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Custom pre-prompt and pre-execution Commands in Cmd Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -205,7 +225,9 @@ Some shells support a right prompt which renders on the same line as the input. 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` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### Ví dụ diff --git a/docs/vi-VN/config/README.md b/docs/vi-VN/config/README.md index 72769990..c8e5113b 100644 --- a/docs/vi-VN/config/README.md +++ b/docs/vi-VN/config/README.md @@ -543,7 +543,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 ``` @@ -1165,6 +1165,7 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Những 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. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index 316497e0..4ce164ea 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -2,23 +2,23 @@ home: true heroImage: /logo.svg heroText: -tagline: 轻量、迅速、可无限定制的高颜值终端! +tagline: 轻量、迅速、客制化的高颜值终端! actionText: 快速上手 → actionLink: ./guide/ features: - title: 兼容性优先 - details: Starship 可以在各种常见的操作系统和常见的 shell 上运行。 尝试着在各种地方使用它吧! + details: Starship 可以在常见的操作系统和 shell 上运行。 尝试着在各种地方使用它吧! - - title: 使用 Rust 编写 - details: 具有 Rust 独树一帜的速度与安全性,使你的提示符尽可能的快速可靠。 + title: 基于 Rust + details: Rust 特有的的速度与安全性,让你的提示尽可能的快速可靠。 - - title: 可自定义 - details: 每个小细节都可以按您喜欢的自定义,不论是最小化以求速度,还是最大化以获得最完善的功能。 -footer: ISC 许可 | 版权所有 © 2019 - 目前 Starship 贡献者 + title: 客制化 + details: 每个小细节都可以按您喜欢的客制化,不论是最小化以求速度,还是更大以获得最完善的功能。 +footer: ISC 许可 | 版权所有 © 2019至今 - Starship 贡献者 #Used for the description meta tag, for SEO metaTitle: "Starship:可用于各种 Shell 的提示符" -description: Starship是一款轻量级、反应迅速、可自定义的高颜值终端! 只显示所需要的信息,将优雅和轻量化合二为一。 可以为Bash、Fish、ZSH、Ion、Tcsh、Elvish、Nu、Xonsh、Cmd和PowerShell执行快速安装。 +description: Starship是一款轻量、迅速、可客制化的高颜值终端! 只显示所需要的信息,将优雅和轻量化合二为一。 可以为Bash、Fish、ZSH、Ion、Tcsh、Elvish、Nu、Xonsh、Cmd和PowerShell执行快速安装。 ---
@@ -162,7 +162,7 @@ description: Starship是一款轻量级、反应迅速、可自定义的高颜 然后在您的 Nushell 配置文件的最后(使用 `$nu.config-path` 来获取它的路径),添加以下内容: ```sh - 使用 ~/.cache/starship/init.nu + use ~/.cache/starship/init.nu ``` diff --git a/docs/zh-CN/advanced-config/README.md b/docs/zh-CN/advanced-config/README.md index 0ef535d6..e4afa3ff 100644 --- a/docs/zh-CN/advanced-config/README.md +++ b/docs/zh-CN/advanced-config/README.md @@ -58,9 +58,9 @@ load(io.popen('starship init cmd'):read("*a"))() 可以用自定义字符串替换预设的命令行提示。 这在不经常需要所有提示信息的情况下很有用。 若要启用该功能,请在 shell 中运行 `Enable-TransitientPrompt`命令 若要永久启用该功能,请将 上述语句放在您的 `~/.config/fish/config.fish` 中。 通过在shell中运行 `Disable-TransientPrompt`命令来禁用这项功能。 -请注意,对于Fish,命令行提示只在命令行非空 和语法正确的情况下才会显示。 +请注意,对于Fish,命令行提示只在命令行非空 且语法正确的情况下才会显示。 -- 默认情况下,输入的左侧是 粗体绿色的❯符号。 要自定义它,请定义一个新函数,名为 `Invoke-Starship-TransitentFunction`。 例如,要 在这里显示Starship的 `character` 模块,您需要如下操作: +- 默认情况下,输入的左侧是 粗体绿色的`❯`符号。 要自定义它,请定义一个新函数,名为 `Invoke-Starship-TransitentFunction`。 例如,要在这里显示 Starship 的 `character` 组件,您需要如下操作: ```fish function starship_transent_rmpt_func @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. 例如,要在这里显示 最后一个命令开始的时间,您需要如下操作: + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## 在 Cmd 中自定义提示符显示前和执行前的命令 Clink 提供了很灵活的 API,能在 Cmd shell 中运行预提示和执行前命令。 在 Starship 中使用这些 API 很容易。 对你的 `starship.lua` 按需做出如下修改: @@ -205,7 +225,9 @@ Invoke-Expression (&starship init powershell) 注意:右侧提示和输入区显示在同一行。 如果需要在输入区的上方显示右对齐的组件,请查阅 [`fill` 组件](/config/#fill)。 -`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### 示例 diff --git a/docs/zh-CN/config/README.md b/docs/zh-CN/config/README.md index b41d3714..ceb6bc6f 100644 --- a/docs/zh-CN/config/README.md +++ b/docs/zh-CN/config/README.md @@ -1,6 +1,6 @@ # 配置 -请为 Starship 创建配置文件 `~/.config/starship.toml`。 +为 Starship 创建配置文件 `~/.config/starship.toml`。 ```sh mkdir -p ~/.config && touch ~/.config/starship.toml @@ -16,8 +16,8 @@ Starship 的所有配置都在此 [TOML](https://github.com/toml-lang/toml) 文 add_newline = true # 将提示符中的 '❯' 替换为 '➜' -[character] # 此模块名称为 'character' -success_symbol = '[➜](bold green)' # 将 'success_symbol' 片段设置成颜色为 'bold green' 的 '➜' +[character] # 此组件名称为 'character' +success_symbol = '[➜](bold green)' # 将 'success_symbol' 字段设置成颜色为 'bold green' 的 '➜' # 禁用 'package' 组件,将其隐藏 [package] @@ -46,7 +46,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### 日志 -默认情况下,Starship 会将警告和错误日志记录到文件 `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`. 其中 session key 与您的终端实例相对应。 不过,这也可以使用 `STARSHIP_CACHE` 环境变量来修改: +默认情况下,Starship 会将警告和错误日志记录到文件 `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`. 其中 session key 与您的终端实例相对应。 不过,也可以使用 `STARSHIP_CACHE` 环境变量来修改: ```sh export STARSHIP_CACHE=~/.starship/cache @@ -210,7 +210,7 @@ detect_extensions = ['ts', '!video.ts', '!audio.ts'] ::: tip -If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`. +如果你有链接至网络文件系统的符号链接, 建议设置 `follow_symlinks` 为 `false` ::: @@ -340,7 +340,7 @@ $shell\ $character""" ``` -如果你只是想扩展默认的格式,你可以使用 `$all`; 你另外添加到格式中的modules不会重复出现。 例如: +如果你只是想扩展默认的格式,你可以使用 `$all`; 你另外添加到格式中的组件不会重复出现。 例如: ```toml # Move the directory to the second line @@ -388,7 +388,7 @@ When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile *: 此变量只能作为样式字符串的一部分使用 -### Examples +### 示例 #### Display everything @@ -442,12 +442,12 @@ The `azure` module shows the current Azure Subscription. This is based on showin | 字段 | 默认值 | 描述 | | ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | -| `符号` | `'󰠅 '` | The symbol used in the format. | +| `符号` | `'󰠅 '` | 格式中使用的符号 | | `style` | `'blue bold'` | The style used in the format. | -| `disabled` | `true` | Disables the `azure` module. | +| `disabled` | `true` | 禁用 `azure` 组件。 | | `subscription_aliases` | `{}` | Table of subscription name aliases to display in addition to Azure subscription name. | -### Examples +### 示例 #### Display Subscription Name @@ -543,7 +543,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 ``` @@ -560,10 +560,10 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | 选项 | 默认值 | 描述 | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | | `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | -| `version_format` | `'v${raw}'` | The version format. | +| `version_format` | `'v${raw}'` | 版本格式 | | `符号` | `'🐃 '` | The symbol used before displaying the version of Buf. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. | +| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | 哪些文件应触发此组件 | | `detect_folders` | `[]` | Which folders should trigger this modules. | | `style` | `'bold blue'` | 此组件的样式。 | | `disabled` | `false` | Disables the `elixir` module. | @@ -596,24 +596,24 @@ The `bun` module shows the currently installed version of the [bun](https://bun. ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'🍞 '` | A format string representing the symbol of Bun. | -| `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `['bun.lockb', 'bunfig.toml']` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `'bold red'` | 此组件的样式。 | -| `disabled` | `false` | Disables the `bun` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | -------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `symbol` | `'🍞 '` | 用于表示Bun的格式化字符串 | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['bun.lockb', 'bunfig.toml']` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `style` | `'bold red'` | 此组件的样式。 | +| `disabled` | `false` | 禁用`bun`组件 | ### 变量 -| 字段 | 示例 | 描述 | -| --------- | -------- | -------------------- | -| version | `v0.1.4` | The version of `bun` | -| 符号 | | `symbol`对应值 | -| style\* | | `style`对应值 | +| 字段 | 示例 | 描述 | +| --------- | -------- | ----------- | +| version | `v0.1.4` | `bun` 版本 | +| symbol | | `symbol`对应值 | +| style\* | | `style`对应值 | *: 此变量只能作为样式字符串的一部分使用 @@ -632,17 +632,17 @@ The `c` module shows some information about your C compiler. By default the modu ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'C '` | The symbol used before displaying the compiler details | -| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | -| `style` | `'bold 149'` | 此组件的样式。 | -| `disabled` | `false` | Disables the `c` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------ | +| `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'C '` | The symbol used before displaying the compiler details | +| `detect_extensions` | `['c', 'h']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `commands` | `[ [ 'cc', '--version' ], [ 'gcc', '--version' ], [ 'clang', '--version' ] ]` | How to detect what the compiler is | +| `style` | `'bold 149'` | 此组件的样式。 | +| `disabled` | `false` | Disables the `c` module. | ### 变量 @@ -708,7 +708,7 @@ By default it only changes color. If you also want to change its shape take a lo | -- | -- | -------------------------------------------------------------------------------------------------------- | | 符号 | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. | -### Examples +### 示例 #### With custom error shape @@ -748,16 +748,16 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | -------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'△ '` | 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'` | 此组件的样式。 | -| `disabled` | `false` | Disables the `cmake` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | -------------------------------------- | -------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'△ '` | 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'` | 此组件的样式。 | +| `disabled` | `false` | Disables the `cmake` module. | ### 变量 @@ -778,16 +778,16 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `符号` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `style` | `'bold blue'` | 此组件的样式。 | -| `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. | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | ------------------------------------------------------- | +| `符号` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `style` | `'bold blue'` | 此组件的样式。 | +| `detect_extensions` | `['cbl', 'cob', 'CBL', 'COB']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `disabled` | `false` | Disables the `cobol` module. | ### 变量 @@ -924,16 +924,16 @@ The `crystal` module shows the currently installed version of [Crystal](https:// ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `符号` | `'🔮 '` | The symbol used before displaying the version of 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. | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | --------------------------------------------------------- | +| `符号` | `'🔮 '` | The symbol used before displaying the version of crystal. | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `style` | `'bold red'` | 此组件的样式。 | +| `detect_extensions` | `['cr']` | Which extensions should trigger this module. | +| `detect_files` | `['shard.yml']` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `disabled` | `false` | Disables the `crystal` module. | ### 变量 @@ -962,16 +962,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'Λ '` | A format string representing the symbol of Daml | -| `style` | `'bold cyan'` | 此组件的样式。 | -| `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `['daml.yaml']` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `disabled` | `false` | Disables the `daml` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'Λ '` | A format string representing the symbol of Daml | +| `style` | `'bold cyan'` | 此组件的样式。 | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['daml.yaml']` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `disabled` | `false` | Disables the `daml` module. | ### 变量 @@ -1002,16 +1002,16 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'🎯 '` | 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'` | 此组件的样式。 | -| `disabled` | `false` | Disables the `dart` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------------------- | ----------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'🎯 '` | 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']` | 哪些文件应触发此组件 | +| `detect_folders` | `['.dart_tool']` | 那些文件夹应该触发此组件 | +| `style` | `'bold blue'` | 此组件的样式。 | +| `disabled` | `false` | Disables the `dart` module. | ### 变量 @@ -1040,16 +1040,16 @@ The `deno` module shows you your currently installed version of [Deno](https://d ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'🦕 '` | A format string representing the symbol of Deno | -| `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `['deno.json', 'deno.jsonc', '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'` | 此组件的样式。 | -| `disabled` | `false` | Disables the `deno` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | ----------------------------------------------------------------------- | ----------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'🦕 '` | A format string representing the symbol of Deno | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['deno.json', 'deno.jsonc', 'mod.ts', 'mod.js', 'deps.ts', 'deps.js']` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `style` | `'green bold'` | 此组件的样式。 | +| `disabled` | `false` | Disables the `deno` module. | ### 变量 @@ -1162,9 +1162,10 @@ The `direnv` module shows the status of the current rc file if one is present. T | `style` | `'bold orange'` | 此组件的样式。 | | `disabled` | `true` | Disables the `direnv` module. | | `detect_extensions` | `[]` | Which extensions should trigger this module. | -| `detect_files` | `['.envrc']` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | +| `detect_files` | `['.envrc']` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | @@ -1249,17 +1250,17 @@ The module will also show the Target Framework Moniker ( '` | 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'` | 此组件的样式。 | -| `disabled` | `false` | Disables the `purescript` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | ------------------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'<=> '` | The symbol used before displaying the version of PureScript. | +| `detect_extensions` | `['purs']` | Which extensions should trigger this module. | +| `detect_files` | `['spago.dhall']` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `style` | `'bold white'` | 此组件的样式。 | +| `disabled` | `false` | Disables the `purescript` module. | ### 变量 @@ -3372,7 +3373,7 @@ By default the module will be shown if any of the following conditions are met: | 选项 | 默认值 | 描述 | | -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | | `符号` | `'🐍 '` | 用于表示Python的格式化字符串。 | | `style` | `'yellow bold'` | 此组件的样式。 | | `pyenv_version_name` | `false` | 使用 pyenv 获取 Python 版本 | @@ -3452,16 +3453,16 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'📐'` | A format string representing the symbol of R. | -| `style` | `'blue bold'` | 此组件的样式。 | -| `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. | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | --------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'📐'` | A format string representing the symbol of R. | +| `style` | `'blue bold'` | 此组件的样式。 | +| `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. | ### 变量 @@ -3489,16 +3490,16 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'🦋 '` | The symbol used before displaying the version of Raku | -| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | -| `detect_files` | `['META6.json']` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `'bold 149'` | 此组件的样式。 | -| `disabled` | `false` | Disables the `raku` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------------------ | ----------------------------------------------------- | +| `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'🦋 '` | The symbol used before displaying the version of Raku | +| `detect_extensions` | `['p6', 'pm6', 'pod6', 'raku', 'rakumod']` | Which extensions should trigger this module. | +| `detect_files` | `['META6.json']` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `style` | `'bold 149'` | 此组件的样式。 | +| `disabled` | `false` | Disables the `raku` module. | ### 变量 @@ -3526,16 +3527,16 @@ By default the `red` module shows the currently installed version of [Red](https ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'🔺 '` | 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'` | 此组件的样式。 | -| `disabled` | `false` | Disables the `red` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'🔺 '` | A format string representing the symbol of Red. | +| `detect_extensions` | `['red']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `style` | `'red bold'` | 此组件的样式。 | +| `disabled` | `false` | Disables the `red` module. | ### 变量 @@ -3569,17 +3570,17 @@ Starship gets the current Ruby version by running `ruby -v`. ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'💎 '` | 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. | -| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | -| `style` | `'bold red'` | 此组件的样式。 | -| `disabled` | `false` | 禁用 `ruby` 组件。 | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | ------------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'💎 '` | A format string representing the symbol of Ruby. | +| `detect_extensions` | `['rb']` | Which extensions should trigger this module. | +| `detect_files` | `['Gemfile', '.ruby-version']` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `detect_variables` | `['RUBY_VERSION', 'RBENV_VERSION']` | Which environment variables should trigger this module. | +| `style` | `'bold red'` | 此组件的样式。 | +| `disabled` | `false` | 禁用 `ruby` 组件。 | ### 变量 @@ -3609,16 +3610,16 @@ By default the `rust` module shows the currently installed version of [Rust](htt ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'🦀 '` | 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'` | 此组件的样式。 | -| `disabled` | `false` | 禁用 `rust` 组件。 | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'🦀 '` | A format string representing the symbol of Rust | +| `detect_extensions` | `['rs']` | Which extensions should trigger this module. | +| `detect_files` | `['Cargo.toml']` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `style` | `'bold red'` | 此组件的样式。 | +| `disabled` | `false` | 禁用 `rust` 组件。 | ### 变量 @@ -3651,16 +3652,16 @@ The `scala` module shows the currently installed version of [Scala](https://www. ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [${symbol}(${version} )]($style)'` | 组件格式化模板。 | -| `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. | -| `符号` | `'🆂 '` | A format string representing the symbol of Scala. | -| `style` | `'red dimmed'` | 此组件的样式。 | -| `disabled` | `false` | Disables the `scala` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | ---------------------------------------- | ------------------------------------------------- | +| `format` | `'via [${symbol}(${version} )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. | +| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | 哪些文件应触发此组件 | +| `detect_folders` | `['.metals']` | Which folders should trigger this modules. | +| `符号` | `'🆂 '` | A format string representing the symbol of Scala. | +| `style` | `'red dimmed'` | 此组件的样式。 | +| `disabled` | `false` | Disables the `scala` module. | ### 变量 @@ -3720,7 +3721,7 @@ The `shell` module shows an indicator for currently used shell. *: 此变量只能作为样式字符串的一部分使用 -### Examples +### 示例 ```toml # ~/.config/starship.toml @@ -3824,17 +3825,17 @@ The `solidity` module shows the currently installed version of [Solidity](https: ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'S '` | A format string representing the symbol of Solidity | -| `compiler | ['solc'] | The default compiler for Solidity. | -| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | -| `detect_files` | `[]` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `style` | `'bold blue'` | 此组件的样式。 | -| `disabled` | `false` | Disables this module. | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | --------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${major}.${minor}.${patch}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'S '` | A format string representing the symbol of Solidity | +| `compiler | ['solc'] | The default compiler for Solidity. | +| `detect_extensions` | `['sol']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `style` | `'bold blue'` | 此组件的样式。 | +| `disabled` | `false` | Disables this module. | ### 变量 @@ -4006,16 +4007,16 @@ By default the `swift` module shows the currently installed version of [Swift](h ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'🐦 '` | 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'` | 此组件的样式。 | -| `disabled` | `false` | Disables the `swift` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | ------------------------------------------------ | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'🐦 '` | A format string representing the symbol of Swift | +| `detect_extensions` | `['swift']` | Which extensions should trigger this module. | +| `detect_files` | `['Package.swift']` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `style` | `'bold 202'` | 此组件的样式。 | +| `disabled` | `false` | Disables the `swift` module. | ### 变量 @@ -4053,16 +4054,16 @@ 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` | -| `符号` | `'💠'` | A format string shown before the terraform workspace. | -| `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'` | 此组件的样式。 | -| `disabled` | `false` | 禁用 `terraform` 组件。 | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `'via [$symbol$workspace]($style) '` | The format string for the module. | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'💠'` | A format string shown before the terraform workspace. | +| `detect_extensions` | `['tf', 'tfplan', 'tfstate']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | 哪些文件应触发此组件 | +| `detect_folders` | `['.terraform']` | 那些文件夹应该触发此组件 | +| `style` | `'bold 105'` | 此组件的样式。 | +| `disabled` | `false` | 禁用 `terraform` 组件。 | ### 变量 @@ -4152,16 +4153,16 @@ By default, the module will be shown if any of the following conditions are met: ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'t '` | A format string representing the symbol of Daml | -| `style` | `'bold #0093A7'` | 此组件的样式。 | -| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | -| `detect_files` | `['template.typ']` | Which filenames should trigger this module. | -| `detect_folders` | `[]` | Which folders should trigger this module. | -| `disabled` | `false` | Disables the `daml` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | ----------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'t '` | A format string representing the symbol of Daml | +| `style` | `'bold #0093A7'` | 此组件的样式。 | +| `detect_extensions` | `['.typ']` | Which extensions should trigger this module. | +| `detect_files` | `['template.typ']` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `disabled` | `false` | Disables the `daml` module. | ### 变量 @@ -4227,16 +4228,16 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'⍱ '` | 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'` | 此组件的样式。 | -| `disabled` | `false` | Disables the `vagrant` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | --------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'⍱ '` | A format string representing the symbol of Vagrant. | +| `detect_extensions` | `[]` | Which extensions should trigger this module. | +| `detect_files` | `['Vagrantfile']` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `style` | `'cyan bold'` | 此组件的样式。 | +| `disabled` | `false` | Disables the `vagrant` module. | ### 变量 @@ -4266,16 +4267,16 @@ The `vlang` module shows you your currently installed version of [V](https://vla ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'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'` | 此组件的样式。 | -| `disabled` | `false` | Disables the `vlang` module. | +| 选项 | 默认值 | 描述 | +| ------------------- | -------------------------------------------- | -------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'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' ]` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | +| `style` | `'blue bold'` | 此组件的样式。 | +| `disabled` | `false` | Disables the `vlang` module. | ### 变量 @@ -4333,16 +4334,16 @@ By default the `zig` module shows the currently installed version of [Zig](https ### 配置项 -| 选项 | 默认值 | 描述 | -| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | -| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | -| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | -| `符号` | `'↯ '` | The symbol used before displaying the version of Zig. | -| `style` | `'bold yellow'` | 此组件的样式。 | -| `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. | +| 选项 | 默认值 | 描述 | +| ------------------- | ------------------------------------ | ----------------------------------------------------- | +| `format` | `'via [$symbol($version )]($style)'` | 组件格式化模板。 | +| `version_format` | `'v${raw}'` | 版本格式 可用的有 `raw`, `major`, `minor` 和 `patch` | +| `符号` | `'↯ '` | The symbol used before displaying the version of Zig. | +| `style` | `'bold yellow'` | 此组件的样式。 | +| `disabled` | `false` | Disables the `zig` module. | +| `detect_extensions` | `['zig']` | Which extensions should trigger this module. | +| `detect_files` | `[]` | 哪些文件应触发此组件 | +| `detect_folders` | `[]` | 那些文件夹应该触发此组件 | ### 变量 diff --git a/docs/zh-CN/faq/README.md b/docs/zh-CN/faq/README.md index 9d21b222..57f87a70 100644 --- a/docs/zh-CN/faq/README.md +++ b/docs/zh-CN/faq/README.md @@ -121,10 +121,10 @@ Starship 的卸载过程与安装过程一样简单。 sh -c 'rm "$(command -v 'starship')"' ``` -## How do I install Starship without `sudo`? +## 我如何在没有 `sudo` 的情况下安装 Starship? -The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. +Shell 安装脚本(`https://starship.rs/install`) 只尝试使用 `sudo`当安装目录不可被当前用户写入 默认安装目录是环境变量 `$BIN_DIR` 的值或者 `/usr/loca/bin` 如果 if `$BIN_DIR` 未设置 如果你使用一个用户可写的安装目录替代, 你应该可以不使用 `sudo` 安装 Starship 例如, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` 使用 `-b` 选项设置安装目录到 `~/.local/bin` -For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. +对于非交互 Starship 安装, 请添加 `-y` 以跳过确认 查看安装脚本源码以获取所有支持的选项 -When using a package manager, see the documentation for your package manager about installing with or without `sudo`. +当使用包管理器时, 查询包管理器关于有无`sudo`安装的文档 diff --git a/docs/zh-CN/guide/README.md b/docs/zh-CN/guide/README.md index b2b95546..3ee33d96 100644 --- a/docs/zh-CN/guide/README.md +++ b/docs/zh-CN/guide/README.md @@ -161,10 +161,10 @@ align="right" /> -**轻量、迅速、可无限定制的高颜值终端!** +**轻量、迅速、客制化的高颜值终端!** - **快:** 很快 —— 真的真的非常快! 🚀 -- **定制化:** 可定制各种各样的提示符。 +- **客制化:** 可定制各种各样的提示符。 - **通用:** 适用于任何 Shell、任何操作系统。 - **智能:** 一目了然地显示相关信息。 - **功能丰富:** 支持所有你喜欢的工具。 @@ -227,7 +227,7 @@ curl -sS https://starship.rs/install.sh | sh | _任意发行版_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` | | _任意发行版_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` | | Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` | -| Arch Linux | [Arch Linux 额外](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` | +| Arch Linux | [Arch Linux extra](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` | | CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship`
`dnf install starship` | | Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` | | Manjaro | | `pacman -S starship` | @@ -348,7 +348,7 @@ starship init nu | save -f ~/.cache/starship/init.nu 然后在您的 Nushell 配置文件的最后(使用 `$nu.config-path` 来获取它的路径),添加以下内容: ```sh -使用 ~/.cache/starship/init.nu +use ~/.cache/starship/init.nu ``` 注意:仅支持 Nushell v0.78+ @@ -411,7 +411,7 @@ eval "$(starship init zsh)" ## 🤝 贡献 -我们欢迎 **任何水平** 的参与者! 如果想练手,可以试着解决某个标记为 [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue) 的议题。 +我们欢迎 **任何水平** 的参与者! 如果想练手,可以试着解决某个标记为 [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue) 的 Issue。 如果你精通非英语语言,请协助我们翻译并更新文档,非常感谢! 你可以在 [Starship Crowdin](https://translate.starship.rs/) 上参与翻译。 @@ -419,7 +419,7 @@ eval "$(starship init zsh)" ## 💭 该项目受以下项目启发 -请看看这些之前的项目,他们启发了 Starship 项目。 🙏 +请查看这些曾经启发了 Starship 的项目。 🙏 - **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – 为宇航员准备的 ZSH 提示符。 diff --git a/docs/zh-CN/presets/gruvbox-rainbow.md b/docs/zh-CN/presets/gruvbox-rainbow.md index 4701cd1a..8402e96d 100644 --- a/docs/zh-CN/presets/gruvbox-rainbow.md +++ b/docs/zh-CN/presets/gruvbox-rainbow.md @@ -8,7 +8,7 @@ This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), an ### 前置要求 -- 安装一种 [Nerd fonts](https://www.nerdfonts.com/) 并在您的终端启用。 +- 安装一种 [Nerd Font](https://www.nerdfonts.com/) 并在您的终端启用。 ### 配置 diff --git a/docs/zh-CN/presets/nerd-font.md b/docs/zh-CN/presets/nerd-font.md index eb6b1440..312f3c64 100644 --- a/docs/zh-CN/presets/nerd-font.md +++ b/docs/zh-CN/presets/nerd-font.md @@ -2,13 +2,13 @@ # Nerd 字体符号预设 -此预设使用 Nerd 字体的符号显示所有组件。 +此预设使用 Nerd Font 的符号显示所有组件。 -![Nerd 字体符号预设截图](/presets/img/nerd-font-symbols.png) +![Nerd Font 符号预设截图](/presets/img/nerd-font-symbols.png) ### 前置要求 -- 安装一种 [Nerd 字体](https://www.nerdfonts.com/) 并在您的终端启用(示例使用的是 Fira Code 字体)。 +- 安装一种 [Nerd Font](https://www.nerdfonts.com/) 并在您的终端启用 (示例使用的是 Fira Code 字体)。 ### 配置 diff --git a/docs/zh-CN/presets/tokyo-night.md b/docs/zh-CN/presets/tokyo-night.md index 57f8b38e..526f2781 100644 --- a/docs/zh-CN/presets/tokyo-night.md +++ b/docs/zh-CN/presets/tokyo-night.md @@ -8,7 +8,7 @@ ### 前置要求 -- 安装一种 [Nerd fonts](https://www.nerdfonts.com/) 并在您的终端启用。 +- 安装一种 [Nerd Font](https://www.nerdfonts.com/) 并在您的终端启用。 ### 配置 diff --git a/docs/zh-TW/advanced-config/README.md b/docs/zh-TW/advanced-config/README.md index 3b5c300c..89a696d7 100644 --- a/docs/zh-TW/advanced-config/README.md +++ b/docs/zh-TW/advanced-config/README.md @@ -80,6 +80,26 @@ starship init fish | source enable_transience ``` +## TransientPrompt and TransientRightPrompt in Bash + +The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=`: + +The \ here is a colon-separated list of `always`, `same-dir` and `trim`. When `prompt_ps1_final` is empty and this option has a non-empty value, the prompt specified by `PS1` is erased on leaving the current command line. If the value contains a field `trim`, only the last line of multiline `PS1` is preserved and the other lines are erased. Otherwise, the command line will be redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the value and the current working directory is different from the final directory of the previous command line, this option `prompt_ps1_transient` is ignored. + +Make the following changes to your `~/.bashrc` to customize what gets displayed on the left and on the right: + +- To customize what the left side of input gets replaced with, configure the `prompt_ps1_final` Ble.sh option. For example, to display Starship's `character` module here, you would do + +```bash +bleopt prompt_ps1_final="$(starship module character)" +``` + +- To customize what the right side of input gets replaced with, configure the `prompt_rps1_final` Ble.sh option. For example, to display the time at which the last command was started here, you would do + +```bash +bleopt prompt_rps1_final="$(starship module time)" +``` + ## Custom pre-prompt and pre-execution Commands in Cmd Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements: @@ -205,7 +225,9 @@ Some shells support a right prompt which renders on the same line as the input. 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` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell. +`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash. + +Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash. ### 範例 diff --git a/docs/zh-TW/config/README.md b/docs/zh-TW/config/README.md index 7f0845e4..508690dd 100644 --- a/docs/zh-TW/config/README.md +++ b/docs/zh-TW/config/README.md @@ -46,7 +46,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star ### Logging -By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to an instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: +在預設值下 starship 會記錄警告以及錯誤至`~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`,其中 session key 對應至您的終端機實例 不過,可以使用 `STARSHIP_CACHE` 環境變數來變更此設定: ```sh export STARSHIP_CACHE=~/.starship/cache @@ -85,7 +85,7 @@ The following Starship syntax symbols have special usage in a format string and | `'''` | multi-line literal string | less escaping | | `"""` | multi-line string | more escaping, newlines in declarations can be ignored | -For example: +範例: ```toml # literal string @@ -98,7 +98,7 @@ format = "☺\\☻ " format = '\[\$\] ' ``` -When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent: +使用換行符號時,可以使用多行宣告 舉例來說,如果你想在一個新行印出 `$` 符號,則下列的 `format` 值具有相同效果 ```toml # with literal string @@ -115,7 +115,7 @@ format = """ format = "\n\\$" ``` -In multiline basic strings, newlines can be used for formatting without being present in the value by escaping them. +在多行基本字串中,換行符號可用於格式化,而無需透過跳脫字元出現在值中。 ```toml format = """ @@ -128,7 +128,7 @@ line2 """ ``` -### Format Strings +### 格式化字串 Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. @@ -136,7 +136,7 @@ Format strings are the format that a module prints all its variables with. Most A variable contains a `$` symbol followed by the name of the variable. The name of a variable can only contain 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`. @@ -150,7 +150,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. @@ -173,7 +173,7 @@ Starship 內大多數的模組允許你設定他們的顯示風格。 這要透 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. @@ -197,7 +197,7 @@ detect_extensions = ['ts', '!video.ts', '!audio.ts'] ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ----------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `format` | [連結](#default-prompt-format) | Configure the format of the prompt. | | `right_format` | `''` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) | @@ -242,9 +242,9 @@ blue = '21' mustard = '#af8700' ``` -### Default Prompt Format +### 預設提示字元格式 -The default `format` is used to define the format of the prompt, if empty or no `format` is provided. 預設如下: +如果為空值或未提供 `format`,則預設`format`用於定義提示字元的格式。 預設如下: ```toml format = '$all' @@ -340,7 +340,7 @@ $shell\ $character""" ``` -If you just want to extend the default format, you can use `$all`; modules you explicitly add to the format will not be duplicated. Eg. +如果你只是想要擴充預設的格式,可以使用 `$all`,您明確地新增到格式中的模組將不會重複。 Eg. ```toml # Move the directory to the second line @@ -365,7 +365,7 @@ When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. | | `symbol` | `'☁️ '` | 顯示在目前 AWS 配置之前的符號。 | @@ -376,7 +376,7 @@ When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile | `disabled` | `false` | 停用 `AWS` 模組。 | | `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ---------------- | ------------------------------------------- | @@ -388,9 +388,9 @@ When using [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) the profile *: This variable can only be used as a part of a style string -### Examples +### 範例 -#### Display everything +#### 顯示所有 ```toml # ~/.config/starship.toml @@ -406,7 +406,7 @@ us-east-1 = 'va' CompanyGroupFrobozzOnCallAccess = 'Frobozz' ``` -#### Display region +#### 顯示 region ```toml # ~/.config/starship.toml @@ -420,7 +420,7 @@ ap-southeast-2 = 'au' us-east-1 = 'va' ``` -#### Display profile +#### 顯示 profile ```toml # ~/.config/starship.toml @@ -447,9 +447,9 @@ The `azure` module shows the current Azure Subscription. This is based on showin | `disabled` | `true` | Disables the `azure` module. | | `subscription_aliases` | `{}` | Table of subscription name aliases to display in addition to Azure subscription name. | -### Examples +### 範例 -#### Display Subscription Name +#### 顯示訂閱名稱 ```toml # ~/.config/starship.toml @@ -461,7 +461,7 @@ symbol = '󰠅 ' style = 'blue bold' ``` -#### Display Username +#### 顯示使用者名稱 ```toml # ~/.config/starship.toml @@ -473,7 +473,7 @@ symbol = "󰠅 " style = "blue bold" ``` -#### Display Subscription Name Alias +#### 顯示訂閱名稱別名 ```toml # ~/.config/starship.toml @@ -488,7 +488,7 @@ very-long-subscription-name = 'vlsn' ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | -------------------- | --------------------------------- | -------------------------- | | `full_symbol` | `'󰁹 '` | 當電池充飽時顯示的符號。 | | `charging_symbol` | `'󰂄 '` | 當電池正在充電時顯示的符號。 | @@ -526,7 +526,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r `display` 選項是一個下列表格的陣列。 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- | | `threshold` | `10` | 顯示選項的上界。 | | `style` | `'red bold'` | 顯示選項使用時的風格。 | @@ -543,7 +543,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 ``` @@ -557,7 +557,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | ----------------------------------------------- | ----------------------------------------------------- | | `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. | | `version_format` | `'v${raw}'` | The version format. | @@ -568,7 +568,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil | `style` | `'bold blue'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `elixir` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -596,7 +596,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. ### 選項 -| 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` | @@ -607,7 +607,7 @@ The `bun` module shows the currently installed version of the [bun](https://bun. | `style` | `'bold red'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `bun` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -632,7 +632,7 @@ The `c` module shows some information about your C compiler. By default the modu ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version(-$name) )]($style)'` | The format string for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -644,7 +644,7 @@ The `c` module shows some information about your C compiler. By default the modu | `style` | `'bold 149'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `c` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ------- | ------ | ------------------------------------ | @@ -691,7 +691,7 @@ By default it only changes color. If you also want to change its shape take a lo ### 選項 -| 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. | @@ -702,13 +702,13 @@ By default it only changes color. If you also want to change its shape take a lo | `vimcmd_visual_symbol` | `'[❮](bold yellow)'` | The format string used before the text input if the shell is in vim visual mode. | | `disabled` | `false` | 停用 `character` 模組。 | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ------ | -- | -------------------------------------------------------------------------------------------------------- | | symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. | -### Examples +### 範例 #### With custom error shape @@ -748,7 +748,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak ### 選項 -| 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` | @@ -759,7 +759,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak | `style` | `'bold blue'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `cmake` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | --------- | ------------------------------------ | @@ -778,7 +778,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `symbol` | `'⚙️ '` | The symbol used before displaying the version of COBOL. | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | @@ -789,7 +789,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `cobol` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ---------- | ------------------------------------ | @@ -813,7 +813,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | | `show_milliseconds` | `false` | 顯示時間除了以秒為單位外,亦以毫秒顯示 | @@ -824,7 +824,7 @@ The `cobol` module shows the currently installed version of COBOL. By default, t | `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | | `notification_timeout` | | Duration to show notification for (in milliseconds). If unset, notification timeout will be determined by daemon. Not all notification daemons honor this option. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | --------------------------------------- | @@ -855,7 +855,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | 如果環境變數由所`conda create -p [path]`產生時,環境變數的資料夾需要截斷的數目。 `0` 表示不截斷 也請參考 [`directory`](#directory)模組 | | `symbol` | `'🅒 '` | 環境名稱前使用的符號。 | @@ -864,7 +864,7 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c | `ignore_base` | `true` | Ignores `base` environment when activated. | | `disabled` | `false` | 停用 `conda` 模組。 | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ----------- | ------------ | ------------------------------------ | @@ -889,14 +889,14 @@ The `container` module displays a symbol and container name, if inside a contain ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ---------- | ---------------------------------- | ----------------------------------------- | | `symbol` | `'⬢'` | The symbol shown, when inside a container | | `style` | `'bold red dimmed'` | 這個模組的風格。 | | `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `container` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ------------------- | ------------------------------------ | @@ -924,7 +924,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `symbol` | `'🔮 '` | The symbol used before displaying the version of crystal. | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | @@ -935,7 +935,7 @@ The `crystal` module shows the currently installed version of [Crystal](https:// | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `crystal` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | --------- | ------------------------------------ | @@ -962,7 +962,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d ### 選項 -| 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` | @@ -973,7 +973,7 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d | `detect_folders` | `[]` | Which folders should trigger this module. | | `disabled` | `false` | Disables the `daml` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -1002,7 +1002,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d ### 選項 -| 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` | @@ -1013,7 +1013,7 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d | `style` | `'bold blue'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `dart` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -1040,7 +1040,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d ### 選項 -| 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` | @@ -1051,7 +1051,7 @@ The `deno` module shows you your currently installed version of [Deno](https://d | `style` | `'green bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `deno` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -1078,7 +1078,7 @@ When using the `fish_style_pwd_dir_length` option, instead of hiding the path th ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | `truncation_length` | `3` | 到達現在資料夾的路徑中,要被裁減掉的資料夾數目。 | | `truncate_to_repo` | `true` | 是否要裁減到你現在所在的 git 儲存庫的根目錄。 | @@ -1115,7 +1115,7 @@ When using the `fish_style_pwd_dir_length` option, instead of hiding the path th
-### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | --------------------- | ----------------------------------- | @@ -1155,7 +1155,7 @@ The `direnv` module shows the status of the current rc file if one is present. T ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | -------------------------------------- | ----------------------------------------------------- | | `format` | `'[$symbol$loaded/$allowed]($style) '` | The format for the module. | | `symbol` | `'direnv '` | The symbol used before displaying the direnv context. | @@ -1165,11 +1165,12 @@ The `direnv` module shows the status of the current rc file if one is present. T | `detect_files` | `['.envrc']` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | | `allowed_msg` | `'allowed'` | The message displayed when an rc file is allowed. | +| `not_allowed_msg` | `'not allowed'` | The message displayed when an rc file is not_allowed. | | `denied_msg` | `'denied'` | The message displayed when an rc file is denied. | | `loaded_msg` | `'loaded'` | The message displayed when an rc file is loaded. | | `unloaded_msg` | `'not loaded'` | The message displayed when an rc file is not loaded. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ------------------- | --------------------------------------- | @@ -1196,7 +1197,7 @@ The `docker_context` module shows the currently active [Docker context](https:// ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | | `format` | `'via [$symbol$context]($style) '` | The format for the module. | | `symbol` | `'🐳 '` | The symbol used before displaying the Docker context. | @@ -1207,7 +1208,7 @@ The `docker_context` module shows the currently active [Docker context](https:// | `style` | `'blue bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `docker_context` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------------- | ------------------------------------ | @@ -1249,7 +1250,7 @@ The module will also show the Target Framework Moniker ("` | The description of the module that is shown when running `starship explain`. | | `disabled` | `false` | 停用 `env_var` 模組。 | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ------------------------------------------- | ------------------------------------------ | @@ -1444,7 +1445,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https: ### 選項 -| 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` | @@ -1455,7 +1456,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https: | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `erlang` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | --------- | ------------------------------------ | @@ -1482,7 +1483,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe ### 選項 -| 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` | @@ -1493,7 +1494,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe | `detect_folders` | `[]` | Which folders should trigger this modules. | | `disabled` | `false` | Disables the `fennel` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -1518,7 +1519,7 @@ The `fill` module fills any extra space on the line with a symbol. If multiple ` ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ---------- | -------------- | --------------------------------- | | `symbol` | `'.'` | The symbol used to fill the line. | | `style` | `'bold black'` | 這個模組的風格。 | @@ -1547,7 +1548,7 @@ The `fossil_branch` module shows the name of the active branch of the check-out ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | -------------------------------- | ---------------------------------------------------------------------------------- | | `format` | `'on [$symbol$branch]($style) '` | The format for the module. Use `'$branch'` to refer to the current branch name. | | `symbol` | `' '` | The symbol used before the branch name of the check-out in your current directory. | @@ -1556,7 +1557,7 @@ The `fossil_branch` module shows the name of the active branch of the check-out | `truncation_symbol` | `'…'` | 用來指示分支名稱被縮減的符號。 You can use `''` for no symbol. | | `disabled` | `true` | Disables the `fossil_branch` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ------- | ------------------------------------ | @@ -1583,7 +1584,7 @@ The `fossil_metrics` module will show the number of added and deleted lines in t ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | -------------------- | ------------------------------------------------------------ | ------------------------------------- | | `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. | | `added_style` | `'bold green'` | The style for the added count. | @@ -1591,7 +1592,7 @@ The `fossil_metrics` module will show the number of added and deleted lines in t | `only_nonzero_diffs` | `true` | Render status only for changed items. | | `disabled` | `true` | Disables the `fossil_metrics` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ----------------- | --- | ------------------------------------------- | @@ -1620,7 +1621,7 @@ When the module is enabled it will always be active, unless `detect_env_vars` ha ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ----------------- | ---------------------------------------------------------- | ---------------------------------------------------------------- | | `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. | | `symbol` | `'☁️ '` | The symbol used before displaying the current GCP profile. | @@ -1630,7 +1631,7 @@ When the module is enabled it will always be active, unless `detect_env_vars` ha | `style` | `'bold blue'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `gcloud` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ------------- | ------------------------------------------------------------------ | @@ -1644,7 +1645,7 @@ When the module is enabled it will always be active, unless `detect_env_vars` ha *: This variable can only be used as a part of a style string -### Examples +### 範例 #### Display account and project @@ -1694,7 +1695,7 @@ very-long-project-name = 'vlpn' ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | -------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------ | | `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. | | `format` | `'on [$symbol$branch(:$remote_branch)]($style) '` | The format for the module. Use `'$branch'` to refer to the current branch name. | @@ -1706,7 +1707,7 @@ very-long-project-name = 'vlpn' | `ignore_branches` | `[]` | A list of names to avoid displaying. Useful for 'master' or 'main'. | | `disabled` | `false` | 停用 `git_branch` 模組。 | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ------------- | -------- | ------------------------------------------------------------------------------------------------------ | @@ -1730,13 +1731,13 @@ truncation_symbol = '' ignore_branches = ['master', 'main'] ``` -## Git Commit +## Git 提交 The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory. ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ | | `commit_hash_length` | `7` | The length of the displayed git commit hash. | | `format` | `'[\($hash$tag\)]($style) '` | The format for the module. | @@ -1747,7 +1748,7 @@ The `git_commit` module shows the current commit hash and also the tag (if any) | `tag_symbol` | `' 🏷 '` | Tag symbol prefixing the info shown | | `disabled` | `false` | Disables the `git_commit` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | --------- | -------------------------------------------- | @@ -1773,7 +1774,7 @@ tag_symbol = '🔖 ' ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | | `rebase` | `'REBASING'` | A format string displayed when a `rebase` is in progress. | | `merge` | `'MERGING'` | A format string displayed when a `merge` is in progress. | @@ -1786,7 +1787,7 @@ tag_symbol = '🔖 ' | `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. | | `disabled` | `false` | 停用 `git_state` 模組。 | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ---------------- | ---------- | ----------------------------------- | @@ -1819,7 +1820,7 @@ The `git_metrics` module will show the number of added and deleted lines in the ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | -------------------- | ------------------------------------------------------------ | ------------------------------------- | | `added_style` | `'bold green'` | The style for the added count. | | `deleted_style` | `'bold red'` | The style for the deleted count. | @@ -1828,7 +1829,7 @@ The `git_metrics` module will show the number of added and deleted lines in the | `disabled` | `true` | Disables the `git_metrics` module. | | `ignore_submodules` | `false` | Ignore changes to submodules | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ----------------- | --- | ------------------------------------------- | @@ -1849,7 +1850,7 @@ added_style = 'bold blue' format = '[+$added]($added_style)/[-$deleted]($deleted_style) ' ``` -## Git Status +## Git 狀態 `git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。 @@ -1861,7 +1862,7 @@ The Git Status module is very slow in Windows directories (for example under `/m ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` | | `conflicted` | `'='` | 這個分支有合併衝突。 | @@ -1881,7 +1882,7 @@ The Git Status module is very slow in Windows directories (for example under `/m | `disabled` | `false` | 停用 `git_status` 模組。 | | `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. | -### Variables +### 變數 The following variables can be used in `format`: @@ -1969,7 +1970,7 @@ The `golang` module shows the currently installed version of [Go](https://golang ### 選項 -| 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` | @@ -1981,7 +1982,7 @@ The `golang` module shows the currently installed version of [Go](https://golang | `not_capable_style` | `'bold red'` | The style for the module when the go directive in the go.mod file does not match the installed Go version. | | `disabled` | `false` | 停用 `golang` 模組。 | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- | @@ -2016,14 +2017,14 @@ The `guix_shell` module shows the [guix-shell](https://guix.gnu.org/manual/devel ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ---------- | -------------------------- | ------------------------------------------------------ | | `format` | `'via [$symbol]($style) '` | The format for the module. | | `symbol` | `'🐃 '` | A format string representing the symbol of guix-shell. | | `style` | `'yellow bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `guix_shell` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -- | ------------------------------------ | @@ -2055,7 +2056,7 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c ### 選項 -| 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` | @@ -2067,7 +2068,7 @@ The `gradle` module is only able to read your Gradle Wrapper version from your c | `disabled` | `false` | Disables the `gradle` module. | | `recursive` | `false` | Enables recursive finding for the `gradle` directory. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ------- | -------- | ------------------------------------ | @@ -2088,7 +2089,7 @@ By default the module will be shown if any of the following conditions are met: ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | ------------------------------------ | -------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `symbol` | `'λ '` | A format string representing the symbol of Haskell | @@ -2098,7 +2099,7 @@ By default the module will be shown if any of the following conditions are met: | `style` | `'bold purple'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `haskell` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | -------------- | ----------- | --------------------------------------------------------------------------------------- | @@ -2120,7 +2121,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o ### 選項 -| 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` | @@ -2131,7 +2132,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o | `style` | `'bold fg:202'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `haxe` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -2159,7 +2160,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s ### 選項 -| 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` | @@ -2170,7 +2171,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s | `style` | `'bold white'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `helm` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -2195,7 +2196,7 @@ format = 'via [⎈ $version](bold white) ' ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ----------------- | -------------------------------------- | -------------------------------------------------------------------------------------------- | | `ssh_only` | `true` | 只在連接到一個 SSH session 時顯示主機名稱。 | | `ssh_symbol` | `'🌐 '` | A format string representing the symbol when connected to SSH session. | @@ -2205,7 +2206,7 @@ format = 'via [⎈ $version](bold white) ' | `style` | `'bold dimmed green'` | 這個模組的風格。 | | `disabled` | `false` | 停用 `hostname` 模組。 | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ---------- | ---------- | ----------------------------------------------------- | @@ -2215,7 +2216,7 @@ format = 'via [⎈ $version](bold white) ' *: This variable can only be used as a part of a style string -### Examples +### 範例 #### Always show the hostname @@ -2249,7 +2250,7 @@ The `java` module shows the currently installed version of [Java](https://www.or ### 選項 -| 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 +2261,7 @@ The `java` module shows the currently installed version of [Java](https://www.or | `style` | `'red dimmed'` | 這個模組的風格。 | | `disabled` | `false` | 停用 `java` 模組。 | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ----- | ------------------------------------ | @@ -2303,7 +2304,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------ | ----------------------------- | ------------------------------------------------------------------------ | | `threshold`* | `1` | 在超過指定值時顯示工作數量。 | | `symbol_threshold` | `1` | Show `symbol` if the job count is at least `symbol_threshold`. | @@ -2315,7 +2316,7 @@ The `threshold` option is deprecated, but if you want to use it, the module will *: This option is deprecated, please use the `number_threshold` and `symbol_threshold` options instead. -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | --- | ------------------------------------ | @@ -2346,7 +2347,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli ### 選項 -| 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` | @@ -2357,7 +2358,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli | `style` | `'bold purple'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `julia` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -2384,7 +2385,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko ### 選項 -| 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` | @@ -2396,7 +2397,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko | `kotlin_binary` | `'kotlin'` | Configures the kotlin binary that Starship executes when getting the version. | | `disabled` | `false` | Disables the `kotlin` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | --------- | ------------------------------------ | @@ -2443,7 +2444,7 @@ The `context_aliases` and `user_aliases` options are deprecated. Use `contexts` ::: -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- | | `symbol` | `'☸ '` | A format string representing the symbol displayed before the Cluster. | | `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. | @@ -2471,7 +2472,7 @@ To customize the style of the module for specific environments, use the followin Note that all regular expression are anchored with `^$` and so must match the whole string. The `*_pattern` regular expressions may contain capture groups, which can be referenced in the corresponding alias via `$name` and `$N` (see example below and the [rust Regex::replace() documentation](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)). -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------------------- | ---------------------------------------- | @@ -2545,7 +2546,7 @@ context_alias = "gke-$cluster" ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ---------- | ------- | ----------------------------- | | `disabled` | `false` | 停用 `line_break` 模組,讓提示字元變成一行。 | @@ -2564,14 +2565,14 @@ The `localip` module shows the IPv4 address of the primary network interface. ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ---------- | ------------------------- | ------------------------------------------------------ | | `ssh_only` | `true` | Only show IP address when connected to an SSH session. | | `format` | `'[$localipv4]($style) '` | The format for the module. | | `style` | `'bold yellow'` | 這個模組的風格。 | | `disabled` | `true` | Disables the `localip` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ------------ | ----------------------------------- | @@ -2601,7 +2602,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o ### 選項 -| 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` | @@ -2613,7 +2614,7 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o | `lua_binary` | `'lua'` | Configures the lua binary that Starship executes when getting the version. | | `disabled` | `false` | Disables the `lua` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -2646,7 +2647,7 @@ format = 'via [🌕 $version](bold blue) ' ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ----------- | ----------------------------------------------- | -------------------------- | | `threshold` | `75` | 將記憶體使用量隱藏,除非使用量超過指定值。 | | `format` | `'via $symbol [${ram}( \| ${swap})]($style) '` | The format for the module. | @@ -2654,7 +2655,7 @@ format = 'via [🌕 $version](bold blue) ' | `style` | `'bold dimmed white'` | 這個模組的風格。 | | `disabled` | `true` | 停用 `memory_usage` 模組。 | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ---------------- | ------------- | ------------------------------------------------------------------ | @@ -2687,7 +2688,7 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- | | `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. | | `truncation_symbol` | `'…'` | The symbol used to indicate a project name was truncated. You can use `''` for no symbol. | @@ -2696,7 +2697,7 @@ By default the Meson project name is displayed, if `$MESON_DEVENV` is set. | `style` | `'blue bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `meson` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ---------- | ------------------------------------ | @@ -2724,7 +2725,7 @@ The `hg_branch` module shows the active branch and topic of the repo in your cur ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------- | | `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. | | `style` | `'bold purple'` | 這個模組的風格。 | @@ -2733,7 +2734,7 @@ The `hg_branch` module shows the active branch and topic of the repo in your cur | `truncation_symbol` | `'…'` | 用來指示分支名稱被縮減的符號。 | | `disabled` | `true` | Disables the `hg_branch` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | --------- | ------------------------------------ | @@ -2766,7 +2767,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang ### 選項 -| 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` | @@ -2777,7 +2778,7 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang | `style` | `'bold yellow'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `nim` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -2803,7 +2804,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------- | ---------------------------------------------- | --------------------------------------------------------------------- | | `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. | | `symbol` | `'❄️ '` | A format string representing the symbol of nix-shell. | @@ -2814,7 +2815,7 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/ | `disabled` | `false` | 停用 `nix_shell` 模組。 | | `heuristic` | `false` | Attempts to detect new `nix shell`-style shells with a heuristic. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ------- | ------------------------------------ | @@ -2851,7 +2852,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n ### 選項 -| 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` | @@ -2863,7 +2864,7 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n | `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 +### 變數 | 變數 | 範例 | 說明 | | --------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -2896,7 +2897,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam ### 選項 -| 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` | @@ -2909,7 +2910,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam | `style` | `'bold yellow'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `ocaml` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ---------------- | ------------ | ----------------------------------------------------------------- | @@ -2936,7 +2937,7 @@ The `opa` module shows the currently installed version of the OPA tool. By defau ### 選項 -| 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` | @@ -2947,7 +2948,7 @@ The `opa` module shows the currently installed version of the OPA tool. By defau | `style` | `'bold blue'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `opa` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | --------- | ------------------------------------ | @@ -2972,14 +2973,14 @@ The `openstack` module shows the current OpenStack cloud and project. The module ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ---------- | ----------------------------------------------- | -------------------------------------------------------------- | | `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. | | `symbol` | `'☁️ '` | The symbol used before displaying the current OpenStack cloud. | | `style` | `'bold yellow'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `openstack` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ------ | ------------------------------------ | @@ -3019,7 +3020,7 @@ The [os_info](https://lib.rs/crates/os_info) crate used by this module is known ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ---------- | --------------------- | ------------------------------------------------------ | | `format` | `'[$symbol]($style)'` | The format for the module. | | `style` | `'bold white'` | 這個模組的風格。 | @@ -3074,7 +3075,7 @@ Unknown = "❓ " Windows = "🪟 " ``` -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ------------ | ------------------------------------------------------------------ | @@ -3129,7 +3130,7 @@ The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並 ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ----------------- | --------------------------------- | ------------------------------------------------------------------------- | | `format` | `'is [$symbol$version]($style) '` | The format for the module. | | `symbol` | `'📦 '` | 顯示在套件的版本之前的符號。 | @@ -3138,7 +3139,7 @@ The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並 | `display_private` | `false` | Enable displaying version for packages marked as private. | | `disabled` | `false` | 停用 `package` 模組。 | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -3169,7 +3170,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe ### 選項 -| 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` | @@ -3180,7 +3181,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe | `style` | `'bold 149'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `perl` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | --------- | ------------------------------------ | @@ -3207,7 +3208,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. ### 選項 -| 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` | @@ -3218,7 +3219,7 @@ The `php` module shows the currently installed version of [PHP](https://www.php. | `style` | `'147 bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `php` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -3243,7 +3244,7 @@ The `pijul_channel` module shows the active channel of the repo in your current ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | --------------------------------- | ------------------------------------------------------------------------------------ | | `symbol` | `' '` | The symbol used before the pijul channel name of the repo in your current directory. | | `style` | `'bold purple'` | 這個模組的風格。 | @@ -3269,7 +3270,7 @@ By default the module will be shown if any of the following conditions are met: ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ---------------- | -------------------------------------------- | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($username@)$stack]($style) '` | The format string for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -3278,7 +3279,7 @@ By default the module will be shown if any of the following conditions are met: | `search_upwards` | `true` | Enable discovery of pulumi config files in parent directories. | | `disabled` | `false` | Disables the `pulumi` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ---------- | ------------------------------------ | @@ -3319,7 +3320,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht ### 選項 -| 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` | @@ -3330,7 +3331,7 @@ The `purescript` module shows the currently installed version of [PureScript](ht | `style` | `'bold white'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `purescript` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -3369,7 +3370,7 @@ By default the module will be shown if any of the following conditions are met: ### 選項 -| 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` | @@ -3391,7 +3392,7 @@ The default values and order for `python_binary` was chosen to first identify th ::: -### Variables +### 變數 | 變數 | 範例 | 說明 | | ------------ | --------------- | ------------------------------------------ | @@ -3452,7 +3453,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr ### 選項 -| 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` | @@ -3463,7 +3464,7 @@ The `rlang` module shows the currently installed version of [R](https://www.r-pr | `detect_folders` | `['.Rproj.user']` | Which folders should trigger this module | | `disabled` | `false` | Disables the `r` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ------- | ------------- | ------------------------------------ | @@ -3489,7 +3490,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version-$vm_version )]($style)'` | The format string for the module. | | `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -3500,7 +3501,7 @@ The `raku` module shows the currently installed version of [Raku](https://www.ra | `style` | `'bold 149'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `raku` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ---------- | ------ | ------------------------------------ | @@ -3526,7 +3527,7 @@ By default the `red` module shows the currently installed version of [Red](https ### 選項 -| 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` | @@ -3537,7 +3538,7 @@ By default the `red` module shows the currently installed version of [Red](https | `style` | `'red bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `red` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -3569,7 +3570,7 @@ Starship gets the current Ruby version by running `ruby -v`. ### 選項 -| 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` | @@ -3581,7 +3582,7 @@ Starship gets the current Ruby version by running `ruby -v`. | `style` | `'bold red'` | 這個模組的風格。 | | `disabled` | `false` | 停用 `ruby` 模組。 | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -3609,7 +3610,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt ### 選項 -| 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` | @@ -3620,7 +3621,7 @@ By default the `rust` module shows the currently installed version of [Rust](htt | `style` | `'bold red'` | 這個模組的風格。 | | `disabled` | `false` | 停用 `rust` 模組。 | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ----------------- | -------------------------------------------- | @@ -3651,7 +3652,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. ### 選項 -| 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` | @@ -3662,7 +3663,7 @@ The `scala` module shows the currently installed version of [Scala](https://www. | `style` | `'red dimmed'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `scala` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -3693,7 +3694,7 @@ The `shell` module shows an indicator for currently used shell. ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ---------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | | `bash_indicator` | `'bsh'` | A format string used to represent bash. | | `fish_indicator` | `'fsh'` | A format string used to represent fish. | @@ -3711,7 +3712,7 @@ The `shell` module shows an indicator for currently used shell. | `style` | `'white bold'` | 這個模組的風格。 | | `disabled` | `true` | Disables the `shell` module. | -### Variables +### 變數 | 變數 | 預設 | 說明 | | --------- | -- | ---------------------------------------------------------- | @@ -3720,7 +3721,7 @@ The `shell` module shows an indicator for currently used shell. *: This variable can only be used as a part of a style string -### Examples +### 範例 ```toml # ~/.config/starship.toml @@ -3739,7 +3740,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | --------------- | ---------------------------- | ------------------------------------------------------------------- | | `threshold` | `2` | Display threshold. | | `format` | `'[$symbol$shlvl]($style) '` | The format for the module. | @@ -3749,7 +3750,7 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int | `style` | `'bold yellow'` | 這個模組的風格。 | | `disabled` | `true` | Disables the `shlvl` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | --- | ------------------------------------ | @@ -3790,14 +3791,14 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ---------- | -------------------------------- | ------------------------------------------------ | | `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. | | `symbol` | `''` | A format string displayed before the image name. | | `style` | `'bold dimmed blue'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `singularity` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ------------ | ------------------------------------ | @@ -3824,7 +3825,7 @@ The `solidity` module shows the currently installed version of [Solidity](https: ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | ------------------------------------ | ------------------------------------------------------------------------- | | `format` | `'via [$symbol($version )]($style)'` | The format for the module. | | `version_format` | `'v${major}.${minor}.${patch}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` | @@ -3836,7 +3837,7 @@ The `solidity` module shows the currently installed version of [Solidity](https: | `style` | `'bold blue'` | 這個模組的風格。 | | `disabled` | `false` | Disables this module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -3860,7 +3861,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | `truncation_length` | `1` | The number of directories the environment path should be truncated to. `0` 表示不截斷 也請參考 [`directory`](#directory)模組 | | `symbol` | `'🅢 '` | 環境名稱前使用的符號。 | @@ -3868,7 +3869,7 @@ The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/lat | `format` | `'via [$symbol$environment]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `spack` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ----------- | ------------ | ------------------------------------ | @@ -3899,7 +3900,7 @@ The `status` module displays the exit code of the previous command. If $success_ ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | | `format` | `'[$symbol$status]($style) '` | The format of the module | | `symbol` | `'❌'` | The symbol displayed on program error | @@ -3917,7 +3918,7 @@ The `status` module displays the exit code of the previous command. If $success_ | `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments | | `disabled` | `true` | Disables the `status` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | -------------- | ------- | ------------------------------------------------------------------------------------------ | @@ -3960,7 +3961,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | --------------- | ------------------------ | ------------------------------------------------------- | | `format` | `'[as $symbol]($style)'` | The format of the module | | `symbol` | `'🧙 '` | The symbol displayed when credentials are cached | @@ -3968,7 +3969,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module | `allow_windows` | `false` | Since windows has no default sudo, default is disabled. | | `disabled` | `true` | Disables the `sudo` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -- | ------------------------------------ | @@ -4006,7 +4007,7 @@ By default the `swift` module shows the currently installed version of [Swift](h ### 選項 -| 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` | @@ -4017,7 +4018,7 @@ By default the `swift` module shows the currently installed version of [Swift](h | `style` | `'bold 202'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `swift` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -4053,7 +4054,7 @@ By default the module will be shown if any of the following conditions are met: ### 選項 -| 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` | @@ -4064,7 +4065,7 @@ By default the module will be shown if any of the following conditions are met: | `style` | `'bold 105'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `terraform` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ---------- | ------------------------------------ | @@ -4107,7 +4108,7 @@ format = '[🏎💨 $workspace]($style) ' ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- | | `format` | `'at [$time]($style) '` | The format string for the module. | | `use_12hr` | `false` | 啟用 12 小時格式。 | @@ -4119,7 +4120,7 @@ format = '[🏎💨 $workspace]($style) ' If `use_12hr` is `true`, then `time_format` defaults to `'%r'`. Otherwise, it defaults to `'%T'`. Manually setting `time_format` will override the `use_12hr` setting. -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ---------- | ----------------------------------- | @@ -4152,7 +4153,7 @@ By default, the module will be shown if any of the following conditions are met: ### 選項 -| 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` | @@ -4163,7 +4164,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 `daml` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ------------- | --------- | ----------------------------------------------- | @@ -4191,7 +4192,7 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------- | ----------------------- | ------------------------------------------- | | `style_root` | `'bold red'` | The style used when the user is root/admin. | | `style_user` | `'bold yellow'` | 非 root 使用者時使用的風格。 | @@ -4199,7 +4200,7 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, ` | `show_always` | `false` | 總是顯示 `username` 模組。 | | `disabled` | `false` | 停用 `username` 模組。 | -### Variables +### 變數 | 變數 | 範例 | 說明 | | ------- | ------------ | ------------------------------------------------------------------------------------------- | @@ -4227,7 +4228,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// ### 選項 -| 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` | @@ -4238,7 +4239,7 @@ The `vagrant` module shows the currently installed version of [Vagrant](https:// | `style` | `'cyan bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `vagrant` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ---------------- | ------------------------------------ | @@ -4266,7 +4267,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla ### 選項 -| 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` | @@ -4277,7 +4278,7 @@ The `vlang` module shows you your currently installed version of [V](https://vla | `style` | `'blue bold'` | 這個模組的風格。 | | `disabled` | `false` | Disables the `vlang` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ------ | ------------------------------------ | @@ -4299,14 +4300,14 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ---------- | -------------------------------- | ------------------------------------------------------ | | `symbol` | `''` | The symbol used before displaying the repository name. | | `style` | `'bold yellow'` | 這個模組的風格。 | | `format` | `'vcsh [$symbol$repo]($style) '` | The format for the module. | | `disabled` | `false` | Disables the `vcsh` module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | ------------------------------------------- | ------------------------------------ | @@ -4333,7 +4334,7 @@ By default the `zig` module shows the currently installed version of [Zig](https ### 選項 -| 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` | @@ -4344,7 +4345,7 @@ By default the `zig` module shows the currently installed version of [Zig](https | `detect_files` | `[]` | Which filenames should trigger this module. | | `detect_folders` | `[]` | Which folders should trigger this module. | -### Variables +### 變數 | 變數 | 範例 | 說明 | | --------- | -------- | ------------------------------------ | @@ -4403,7 +4404,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt ### 選項 -| Option | 預設 | 說明 | +| 選項 | 預設 | 說明 | | ------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `command` | `''` | The command whose output should be printed. The command will be passed on stdin to the shell. | | `when` | `false` | Either a boolean value (`true` or `false`, without quotes) or a string shell command used as a condition to show the module. In case of a string, the module will be shown if the command returns a `0` status code. | @@ -4421,7 +4422,7 @@ Format strings can also contain shell specific prompt sequences, e.g. [Bash](htt | `use_stdin` | | An optional boolean value that overrides whether commands should be forwarded to the shell via the standard input or as an argument. If unset standard input is used by default, unless the shell does not support it (cmd, nushell). Setting this disables shell-specific argument handling. | | `ignore_timeout` | `false` | Ignore global `command_timeout` setting and keep running external commands, no matter how long they take. | -### Variables +### 變數 | 變數 | 說明 | | --------- | -------------------------------------- | diff --git a/docs/zh-TW/migrating-to-0.45.0/README.md b/docs/zh-TW/migrating-to-0.45.0/README.md index 639fbcf8..410ad6d2 100644 --- a/docs/zh-TW/migrating-to-0.45.0/README.md +++ b/docs/zh-TW/migrating-to-0.45.0/README.md @@ -1,16 +1,16 @@ -# Migrating to v0.45.0 +# 遷移版本至 v0.45.0 -Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization. +Starship v0.45.0 包含了破壞性的變更,這個變更是為了大的 v1.0.0. 做準備 我們圍繞著如何在提示上完成設定進行了一些重大的更改,以允許更大程度的客製化。 -This guide is intended to walk you through the breaking changes. +這個指南目的在引導您走過一次這些破壞性的變更 -## `prompt_order` has been replaced by a root-level `format` +## `prompt_order` 已經被根層級的 `format` 所取代 -Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship. +v0.45.0 以前, `prompt_order` 將會依照 Starship 渲染的順序來接受模組名稱的陣列 -Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves. +取而代之的是 Starship v0.45.0 會接受 `format` 值,這個值允許在模組本身之外自訂提示 -**Example pre-v0.45.0 configuration** +**pre-v0.45.0 的設定範例** ```toml prompt_order = [ @@ -31,7 +31,7 @@ prompt_order = [ ] ``` -**Example v0.45.0 configuration** +** v0.45.0 的設定範例** ```toml format = """\ @@ -52,20 +52,20 @@ format = """\ """ ``` -## Module `prefix` and `suffix` have been replaced by `format` +## 模組 `prefix` 以及 `suffix` 已經被 `format` 所取代 -Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered. +v0.45.0 版之前,有些模組會接受 `prefix` 且/或 `suffix`,以便使得模組呈現的方式更為風格化 -Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output. +Starship v0.45.0 取而代之的接受了 `format` 的值,允許進一步客製模組的渲染方式 現在可以從表示模組輸出的格式字串中取代變數,而不是基於上下文的變數定義前綴以及後綴 -**Example pre-v0.45.0 configuration** +**pre-v0.45.0 的設定範例** ```toml [cmd_duration] prefix = "took " ``` -**Example v0.45.0 configuration** +** v0.45.0 的設定範例** ```toml [cmd_duration] @@ -74,18 +74,18 @@ prefix = "took " format = "took [$duration]($style) " ``` -### Affected Modules +### 受影響的模組 #### 字元 -| Removed Property | Replacement | +| 已移除的屬性 | 取代屬性 | | ----------------------- | ---------------- | | `symbol` | `success_symbol` | | `use_symbol_for_status` | `error_symbol` | | `style_success` | `success_symbol` | | `style_failure` | `error_symbol` | -**Changes to the Default Configuration** +**預設設定的異動** ```diff [character] @@ -98,26 +98,26 @@ format = "took [$duration]($style) " ++ vicmd_symbol = "[❮](bold green)" ``` -Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code. +在之前 `use_symbol_for_status` 屬性會被用於設定提示字元在最後一個指令執行的結果為非 0 的狀態代碼時,會顯示 `error_symbol` -With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties. +隨著 v0.45.0 版本的發布,我們現在都只會在非零狀態代碼之後使用 `error_symbol`,統一 `use_symbol_for_status` 以及 `error_symbol` 屬性 -To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file: +如果要設定提示字元使用舊的 `use_symbol_for_status = true` 設定,請將以下設定加入您的設定檔案中: ```toml [character] error_symbol = "[✖](bold red)" ``` -_Note:_ The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples. +_Note:_ ,`character` 元素會自動附加一個空格, 所以與設定值 `format` 字串不同, 我們上面的例子中刻意沒有加入這個設定 #### 指令持續時間 -| Removed Property | Replacement | -| ---------------- | ----------- | -| `prefix` | `format` | +| 已移除的屬性 | 取代屬性 | +| -------- | -------- | +| `prefix` | `format` | -**Changes to the Default Configuration** +**預設設定的異動** ```diff [cmd_duration] @@ -127,11 +127,11 @@ _Note:_ The `character` element automatically adds a space after, so unlike the #### 資料夾 -| Removed Property | Replacement | -| ---------------- | ----------- | -| `prefix` | `format` | +| 已移除的屬性 | 取代屬性 | +| -------- | -------- | +| `prefix` | `format` | -**Changes to the Default Configuration** +**預設設定的異動** ```diff [directory] @@ -141,12 +141,12 @@ _Note:_ The `character` element automatically adds a space after, so unlike the #### 環境變數 -| Removed Property | Replacement | -| ---------------- | ----------- | -| `prefix` | `format` | -| `suffix` | `format` | +| 已移除的屬性 | 取代屬性 | +| -------- | -------- | +| `prefix` | `format` | +| `suffix` | `format` | -**Changes to the Default Configuration** +**預設設定的異動** ```diff [env_var] @@ -155,14 +155,14 @@ _Note:_ The `character` element automatically adds a space after, so unlike the ++ format = "with [$env_value]($style) " ``` -#### Git Commit +#### Git 提交 -| Removed Property | Replacement | -| ---------------- | ----------- | -| `prefix` | `format` | -| `suffix` | `format` | +| 已移除的屬性 | 取代屬性 | +| -------- | -------- | +| `prefix` | `format` | +| `suffix` | `format` | -**Changes to the Default Configuration** +**預設設定的異動** ```diff [git_commit] @@ -171,15 +171,15 @@ _Note:_ The `character` element automatically adds a space after, so unlike the ++ format = '[\($hash\)]($style) ' ``` -#### Git Status +#### Git 狀態 -| Removed Property | Replacement | -| ----------------- | ----------- | -| `prefix` | `format` | -| `suffix` | `format` | -| `show_sync_count` | `format` | +| 已移除的屬性 | 取代屬性 | +| ----------------- | -------- | +| `prefix` | `format` | +| `suffix` | `format` | +| `show_sync_count` | `format` | -**Changes to the Default Configuration** +**預設設定的異動** ```diff [git_status] @@ -189,11 +189,11 @@ _Note:_ The `character` element automatically adds a space after, so unlike the ++ format = '([\[$all_status$ahead_behind\]]($style) )' ``` -Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch. +在之前的版本 `show_sync_count` 屬性是被用於設定提示字元顯示分之在遠端分支之前或之後所 commit 的數量 -With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`. +在 v0.45.0 的版本,這個屬性已經被三個分開的屬性所取代,分別是 `ahead`、`behind` 以及 `diverged` -To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file: +為了能夠讓題是字元能夠使用舊的 `show_sync_count = true` 設定,請將以下內容設定至您的設定檔當中 ```toml [git_status] @@ -204,12 +204,12 @@ behind = "⇣${count}" #### 主機名稱 -| Removed Property | Replacement | -| ---------------- | ----------- | -| `prefix` | `format` | -| `suffix` | `format` | +| 已移除的屬性 | 取代屬性 | +| -------- | -------- | +| `prefix` | `format` | +| `suffix` | `format` | -**Changes to the Default Configuration** +**預設設定的異動** ```diff [hostname] @@ -220,13 +220,13 @@ behind = "⇣${count}" #### Singularity -| Removed Property | Replacement | -| ---------------- | ----------- | -| `label` | `format` | -| `prefix` | `format` | -| `suffix` | `format` | +| 已移除的屬性 | 取代屬性 | +| -------- | -------- | +| `label` | `format` | +| `prefix` | `format` | +| `suffix` | `format` | -**Changes to the Default Configuration** +**預設設定的異動** ```diff [singularity] @@ -237,11 +237,11 @@ behind = "⇣${count}" #### 時間 -| Removed Property | Replacement | -| ---------------- | ------------- | -| `format` | `time_format` | +| 已移除的屬性 | 取代屬性 | +| -------- | ------------- | +| `format` | `time_format` | -**Changes to the Default Configuration** +**預設設定的異動** ```diff [time] @@ -250,14 +250,14 @@ behind = "⇣${count}" ++ format = "at 🕙[$time]($style) " ``` -#### Custom Commands +#### 自訂指令 -| Removed Property | Replacement | -| ---------------- | ----------- | -| `prefix` | `format` | -| `suffix` | `format` | +| 已移除的屬性 | 取代屬性 | +| -------- | -------- | +| `prefix` | `format` | +| `suffix` | `format` | -**Changes to the Default Configuration** +**預設設定的異動** ```diff [custom.example]