docs(i18n): new Crowdin updates (#5682)
* New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Simplified) * New translations nerd-font.md (Chinese Simplified) * New translations tokyo-night.md (Chinese Simplified) * New translations gruvbox-rainbow.md (Chinese Simplified) * New translations readme.md (Chinese Simplified) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (Arabic) * New translations readme.md (Arabic) * New translations readme.md (Ukrainian) * New translations readme.md (Spanish) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (Ukrainian) * New translations readme.md (Russian) * New translations readme.md (Russian) * New translations readme.md (Russian) * New translations readme.md (Russian) * New translations readme.md (Russian) * New translations readme.md (Spanish) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (Spanish) * New translations readme.md (Chinese Traditional) * New translations readme.md (Chinese Traditional) * New translations readme.md (Chinese Traditional) * New translations readme.md (Ukrainian) * New translations readme.md (Indonesian) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Chinese Traditional) * New translations readme.md (Chinese Traditional) * New translations readme.md (Chinese Traditional) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations gruvbox-rainbow.md (German)
This commit is contained in:
parent
5163dbad8d
commit
3c06374907
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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.
|
||||
|
||||
### مثال
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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.
|
||||
|
||||
### نموونە
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <value>` where \<value\> 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 <value>` where \<value\> 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=<value>`:
|
||||
|
||||
The \<value\> 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
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<a href="https://stand-with-ukraine.pp.ua"
|
||||
><img
|
||||
src="https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraineFlat.svg"
|
||||
alt="Stand With Ukraine"
|
||||
alt="Wir stehen zur Ukraine"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
|
@ -108,7 +108,7 @@
|
|||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||
alt="Portugiesisch (Brasilien)"
|
||||
alt="Português do Brasil"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
|
@ -132,7 +132,7 @@
|
|||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Vietnamesisch"
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
|
@ -180,7 +180,7 @@
|
|||
|
||||
### Voraussetzungen
|
||||
|
||||
- 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)).
|
||||
- Eine [Nerd Font](https://www.nerdfonts.com/), installiert und in deinem Terminal aktiviert (versuche es zum Beispiel mal mit der [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)).
|
||||
|
||||
### Schritt 1. Installiere Starship
|
||||
|
||||
|
@ -274,14 +274,14 @@ Install Starship using any of the following package managers:
|
|||
|
||||
</details>
|
||||
|
||||
### 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:
|
||||
|
||||
<details>
|
||||
<summary>Bash</summary>
|
||||
|
||||
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)"
|
|||
<details>
|
||||
<summary>⌘ Cmd</summary>
|
||||
|
||||
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)
|
|||
<details>
|
||||
<summary>Nushell</summary>
|
||||
|
||||
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
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>PowerShell</summary>
|
||||
|
||||
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)
|
|||
<details>
|
||||
<summary>Tcsh</summary>
|
||||
|
||||
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/)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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.
|
||||
|
||||
### 設定例
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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.
|
||||
|
||||
### 예시
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
O \<value\> 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
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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.
|
||||
|
||||
### Пример
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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 `<module>.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` и без.
|
||||
|
|
|
@ -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:
|
||||
Выберите вашу операционную систему из списка ниже для просмотра инструкций по установке:
|
||||
|
||||
<details>
|
||||
<summary>Android</summary>
|
||||
|
||||
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:
|
|||
<details>
|
||||
<summary>BSD</summary>
|
||||
|
||||
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` |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Linux</summary>
|
||||
|
||||
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` <br /> `dnf install starship` |
|
||||
|
@ -240,15 +240,15 @@ Alternatively, install Starship using any of the following package managers:
|
|||
<details>
|
||||
<summary>macOS</summary>
|
||||
|
||||
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:
|
|||
|
||||
</details>
|
||||
|
||||
### Шаг 2. Set up your shell to use Starship
|
||||
### Шаг 2. Настройте оболочку для использования Starship
|
||||
|
||||
Configure your shell to initialize starship. Select yours from the list below:
|
||||
Настройте оболочку для инициализации starship. Выберете вашу оболочку из списка:
|
||||
|
||||
<details>
|
||||
<summary>Bash</summary>
|
||||
|
@ -292,7 +292,7 @@ eval "$(starship init bash)"
|
|||
<details>
|
||||
<summary>Cmd</summary>
|
||||
|
||||
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+
|
||||
|
||||
</details>
|
||||
|
||||
|
@ -399,15 +399,15 @@ eval "$(starship init zsh)"
|
|||
|
||||
</details>
|
||||
|
||||
### Шаг 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**
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Advanced Installation
|
||||
# Продвинутая установка
|
||||
|
||||
To install starship, you need to do two things:
|
||||
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
\<value\> тут – це розділений двокрапкою список `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 праворуч.
|
||||
|
||||
### Приклад
|
||||
|
||||
|
|
|
@ -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-файл не завантажений. |
|
||||
|
|
|
@ -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`.
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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ụ
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
|
|
@ -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执行快速安装。
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
|
@ -162,7 +162,7 @@ description: Starship是一款轻量级、反应迅速、可自定义的高颜
|
|||
然后在您的 Nushell 配置文件的最后(使用 `$nu.config-path` 来获取它的路径),添加以下内容:
|
||||
|
||||
```sh
|
||||
使用 ~/.cache/starship/init.nu
|
||||
use ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -58,9 +58,9 @@ load(io.popen('starship init cmd'):read("*a"))()
|
|||
|
||||
可以用自定义字符串替换预设的命令行提示。 这在不经常需要所有提示信息的情况下很有用。 若要启用该功能,请在 shell 中运行 `Enable-TransitientPrompt`命令 若要永久启用该功能,请将 上述语句放在您的 `~/.config/fish/config.fish` 中。 通过在shell中运行 `Disable-TransientPrompt`命令来禁用这项功能。
|
||||
|
||||
请注意,对于Fish,命令行提示只在命令行非空 和语法正确的情况下才会显示。
|
||||
请注意,对于Fish,命令行提示只在命令行非空 且语法正确的情况下才会显示。
|
||||
|
||||
- 默认情况下,输入的左侧是 粗体绿色的❯</code>符号。 要自定义它,请定义一个新函数,名为 `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=<value>`:
|
||||
|
||||
The \<value\> 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.
|
||||
|
||||
### 示例
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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`安装的文档
|
||||
|
|
|
@ -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` <br /> `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 提示符。
|
||||
|
||||
|
|
|
@ -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/) 并在您的终端启用。
|
||||
|
||||
### 配置
|
||||
|
||||
|
|
|
@ -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 字体)。
|
||||
|
||||
### 配置
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
### 前置要求
|
||||
|
||||
- 安装一种 [Nerd fonts](https://www.nerdfonts.com/) 并在您的终端启用。
|
||||
- 安装一种 [Nerd Font](https://www.nerdfonts.com/) 并在您的终端启用。
|
||||
|
||||
### 配置
|
||||
|
||||
|
|
|
@ -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=<value>`:
|
||||
|
||||
The \<value\> 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.
|
||||
|
||||
### 範例
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue