docs(i18n): new Crowdin updates (#4355)

This commit is contained in:
Matan Kushner 2022-10-14 21:53:32 -04:00 committed by GitHub
parent dfc9cf6861
commit 74951e630e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
89 changed files with 9214 additions and 2495 deletions

View File

@ -2,7 +2,7 @@
home: true
heroImage: /logo.svg
heroText:
tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell!
tagline: التخصيص البسيط و السريع و الغير محدود لي ال"shell"!
actionText: البدء مع Starship ←
actionLink: ./guide/
features:
@ -55,11 +55,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
```sh
brew install starship
```
بإستخدام [Scoop](https://scoop.sh):
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. أضف ما يلي إلى ملف تكوين موجه الأوامر الخاص بك:
@ -179,7 +178,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Cmd
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
عليك بإستخدام [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) مع Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
```lua
-- starship.lua

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:

View File

@ -162,13 +162,15 @@ This is the list of prompt-wide configuration options.
### Options
| Option | الافتراضي | الوصف |
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| Option | الافتراضي | الوصف |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### مثال
@ -186,6 +188,16 @@ scan_timeout = 10
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Default Prompt Format
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +444,12 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
The `display` option is an array of the following table.
| Option | الافتراضي | الوصف |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `bold red` | The style used if the display option is in use. |
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
| Option | الافتراضي | الوصف |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `"red bold"` | The style used if the display option is in use. |
| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
#### مثال
@ -462,24 +475,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### Options
| Option | الافتراضي | الوصف |
| ------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `elixir` module. |
| Option | الافتراضي | الوصف |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `elixir` module. |
### Variables
| Variable | مثال | الوصف |
| ------------- | -------- | ------------------------------------ |
| `buf_version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
| Variable | مثال | الوصف |
| --------- | -------- | ------------------------------------ |
| `version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
@ -609,9 +622,9 @@ By default it only changes color. If you also want to change its shape take a lo
### Variables
| Variable | مثال | الوصف |
| -------- | ---- | --------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
| Variable | مثال | الوصف |
| -------- | ---- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Examples
@ -794,12 +807,12 @@ The `container` module displays a symbol and container name, if inside a contain
### Options
| Option | الافتراضي | الوصف |
| ---------- | -------------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | `"[$symbol \\[$name\\]]($style) "` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
| Option | الافتراضي | الوصف |
| ---------- | ---------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
@ -817,7 +830,7 @@ The `container` module displays a symbol and container name, if inside a contain
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Options
| Option | الافتراضي | الوصف |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | The format for the module. |
| `version_format` | `v${raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
| Option | الافتراضي | الوصف |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
### Variables
@ -993,7 +1006,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `home_symbol` | `"~"` | The symbol indicating home directory. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
@ -1480,16 +1493,16 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### Options
| Option | الافتراضي | الوصف |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
| `style` | `"bold green"` | The style for the module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
| Option | الافتراضي | الوصف |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `'[\($hash$tag\)]($style) '` | The format for the module. |
| `style` | `"bold green"` | The style for the module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
### Variables
@ -1567,7 +1580,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | The format for the module. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
@ -1588,7 +1601,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git Status
@ -1690,7 +1703,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
### Options
| Option | الافتراضي | الوصف |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
| Option | الافتراضي | الوصف |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
### Variables
@ -2258,6 +2271,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Options
| Option | الافتراضي | الوصف |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. |
| `format` | `"via [$symbol$project]($style) "` | The format for the module. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | The style for the module. |
| `disabled` | `false` | Disables the `meson` module. |
### Variables
| Variable | مثال | الوصف |
| --------- | ---------- | ------------------------------------ |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### مثال
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory.
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### Options
| Option | الافتراضي | الوصف |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
| Option | الافتراضي | الوصف |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
### Variables
@ -2495,7 +2547,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
@ -3077,16 +3129,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | الافتراضي | الوصف |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | The format for the module. |
| `style` | `"white bold"` | The style for the module. |
@ -3227,23 +3279,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | الافتراضي | الوصف |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| Option | الافتراضي | الوصف |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables
@ -3288,13 +3340,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | الافتراضي | الوصف |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| Option | الافتراضي | الوصف |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Variables
@ -3762,7 +3814,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -150,17 +150,17 @@
align="right"
/>
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
**التخصيص البسيط و السريع و الغير محدود لي ال"shell"!**
- **سريع:** إنها سريعة _سريعة_ حقاً! 🚀
- **Customizable:** configure every aspect of your prompt.
- **Universal:** works on any shell, on any operating system.
- **Intelligent:** shows relevant information at a glance.
- **كثيرة المزايا:** دعم لجميع الأدوات المفضلة لديك.
- **سهل:** سريع التثبيت استخدمه في دقائق.
- **Fast:** إنها _في غاية_ السرعة! 🚀
- ** Customizable:** قم بتهيئة ال"prompt" من كل النواحي.
- **Universal:** يعمل على أي shell، على أي نظام تشغيل.
- ** Customizable:** تظهر المعلومات ذات الصلة في لمح البصر.
- **Feature rich:** تدعم جميع الأدوات المفضلة لديك.
- **Easy:** سريع التثبيت استخدمها في دقائق معدودة.
<p align="center">
<a href="https://starship.rs/config/"><strong>تصفّح مستندات Starship&nbsp;&nbsp;</strong></a>
<a href="https://starship.rs/config/"><strong>استكشف مستندات Starship&nbsp;&nbsp;</strong></a>
</p>
<a name="🚀-installation"></a>
@ -169,16 +169,16 @@
### المتطلبات الأساسية
- تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في موجه الأوامر الخاصة بك (على سبيل المثال، جرب [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
- تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في ال terminal الخاصة بك (على سبيل المثال، جرب الخط [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
### Step 1. Install Starship
### الخطوة الأولى. تثبيت 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 باستخدام أي من package managers التاليين:
| Repository | Instructions |
| --------------------------------------------------------------------------------- | ---------------------- |
@ -189,7 +189,7 @@ Install Starship using any of the following package managers:
<details>
<summary>BSD</summary>
Install Starship using any of the following package managers:
قم بتثبيت Starship باستخدام أي من package managers التاليين:
| Distribution | Repository | Instructions |
| ------------ | -------------------------------------------------------- | --------------------------------- |
@ -202,13 +202,13 @@ Install Starship using any of the following package managers:
<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 باستخدام احد ال package managers التالية:
| Distribution | Repository | Instructions |
| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
@ -218,9 +218,8 @@ Alternatively, install Starship using any of the following package managers:
| _Any_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` |
| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` |
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| CentOS +7 | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship` <br /> `dnf install starship` |
| Fedora +31 | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
@ -231,13 +230,13 @@ 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 باستخدام احد ال package managers التالية:
| Repository | Instructions |
| -------------------------------------------------------- | --------------------------------------- |
@ -251,9 +250,9 @@ Alternatively, install Starship using any of the following package managers:
<details>
<summary>Windows</summary>
Install the latest version for your system with the MSI-installers from the [releases section](https://github.com/starship/starship/releases/latest).
قم بتثبيت أحدث إصدار للنظام الخاص بك مع MSI-installers من قسم الإصدارات [](https://github.com/starship/starship/releases/latest).
Install Starship using any of the following package managers:
يمكنك تثبيت starship باستخدام احد ال package managers التالية:
| Repository | Instructions |
| -------------------------------------------------------------------------------------------- | --------------------------------------- |
@ -265,14 +264,14 @@ Install Starship using any of the following package managers:
</details>
### Step 2. Setup your shell to use Starship
### الخطوة الثانية. قم بإعداد ال shell الخاص بك
Configure your shell to initialize starship. Select yours from the list below:
لإعداد ال starship قم بإعداد ال shell الخاص بك. اختر ما يناسبك من هذه القائمة:
<details>
<summary>Bash</summary>
أضف ما يلي إلى نهاية `~/.bashrc`:
أضف ما يلي إلى نهاية ملف `~/.bashrc`:
```sh
eval "$(starship init bash)"
@ -283,7 +282,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"))()
@ -294,20 +293,20 @@ load(io.popen('starship init cmd'):read("*a"))()
<details>
<summary>Elvish</summary>
أضف ما يلي إلى نهاية `~/.elvish/rc.elv`:
أضف ما يلي إلى نهاية الملف `~/.elvish/rc.elv`:
```sh
eval (starship init elvish)
```
Note: Only Elvish v0.18+ is supported
ملاحظة: فقط +Elvish v0.18 مدعوم
</details>
<details>
<summary>Fish</summary>
أضف ما يلي إلى نهاية `~/.config/fish/config.fish`:
أضف ما يلي إلى نهاية الملف `~/.fish/config.fish`:
```fish
starship init fish | source
@ -318,7 +317,7 @@ starship init fish | source
<details>
<summary>Ion</summary>
أضف ما يلي إلى نهاية `~/.config/ion/initrc`:
أضف ما يلي إلى نهاية الملف `config/ion/initrc`:
```sh
eval $(starship init ion)
@ -390,7 +389,7 @@ eval "$(starship init zsh)"
</details>
### Step 3. Configure Starship
### الخطوة الثالثة. تهيئة starship
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!

View File

@ -55,11 +55,10 @@ description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و ب
```sh
brew install starship
```
لەگەڵ [Scoop](https://scoop.sh):
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. نوسینی init زیادبکە بۆ فایلی ڕێکخستنی شێڵەکەت:

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:

View File

@ -162,13 +162,15 @@ This is the list of prompt-wide configuration options.
### Options
| Option | Default | Description |
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| Option | Default | Description |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### نموونە
@ -186,6 +188,16 @@ scan_timeout = 10
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Default Prompt Format
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +444,12 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
The `display` option is an array of the following table.
| Option | Default | Description |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `bold red` | The style used if the display option is in use. |
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
| Option | Default | Description |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `"red bold"` | The style used if the display option is in use. |
| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
#### نموونە
@ -462,24 +475,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### Options
| Option | Default | Description |
| ------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `elixir` module. |
| Option | Default | Description |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `elixir` module. |
### Variables
| گۆڕاو | نموونە | Description |
| ------------- | -------- | ------------------------------------ |
| `buf_version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
| گۆڕاو | نموونە | Description |
| --------- | -------- | ------------------------------------ |
| `version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
@ -609,9 +622,9 @@ By default it only changes color. If you also want to change its shape take a lo
### Variables
| گۆڕاو | نموونە | Description |
| ------ | ------ | --------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
| گۆڕاو | نموونە | Description |
| ------ | ------ | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Examples
@ -794,12 +807,12 @@ The `container` module displays a symbol and container name, if inside a contain
### Options
| Option | Default | Description |
| ---------- | -------------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | `"[$symbol \\[$name\\]]($style) "` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
| Option | Default | Description |
| ---------- | ---------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
@ -817,7 +830,7 @@ The `container` module displays a symbol and container name, if inside a contain
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Options
| Option | Default | Description |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | The format for the module. |
| `version_format` | `v${raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
### Variables
@ -993,7 +1006,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `home_symbol` | `"~"` | The symbol indicating home directory. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
@ -1480,16 +1493,16 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### Options
| Option | Default | Description |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
| `style` | `"bold green"` | The style for the module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
| Option | Default | Description |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `'[\($hash$tag\)]($style) '` | The format for the module. |
| `style` | `"bold green"` | The style for the module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
### Variables
@ -1567,7 +1580,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | The format for the module. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
@ -1588,7 +1601,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git Status
@ -1690,7 +1703,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
### Options
| Option | Default | Description |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
| Option | Default | Description |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
### Variables
@ -2258,6 +2271,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Options
| Option | Default | Description |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. |
| `format` | `"via [$symbol$project]($style) "` | The format for the module. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | The style for the module. |
| `disabled` | `false` | Disables the `meson` module. |
### Variables
| گۆڕاو | نموونە | Description |
| --------- | ---------- | ------------------------------------ |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### نموونە
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory.
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### Options
| Option | Default | Description |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
| Option | Default | Description |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
### Variables
@ -2495,7 +2547,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
@ -3077,16 +3129,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Default | Description |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | The format for the module. |
| `style` | `"white bold"` | The style for the module. |
@ -3227,23 +3279,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | Default | Description |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| Option | Default | Description |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables
@ -3288,13 +3340,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | Default | Description |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| Option | Default | Description |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Variables
@ -3762,7 +3814,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -216,7 +216,6 @@ Alternatively, install Starship using any of the following package managers:
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

View File

@ -55,11 +55,10 @@ description: Starship ist eine minimale, super schnelle, und extrem anpassbare P
```sh
brew install starship
```
Mit [scoop](https://scoop.sh):
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. Führe den init Befehl zum Start der Shell aus:

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:
@ -224,12 +250,12 @@ continuation_prompt = "▶▶"
## Style-Strings
Style-String sind Wortlisten, getrennt durch Leerzeichen. Die Wörter haben keine Groß- und Kleinschreibung (z.B. `bold` und `BoLd` werden als dieselbe Zeichenkette betrachtet). Jedes Wort kann eines der folgenden sein:
Stil-Zeichenketten sind eine Liste von Wörtern, getrennt durch Leerzeichen. Die Wörter haben keine Groß- und Kleinschreibung (z.B. `bold` und `BoLd` werden als dieselbe Zeichenkette betrachtet). Jedes Wort kann eines der folgenden sein:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `fett`
- `kursiv`
- `unterstrichen`
- `gedimmt`
- `invertiert`
- `blink`
- `hidden`
@ -237,7 +263,7 @@ Style-String sind Wortlisten, getrennt durch Leerzeichen. Die Wörter haben kein
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
- `keins`
wobei `<color>` eine Farbspezifikation ist (siehe unten). `fg:<color>` und `<color>` tun derzeit dasselbe, das kann sich in Zukunft aber ändern. `inverted` tauscht Hinter- und Vordergrundfarben. Die Reihenfolge der Wörter in der Liste spielt keine Rolle.

View File

@ -162,13 +162,15 @@ Dies ist eine Liste mit Prompt-weiten Konfigurationsoptionen.
### Optionen
| Option | Standardwert | Beschreibung |
| ----------------- | ------------------------------ | ----------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Das Aussehen des Prompts festlegen. |
| `right_format` | `""` | Sieh [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout für das Scannen von Dateien (in Millisekunden). |
| `command_timeout` | `500` | Maximale Zeit für von Starship ausgeführte Kommandos. |
| `add_newline` | `true` | Fügt leere Zeilen zwischen Shell Prompts ein. |
| Option | Standardwert | Beschreibung |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Das Aussehen des Prompts festlegen. |
| `right_format` | `""` | Sieh [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout für das Scannen von Dateien (in Millisekunden). |
| `command_timeout` | `500` | Maximale Zeit für von Starship ausgeführte Kommandos. |
| `add_newline` | `true` | Fügt leere Zeilen zwischen Shell Prompts ein. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### Beispiel
@ -184,8 +186,18 @@ format = """
# Warte 10 Millisekunden damit Starship die Dateien im aktuellen Ordner überprüfen kann.
scan_timeout = 10
# Deaktiviere die Leerzeile am Anfang der Eingabeaufforderung
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Vordefiniertes Aussehen des Prompts
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -434,9 +447,9 @@ Die `display`-Option beinhaltet ein Array mit den folgenden Werten.
| Option | Standardwert | Beschreibung |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | Der Schwellenwert zur Anzeige dieser Option. |
| `style` | `bold red` | Der Stil, der zur Anzeige dieser Option verwendet wird. |
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
| `style` | `"red bold"` | Der Stil, der zur Anzeige dieser Option verwendet wird. |
| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
#### Beispiel
@ -462,24 +475,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### Optionen
| Option | Standardwert | Beschreibung |
| ------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `elixir` module. |
| Option | Standardwert | Beschreibung |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `elixir` module. |
### Variables
| Variable | Beispiel | Beschreibung |
| ------------- | -------- | ------------------------------------- |
| `buf_version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Spiegelt den Wert der Option `symbol` |
| `style`* | | Spiegelt den Wert der Option `style` |
| Variable | Beispiel | Beschreibung |
| --------- | -------- | ------------------------------------- |
| `version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Spiegelt den Wert der Option `symbol` |
| `style`* | | Spiegelt den Wert der Option `style` |
*: This variable can only be used as a part of a style string
@ -609,9 +622,9 @@ By default it only changes color. If you also want to change its shape take a lo
### Variables
| Variable | Beispiel | Beschreibung |
| -------- | -------- | --------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
| Variable | Beispiel | Beschreibung |
| -------- | -------- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Beispiele
@ -794,12 +807,12 @@ The `container` module displays a symbol and container name, if inside a contain
### Optionen
| Option | Standardwert | Beschreibung |
| ---------- | -------------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | Stil für dieses Modul. |
| `format` | `"[$symbol \\[$name\\]]($style) "` | Das Format für das Modul. |
| `disabled` | `false` | Disables the `container` module. |
| Option | Standardwert | Beschreibung |
| ---------- | ---------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | Stil für dieses Modul. |
| `format` | `'[$symbol \[$name\]]($style) '` | Das Format für das Modul. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
@ -817,7 +830,7 @@ The `container` module displays a symbol and container name, if inside a contain
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Optionen
| Option | Standardwert | Beschreibung |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | Das Format für das Modul. |
| `version_format` | `v${raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | Stil für dieses Modul. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
| Option | Standardwert | Beschreibung |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | Das Format für das Modul. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | Stil für dieses Modul. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
### Variables
@ -993,7 +1006,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `home_symbol` | `"~"` | The symbol indicating home directory. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
@ -1480,16 +1493,16 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### Optionen
| Option | Standardwert | Beschreibung |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `"[\\($hash$tag\\)]($style) "` | Das Format für das Modul. |
| `style` | `"bold green"` | Stil für dieses Modul. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
| Option | Standardwert | Beschreibung |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `'[\($hash$tag\)]($style) '` | Das Format für das Modul. |
| `style` | `"bold green"` | Stil für dieses Modul. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
### Variables
@ -1567,7 +1580,7 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Das Format für das Modul. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | Das Format für das Modul. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
@ -1588,7 +1601,7 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git-Status
@ -1690,7 +1703,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
### Optionen
| Option | Standardwert | Beschreibung |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | Das Format für das Modul. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `Java`-Modul. |
| Option | Standardwert | Beschreibung |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | Das Format für das Modul. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | Stil für dieses Modul. |
| `disabled` | `false` | Deaktiviert das `Java`-Modul. |
### Variables
@ -2258,6 +2271,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Optionen
| Option | Standardwert | Beschreibung |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. |
| `format` | `"via [$symbol$project]($style) "` | Das Format für das Modul. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `meson` module. |
### Variables
| Variable | Beispiel | Beschreibung |
| --------- | ---------- | ------------------------------------- |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Spiegelt den Wert der Option `symbol` |
| style\* | | Spiegelt den Wert der Option `style` |
*: This variable can only be used as a part of a style string
### Beispiel
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory.
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### Optionen
| Option | Standardwert | Beschreibung |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | Das Format für das Modul. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `openstack` module. |
| Option | Standardwert | Beschreibung |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | Das Format für das Modul. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | Stil für dieses Modul. |
| `disabled` | `false` | Disables the `openstack` module. |
### Variables
@ -2495,7 +2547,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
@ -2662,13 +2714,13 @@ By default the module will be shown if any of the following conditions are met:
### Variables
| Variable | Beispiel | Beschreibung |
| ------------ | ---------- | ------------------------------------- |
| version | `v0.12.24` | The version of `pulumi` |
| stack | `dev` | The current Pulumi stack |
| benutzername | `alice` | The current Pulumi username |
| symbol | | Spiegelt den Wert der Option `symbol` |
| style\* | | Spiegelt den Wert der Option `style` |
| Variable | Beispiel | Beschreibung |
| --------- | ---------- | ------------------------------------- |
| version | `v0.12.24` | The version of `pulumi` |
| stack | `dev` | The current Pulumi stack |
| username | `alice` | The current Pulumi username |
| symbol | | Spiegelt den Wert der Option `symbol` |
| style\* | | Spiegelt den Wert der Option `style` |
*: This variable can only be used as a part of a style string
@ -3077,16 +3129,16 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
| Option | Standardwert | Beschreibung |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `⌘ cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | Das Format für das Modul. |
| `style` | `"white bold"` | Stil für dieses Modul. |
@ -3227,23 +3279,23 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
### Optionen
| Option | Standardwert | Beschreibung |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Stil für dieses Modul. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| Option | Standardwert | Beschreibung |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Stil für dieses Modul. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables
@ -3288,13 +3340,13 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
### Optionen
| Option | Standardwert | Beschreibung |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | Stil für dieses Modul. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| Option | Standardwert | Beschreibung |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | Stil für dieses Modul. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Variables
@ -3435,23 +3487,23 @@ Dieses Modul ist standardmäßig deaktiviert. Setze in deiner Konfiguration `dis
### Optionen
| Option | Standardwert | Beschreibung |
| ----------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | `"at [$time]($style) "` | The format string for the module. |
| `use_12hr` | `false` | Aktiviert die Formatierung der Uhrzeit im 12-Stunden-Format. |
| `time_format` | Siehe unten | Das Format zum Anzeigen der Uhrzeit in [chrono-Formatierung](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html). |
| `style` | `"bold yellow"` | Stil für dieses Modul. |
| `utc_time_offset` | `"local"` | Legt das UTC-Offset fest, das verwendet werden soll. Range from -24 &lt; x &lt; 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Deaktiviert das `time`-Modul. |
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
| Option | Standardwert | Beschreibung |
| ----------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `format` | `"at [$time]($style) "` | The format string for the module. |
| `use_12hr` | `false` | Aktiviert 12-Stunden-Format |
| `time_format` | siehe unten | Das Format zum Anzeigen der Uhrzeit in [chrono-Formatierung](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html). |
| `style` | `"bold yellow"` | Stil für dieses Modul |
| `utc_time_offset` | `"local"` | Verwendetes Zeitzonen-Offset. Range from -24 &lt; x &lt; 24. Allows floats to accommodate 30/45 minute timezone offsets. |
| `disabled` | `true` | Deaktiviert das `time`-Modul. |
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Ansonsten ist der Standardwert hierfür `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Andernfalls ist es standardmäßig `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
### Variables
| Variable | Beispiel | Beschreibung |
| --------- | ---------- | ------------------------------------ |
| uhrzeit | `13:08:10` | The current time. |
| zeit | `13:08:10` | The current time. |
| style\* | | Spiegelt den Wert der Option `style` |
*: This variable can only be used as a part of a style string
@ -3469,9 +3521,9 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
## Benutzername
## Username
Das Modul `username` zeigt den Benutzernamen des aktiven Benutzers. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
Das `username` Modul zeigt den Namen des aktiven Benutzers. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
- The current user is root/admin
- Der aktuelle Benutzer ist nicht derjenige, der derzeit angemeldet ist
@ -3486,13 +3538,13 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
### Optionen
| Option | Standardwert | Beschreibung |
| ------------- | ----------------------- | ------------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root/admin. |
| `style_user` | `"bold yellow"` | Stil bei allen anderen Benutzern. |
| `format` | `"[$user]($style) in "` | Das Format für das Modul. |
| `show_always` | `false` | `username`-Modul immer anzeigen. |
| `disabled` | `false` | Deaktiviert das `username`-Modul. |
| Option | Standardwert | Beschreibung |
| ------------- | ----------------------- | ---------------------------------------------- |
| `style_root` | `"bold red"` | The style used when the user is root/admin. |
| `style_user` | `"bold yellow"` | Stil wenn der Benutzer nicht unter root läuft. |
| `format` | `"[$user]($style) in "` | Das Format für das Modul. |
| `show_always` | `false` | Immer das `username` Modul anzeigen. |
| `disabled` | `false` | Deavktiviert das `username` Modul. |
### Variables
@ -3762,7 +3814,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,7 +220,6 @@ Alternatively, install Starship using any of the following package managers:
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

View File

@ -55,11 +55,10 @@ description: '¡Starship es el prompt minimalista, ultrarápido e infinitamente
```sh
brew install starship
```
Con [Scoop](https://scoop.sh):
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. Añade el guión de inicio al archivo de configuración de tu intérprete de comandos:

View File

@ -8,7 +8,7 @@ Las configuraciones de esta sección están sujetos a cambios en futuras version
:::
## TransientPrompt in PowerShell
## TransientPrompt en 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`.
@ -24,7 +24,7 @@ Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
## TransientPrompt y TransientRight Prompt en 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:
@ -45,7 +45,7 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
- Por defecto, el lado derecho de la entrada está vacío. Para personalizar esto, defina una nueva función llamada `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
function starship_transient_rprompt_func(prompt)
@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- Por defecto, el lado derecho de la entrada está vacío. Para personalizar esto, defina una nueva función llamada `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:
@ -115,7 +141,7 @@ function Invoke-Starship-PreCommand {
}
```
## Cambiar el Título de la Ventana
## Cambiar título de la ventana
Algunos intérpretes de comandos van a cambiar automáticamente el título de la ventana por ti (p. ej., para mostrar tu directorio actual). Fish incluso lo hace por defecto. Starship no hace esto, pero es bastante sencillo añadir esta funcionalidad a `bash`, `zsh`, `cmd` o `powershell`.
@ -123,7 +149,7 @@ Primero, define una función para el cambio de título de la ventana (idéntico
```bash
function set_win_title(){
echo -ne "\033]0; TU_TÍTULO_DE_VENTANA_AQUÍ \007"
echo -ne "\033]0; TU_TITULO_DE_VENTANA_AQUI \007"
}
```
@ -173,9 +199,9 @@ function Invoke-Starship-PreCommand {
Invoke-Expression (&starship init powershell)
```
## Gabilitar Prompt Derecho
## Habilitar Prompt a la Derecha
Algunos intérpretes de órdenes soportan un prompt derecho que se renderiza en la misma línea que la entrada. Starship puede establecer el contenido del prompt correcto usando la opción `right_format`. Cualquier módulo que pueda ser usado en `format` también es soportado en `right_format`. La variable `$all` solo contendrá módulos no utilizados explícitamente en `format` o `right_format`.
Algunos intérpretes de comandos soportan un prompt derecho que se renderiza en la misma línea que la entrada. Starship puede establecer el contenido del prompt derecho usando la opción `right_format`. Cualquier módulo que pueda ser usado en `format` también es soportado en `right_format`. La variable `$all` solo contendrá módulos no utilizados explícitamente en `format` o `right_format`.
Nota: El prompt derecho es una sola línea siguiendo la ubicación de entrada. Para alinear los módulos arriba de la línea de entrada en un prompt multi-línea, vea el [módulo `fill`](/config/#fill).
@ -224,13 +250,13 @@ continuation_prompt = "▶▶"
## Cadenas de Estilo
Las cadenas de estilo son una lista de palabras, separadas por espacios en blanco. Las palabras no son sensibles a mayúsculas (es decir, `negrita` y `NeGriTa` se consideran la misma cadena). Cada palabra puede ser una de las siguientes:
Las cadenas de estilo son una lista de palabras, separadas por espacios en blanco. Las palabras no son sensibles a mayúsculas (es decir, `bold` y `BoLd` se consideran la misma cadena). Cada palabra puede ser una de las siguientes:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `negrita`
- `cursiva`
- `subrayado`
- `atenuado`
- `invertido`
- `blink`
- `hidden`
- `strikethrough`
@ -241,7 +267,7 @@ Las cadenas de estilo son una lista de palabras, separadas por espacios en blanc
donde `<color>` es un especificador de color (discutido a continuación). `fg:<color>` y `<color>` hacen actualmente lo mismo, aunque esto puede cambiar en el futuro. `inverted` cambia el fondo y los colores de primer plano. El orden de las palabras en la cadena no importa.
El token `none` anula todos los demás tokens en una cadena si no es parte de un especificador `bg:`, de modo que por ejemplo `fg:red none fg:blue` creará una cadena sin ningún estilo. `bg:none` establece el fondo al color por defecto, así que `fg:red bg:none` es equivalente a `red` o `fg:red` y `bg:green fg:red bg:none` también es equivalente a `fg:red` o `red`. Puede convertirse en un error usar `none` junto con otros tokens en el futuro.
El token `none` anula todos los demás tokens en una cadena si no es parte de un especificador `bg:`, de modo que por ejemplo `fg:red none fg:blue` creará una cadena sin ningún estilo. `bg:none` establece el fondo al color por defecto, así que `fg:red bg:none` es equivalente a `red` o `fg:red` y `bg:green fg:red bg:none` también es equivalente a `fg:red` o `red`. Puede convertirse en un error usar `none` junto con otros estilos en el futuro.
Un especificador de color puede ser uno de los siguientes:

View File

@ -162,13 +162,15 @@ Esta es la lista de opciones de configuración.
### Opciones
| Opción | Predeterminado | Descripción |
| ----------------- | ------------------------------ | ------------------------------------------------------------------------------ |
| `format` | [link](#default-prompt-format) | Configura el formato del prompt. |
| `right_format` | `""` | Ver [Habilitar prompt derecho](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Tiempo de espera tras el que starship escanea archivos (en milisegundos). |
| `command_timeout` | `500` | Tiempo de espera para los comandos ejecutados por starship (en milisegundos). |
| `add_newline` | `true` | Inserta un línea en blanco entre las instrucciones del intérprete de comandos. |
| Opción | Predeterminado | Descripción |
| ----------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configura el formato del prompt. |
| `right_format` | `""` | Ver [Habilitar prompt derecho](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Tiempo de espera tras el que starship escanea archivos (en milisegundos). |
| `command_timeout` | `500` | Tiempo de espera para los comandos ejecutados por starship (en milisegundos). |
| `add_newline` | `true` | Inserta un línea en blanco entre las instrucciones del intérprete de comandos. |
| `paleta` | `""` | Establece la paleta de color de `paletas` a utilizar. |
| `paletas` | `{}` | Colección de paletas de colores que asignan [colores](/advanced-config/#style-strings) a nombres definidos por el usuario. Tenga en cuenta que las paletas de colores no pueden hacer referencia a sus propias definiciones de color. |
### Ejemplo
@ -184,8 +186,19 @@ format = """
# Espera 10 milisegundos para que starship revise los archivos del directorio actual.
scan_timeout = 10
# Deshabilita la línea en blanco al inicio del prompt
# Disable the blank line at the start of the prompt
add_newline = false
# Establece "foo" como paleta de color personalizado
as custom color palette
palette = "foo"
# Definir colores personalizados
[palettes.foo]
# Sobreescribir actual color
blue = "21"
# Definir nuevo color
mustard = "#af8700"
```
### Formato predeterminado del Prompt
@ -195,7 +208,7 @@ El `format` predeterminado se utiliza para definir el formato del prompt, si est
```toml
format = "$all"
# Lo cual es equivalente a:
# Which is equivalent to
format = """
$username\
$hostname\
@ -252,6 +265,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +445,12 @@ El valor por defecto para las opciones `charging_symbol` y `discharging_symbol`
La opción `display` es un array de la siguiente tabla.
| Opción | Por defecto | Descripción |
| -------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | El umbral para la opción de visualización. |
| `style` | `bold red` | El estilo usado cuando si la opción <0>display</0> está activa. |
| `charging_symbol` | `-` | Símbolo opcional que se muestra si la opción de visualización está en uso, por defecto en la opción `charging_symbol` de la batería. |
| `discharging_symbol` | `-` | Símbolo opcional que se muestra si la opción de visualización está en uso, por defecto en la opción `discharging_symbol` de la batería. |
| Opción | Por defecto | Descripción |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | El umbral para la opción de visualización. |
| `style` | `"red bold"` | El estilo usado cuando si la opción <0>display</0> está activa. |
| `charging_symbol` | | Símbolo opcional que se muestra si la opción de visualización está en uso, por defecto en la opción `charging_symbol` de la batería. |
| `discharging_symbol` | | Símbolo opcional que se muestra si la opción de visualización está en uso, por defecto en la opción `discharging_symbol` de la batería. |
#### Ejemplo
@ -462,24 +476,24 @@ El módulo `buf` muestra la versión instalada de [Buf](https://buf.build). Por
### Opciones
| Opción | Por defecto | Descripción |
| ------------------- | ------------------------------------------------------------ | ---------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | El formato para el módulo `buf`. |
| `version_format` | `"v${raw}"` | El formato de versión. |
| `symbol` | `"🦬 "` | El símbolo usado antes de mostrar la versión de Buf. |
| `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. |
| `style` | `"bold blue"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `elixir`. |
| Opción | Por defecto | Descripción |
| ------------------- | ----------------------------------------------- | ---------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | El formato para el módulo `buf`. |
| `version_format` | `"v${raw}"` | El formato de versión. |
| `symbol` | `"🦬 "` | El símbolo usado antes de mostrar la versión de Buf. |
| `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. |
| `style` | `"bold blue"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `elixir`. |
### Variables
| Variable | Ejemplo | Descripción |
| ------------- | -------- | -------------------------------------- |
| `buf_version` | `v1.0.0` | La versión de `buf` |
| `symbol` | | Refleja el valor de la opción `symbol` |
| `style`* | | Refleja el valor de la opción `style` |
| Variable | Ejemplo | Descripción |
| --------- | -------- | -------------------------------------- |
| `version` | `v1.0.0` | La versión de `buf` |
| `symbol` | | Refleja el valor de la opción `symbol` |
| `style`* | | Refleja el valor de la opción `style` |
*: Esta variable sólo puede ser usada como parte de una cadena de estilo
@ -609,9 +623,9 @@ Por defecto sólo cambia el color. Si también se quiere cambiar su forma, ver [
### Variables
| Variable | Ejemplo | Descripción |
| -------- | ------- | -------------------------------------------------------------- |
| symbol | | Un espejo de `success_symbol`, `error_symbol` o `vicmd_symbol` |
| Variable | Ejemplo | Descripción |
| -------- | ------- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Ejemplos
@ -794,12 +808,12 @@ El módulo `container` muestra el símbolo y nombre del contenedor, si está den
### Opciones
| Opción | Por defecto | Descripción |
| ---------- | -------------------------------------- | ---------------------------------------------------------------- |
| `symbol` | `"⬢"` | El símbolo mostrado, cuando se encuentra dentro de un contenedor |
| `style` | `"bold red dimmed"` | El estilo del módulo. |
| `format` | `"[$symbol \\[$name\\]]($style) "` | El formato del módulo. |
| `disabled` | `false` | Deshabilita el módulo `container`. |
| Opción | Por defecto | Descripción |
| ---------- | ---------------------------------- | ---------------------------------------------------------------- |
| `symbol` | `"⬢"` | El símbolo mostrado, cuando se encuentra dentro de un contenedor |
| `style` | `"bold red dimmed"` | El estilo del módulo. |
| `format` | `'[$symbol \[$name\]]($style) '` | El formato del módulo. |
| `disabled` | `false` | Deshabilita el módulo `container`. |
### Variables
@ -817,7 +831,7 @@ El módulo `container` muestra el símbolo y nombre del contenedor, si está den
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +881,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Opciones
| Opción | Predeterminado | Descripción |
| ------------------- | ---------------------------------- | --------------------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | El formato del módulo. |
| `version_format` | `v${raw}` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | El estilo del módulo. |
| `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. |
| `detect_files` | `["daml.yaml"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
| `disabled` | `false` | Deshabilita el módulo `daml`. |
| Opción | Predeterminado | Descripción |
| ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. |
| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | El estilo del módulo. |
| `detect_extensions` | `[]` | Qué extensiones deberían activar este módulo. |
| `detect_files` | `["daml.yaml"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
| `disabled` | `false` | Deshabilita el módulo `daml`. |
### Variables
@ -993,7 +1007,7 @@ Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repos
| `read_only` | `"🔒"` | El símbolo que indica si el directorio actual es de sólo lectura. |
| `read_only_style` | `"red"` | El estilo para el símbolo de sólo lectura. |
| `truncation_symbol` | `""` | El símbolo a prefijar a las rutas truncadas. ej: "…/" |
| `repo_root_style` | `None` | El estilo para la raíz del repositorio de git. El valor por defecto es equivalente al `style`. |
| `repo_root_style` | | El estilo para la raíz del repositorio de git. El valor por defecto es equivalente al `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | El formato de un repositorio de git cuando `repo_root_style` está definido. |
| `home_symbol` | `"~"` | El símbolo que indica el directorio personal. |
| `use_os_path_sep` | `true` | Utiliza el separador de ruta del sistema operativo específico en lugar de usar siempre `/` (por ejemplo, `\` en Windows) |
@ -1480,16 +1494,16 @@ El módulo `git_commit` muestra el hash de la confirmación actual y también la
### Opciones
| Opción | Predeterminado | Descripción |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | La longitud del hash del commit de git mostrado. |
| `format` | `"[\\($hash$tag\\)]($style) "` | El formato del módulo. |
| `style` | `"bold green"` | El estilo del módulo. |
| `only_detached` | `true` | Mostrar solo el hash de la confirmación de git cuando esté en estado "detached `HEAD`" |
| `tag_disabled` | `true` | Deshabilita mostrar información de etiquetas en el módulo `git_commit`. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. El valor por defecto sólo permite coincidencias exactas. |
| `tag_symbol` | `" 🏷 "` | Símbolo de etiqueta prefijando la información mostrada |
| `disabled` | `false` | Deshabilita el módulo `git_commit`. |
| Opción | Predeterminado | Descripción |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | La longitud del hash del commit de git mostrado. |
| `format` | `'[\($hash$tag\)]($style) '` | El formato del módulo. |
| `style` | `"bold green"` | El estilo del módulo. |
| `only_detached` | `true` | Mostrar solo el hash de la confirmación de git cuando esté en estado "detached `HEAD`" |
| `tag_disabled` | `true` | Deshabilita mostrar información de etiquetas en el módulo `git_commit`. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. El valor por defecto sólo permite coincidencias exactas. |
| `tag_symbol` | `" 🏷 "` | Símbolo de etiqueta prefijando la información mostrada |
| `disabled` | `false` | Deshabilita el módulo `git_commit`. |
### Variables
@ -1567,7 +1581,7 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
| `added_style` | `"bold green"` | El estilo para el recuento añadido. |
| `deleted_style` | `"bold red"` | El estilo para el recuento eliminado. |
| `only_nonzero_diffs` | `true` | Mostrar sólo el estado de los elementos cambiados. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | El formato del módulo. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | El formato del módulo. |
| `disabled` | `true` | Deshabilita el módulo `git_metrics`. |
### Variables
@ -1588,7 +1602,7 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git status
@ -1690,7 +1704,7 @@ Usar el ejecutable de Starship de Windows en las rutas de Windows en WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1866,21 @@ disabled = false
El módulo `java` muestra la versión instalada de [Java](https://www.oracle.com/java/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones:
- El directorio actual contiene un archivo `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, o `build.boot`
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- El directorio actual contiene un archivo con la extensión `.java`, `.class`, `.gradle` o `.jar`, `.clj` o `.cljc`
### Opciones
| Opción | Por defecto | Descripción |
| ------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | El formato del módulo. |
| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Qué extensiones deberían activar este módulo. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. |
| `symbol` | `"☕ "` | Una cadena de formato que representa el símbolo de Java |
| `style` | `"red dimmed"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `java`. |
| Opción | Por defecto | Descripción |
| ------------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | El formato del módulo. |
| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Qué extensiones deberían activar este módulo. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar estos módulos. |
| `symbol` | `"☕ "` | Una cadena de formato que representa el símbolo de Java |
| `style` | `"red dimmed"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `java`. |
### Variables
@ -2258,9 +2272,48 @@ symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
## Meson
El módulo `hg_branch` muestra la rama activa del repositorio en su directorio actual.
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Opciones
| Opción | Por defecto | Descripción |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. Puedes usar `""` para ningún símbolo. |
| `format` | `"via [$symbol$project]($style) "` | El formato del módulo. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | El estilo del módulo. |
| `disabled` | `false` | Disables the `meson` module. |
### Variables
| Variable | Ejemplo | Descripción |
| --------- | ---------- | -------------------------------------- |
| project | `starship` | El nombre actual del proyecto Meson |
| symbol | `🐏` | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
*: Esta variable sólo puede ser usada como parte de una cadena de estilo
### Ejemplo
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Rama Mercurial
El módulo `hg_branch` muestra la rama activa del repositorio del directorio actual.
### Opciones
@ -2271,13 +2324,13 @@ El módulo `hg_branch` muestra la rama activa del repositorio en su directorio a
| `format` | `"on [$symbol$branch]($style) "` | El formato del módulo. |
| `truncation_length` | `2^63 - 1` | Trunca el nombre de la rama hg a `N` grafemas |
| `truncation_symbol` | `"…"` | El símbolo usado para indicar que un nombre de rama fue truncado. |
| `disabled` | `true` | Desactiva el módulo `hg_branch`. |
| `disabled` | `true` | Deshabilita el módulo `hg_branch`. |
### Variables
| Variable | Ejemplo | Descripción |
| --------- | -------- | -------------------------------------- |
| branch | `master` | La rama de mercurial activa |
| branch | `master` | La rama mercurial activa |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
@ -2314,7 +2367,7 @@ El módulo `nim` muestra la versión instalada de [Nim](https://nim-lang.org/).
| `detect_files` | `["nim.cfg"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
| `style` | `"bold yellow"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `nim`. |
| `disabled` | `false` | Deshabilita el módulo `nim`. |
### Variables
@ -2396,7 +2449,7 @@ El módulo `nodejs` muestra la versión instalada de [Node.js](https://nodejs.or
| `detect_files` | `["package.json", ".node-version"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `["node_modules"]` | Qué carpetas deberían activar este módulo. |
| `style` | `"bold green"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `nodejs`. |
| `disabled` | `false` | Deshabilita el módulo `nodejs`. |
| `not_capable_style` | `bold red` | El estilo para el módulo cuando una propiedad de motores en package.json no coincide con la versión de Node.js. |
### Variables
@ -2418,7 +2471,7 @@ El módulo `nodejs` muestra la versión instalada de [Node.js](https://nodejs.or
format = "via [🤖 $version](bold green) "
```
## OCaml
## OCamlz
El módulo `ocaml` muestra la versión instalada de [OCaml](https://ocaml.org/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones:
@ -2442,7 +2495,7 @@ El módulo `ocaml` muestra la versión instalada de [OCaml](https://ocaml.org/).
| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `["_opam", "esy.lock"]` | Qué carpetas deberían activar este módulo. |
| `style` | `"bold yellow"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `ocaml`. |
| `disabled` | `false` | Deshabilita el módulo `ocaml`. |
### Variables
@ -2467,23 +2520,23 @@ format = "via [🐪 $version]($style) "
## OpenStack
El módulo `openstack` muestra la nube OpenStack actual y el proyecto. El módulo solo está activo cuando la variable env `OS_CLOUD` está definida en cuyo caso leerá el archivo `nubes. aml` desde cualquiera de las [ubicaciones por defecto](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files) para obtener el proyecto actual en uso.
El módulo `openstack` muestra la nube actual y el proyecto OpenStack. El módulo solo está activo cuando la variable de entorno `OS_CLOUD` está definida, en cuyo caso leerá el archivo `clouds.yaml` desde cualquiera de las [ubicaciones por defecto](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files). para obtener el proyecto actual en uso.
### Opciones
| Opción | Por defecto | Descripción |
| ---------- | --------------------------------------------------- | ----------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | El formato del módulo. |
| `symbol` | `"☁️ "` | El símbolo usado antes de mostrar la nube OpenStack actual. |
| `style` | `"bold yellow"` | El estilo del módulo. |
| `disabled` | `false` | Deshabilita el módulo `openstack`. |
| Opción | Por defecto | Descripción |
| ---------- | ----------------------------------------------- | ----------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | El formato del módulo. |
| `symbol` | `"☁️ "` | El símbolo usado antes de mostrar la nube OpenStack actual. |
| `style` | `"bold yellow"` | El estilo del módulo. |
| `disabled` | `false` | Deshabilita el módulo `openstack`. |
### Variables
| Variable | Ejemplo | Descripción |
| --------- | ------- | -------------------------------------- |
| cloud | `corp` | La nube OpenStack actual |
| project | `dev` | El proyecto OpenStack actual |
| nube | `corp` | La nube OpenStack actual |
| project | `dev` | El actual proyecto OpenStack |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
@ -2495,12 +2548,12 @@ El módulo `openstack` muestra la nube OpenStack actual y el proyecto. El módul
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
## Versión del paquete
## Package Version
El módulo `package` se muestra cuando el directorio actual es el repositorio de un paquete, y muestra su versión actual. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart` packages.
@ -2575,7 +2628,7 @@ El módulo `perl` muestra la versión instalada de [Perl](https://www.perl.org/)
| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
| `style` | `"bold 149"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `perl`. |
| `disabled` | `false` | Deshabilita el módulo `perl`. |
### Variables
@ -2613,7 +2666,7 @@ El módulo `php` muestra la versión instalada de [PHP](https://www.php.net/). P
| `detect_files` | `["composer.json", ".php-version"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
| `style` | `"147 bold"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `php`. |
| `disabled` | `false` | Deshabilita el módulo `php`. |
### Variables
@ -2662,13 +2715,13 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes
### Variables
| Variable | Ejemplo | Descripción |
| ----------------- | ---------- | -------------------------------------- |
| version | `v0.12.24` | La versión de `pulumi` |
| stack | `dev` | La pila actual de Pulumi |
| nombre de usuario | `alice` | El usuario actual de Pulumi |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
| Variable | Ejemplo | Descripción |
| --------- | ---------- | -------------------------------------- |
| version | `v0.12.24` | La versión de `pulumi` |
| stack | `dev` | La pila actual de Pulumi |
| username | `alice` | El usuario actual de Pulumi |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
*: Esta variable sólo puede ser usada como parte de una cadena de estilo
@ -2710,7 +2763,7 @@ El módulo `purescript` muestra la versión instalada de [PureScript](https://ww
| `detect_files` | `["spago.dhall"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
| `style` | `"bold white"` | El estilo del módulo. |
| `disabled` | `false` | Deshabilita el módulo `purescript`. |
| `disabled` | `false` | Desactiva el módulo `purescript`. |
### Variables
@ -2763,25 +2816,25 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes
| `detect_extensions` | `["py"]` | Qué extensiones deben activar este módulo |
| `detect_files` | `[".python-version", "Pipfile", "__init__.py", "pyproject.toml", "requirements.txt", "setup.py", "tox.ini"]` | Qué nombres de archivo deben activar este módulo |
| `detect_folders` | `[]` | Qué carpetas deben activar este módulo |
| `disabled` | `false` | Desactiva el módulo `python`. |
| `disabled` | `false` | Deshabilita el módulo `python`. |
::: tip
La variable `python_binary` acepta una cadena o una lista de cadenas. Starship intentará ejecutar cada binario hasta que obtenga un resultado. Ten en cuenta que sólo puedes cambiar el binario que Starship ejecuta para obtener la versión de Python no los argumentos que se utilizan.
La variable `python_binary` acepta una cadena o una lista de cadenas. La Starship intentará ejecutar cada binario hasta que obtenga un resultado. Ten en cuenta que sólo puedes cambiar el binario que Starship ejecuta para obtener la versión de Python no los argumentos que se utilizan.
Los valores por defecto y el orden para `python_binary` fue elegido para identificar primero la versión de Python en un entorno virtualenv/conda (que actualmente añade un `python`, no importa si apunta a `pithon3` o `pithon2`). Esto tiene el efecto secundario que si todavía tienes un sistema de Python 2 instalado, puede ser recogido antes de cualquier Python 3 (al menos en las Distros de Linux que siempre enlazan `/usr/bin/python` a Python 2). Si ya no trabajas con Python 2 pero no puedes removerlo del sistema, cambiando esto a `"python3"` ocultará cualquier versión de Python 2, ver ejemplo a continuación.
Los valores por defecto y el orden para `python_binary` fue elegido para identificar primero la versión de Python en un entorno virtualenv/conda (que actualmente añade un `python`, no importa si apunta a `python3` o `python2`). Esto tiene el efecto secundario que si todavía tienes un sistema de Python 2 instalado, puede ser recogido antes de cualquier Python 3 (al menos en las Distros de Linux que siempre enlazan `/usr/bin/python` a Python 2). Si ya no trabajas con Python 2 pero no puedes removerlo del sistema, cambiando esto a `"python3"` ocultará cualquier versión de Python 2, ver ejemplo a continuación.
:::
### Variables
| Variable | Ejemplo | Descripción |
| ------------ | --------------- | ------------------------------------------- |
| version | `"v3.8.1"` | La versión de `python` |
| symbol | `"🐍 "` | Refleja el valor de la opción `symbol` |
| style | `"yellow bold"` | Refleja el valor de la opción `style` |
| pyenv_prefix | `"pyenv "` | Ordena el valor de la opción `pyenv_prefix` |
| virtualenv | `"venv"` | El nombre actual del `virtualenv` |
| Variable | Ejemplo | Descripción |
| ------------ | --------------- | -------------------------------------------- |
| version | `"v3.8.1"` | La versión de `python` |
| symbol | `"🐍 "` | Refleja el valor de la opción `symbol` |
| style | `"yellow bold"` | Refleja el valor de la opción `style` |
| pyenv_prefix | `"pyenv "` | Refleja el valor de la opción `pyenv_prefix` |
| virtualenv | `"venv"` | El nombre actual del `virtualenv` |
### Ejemplo
@ -2859,7 +2912,7 @@ El módulo `rlang` muestra la versión instalada de [R](https://www.r-project.or
# ~/.config/starship.toml
[rlang]
format = "with [📐 $version](blue bold) "
format = "con [📐 $version](blue bold) "
```
## Raku
@ -2917,7 +2970,7 @@ Por defecto, el módulo `red` muestra la versión actualmente instalada de [Red]
| `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
| `style` | `"red bold"` | El estilo del módulo. |
| `disabled` | `false` | Deshabilita el módulo `rojo`. |
| `disabled` | `false` | Deshabilita el módulo `red`. |
### Variables
@ -2961,7 +3014,7 @@ Starship obtiene la versión actual de Ruby ejecutando `ruby -v`.
| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
| `detect_variables` | `["RUBY_VERSION", "RBENV_VERSION"]` | Qué variables de entorno deben activar este módulo. |
| `style` | `"bold red"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `ruby`. |
| `disabled` | `false` | Deshabilita el módulo `ruby`. |
### Variables
@ -3000,7 +3053,7 @@ Por defecto, el módulo `rust` muestra la versión instalada de [Rust](https://w
| `detect_files` | `["Cargo.toml"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
| `style` | `"bold red"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `rust`. |
| `disabled` | `false` | Deshabilita el módulo `rust`. |
### Variables
@ -3075,29 +3128,29 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
### Opciones
| Opción | Por defecto | Descripción |
| ---------------------- | ------------------------- | -------------------------------------------------------------------- |
| `bash_indicator` | `bsh` | Una cadena de formato usada para representar Bash. |
| `fish_indicator` | `fsh` | Una cadena de formato usada para representar Fish. |
| `zsh_indicator` | `zsh` | Una cadena de formato usada para representar Zsh. |
| `powershell_indicator` | `psh` | Una cadena de formato usada para representar Powershell. |
| `ion_indicator` | `ion` | Una cadena de formato usada para representar Ion. |
| `elvish_indicator` | `esh` | Una cadena de formato usada para representar Elvish. |
| `tcsh_indicator` | `tsh` | Una cadena de formato usada para representar tcsh. |
| `xonsh_indicator` | `xsh` | Una cadena de formato usada para representar xonsh. |
| `cmd_indicator` | `cmd` | Una cadena de formato usada para representar cmd. |
| `nu_indicator` | `nu` | Una cadena de formato usada para representar nu. |
| `unknown_indicator` | | El valor por defecto que se mostrará cuando se desconoce el comando. |
| `format` | `"[$indicator]($style) "` | El formato del módulo. |
| `style` | `"white bold"` | El estilo del módulo. |
| `disabled` | `true` | Deshabilita el módulo `shell`. |
| Opción | Por defecto | Descripción |
| ---------------------- | ------------------------- | ----------------------------------------------------------------------- |
| `bash_indicator` | `"bsh"` | Una cadena de formato usada para representar bash. |
| `fish_indicator` | `"fsh"` | Una cadena de formato usada para representar fish. |
| `zsh_indicator` | `"zsh"` | Una cadena de formato usada para representar zsh. |
| `powershell_indicator` | `"psh"` | Una cadena de formato usada para representar powershell. |
| `ion_indicator` | `"ion"` | Una cadena de formato usada para representar ion. |
| `elvish_indicator` | `"esh"` | Una cadena de formato usada para representar elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | Una cadena de formato usada para representar xonsh. |
| `cmd_indicator` | `"cmd"` | Una cadena de formato usada para representar cmd. |
| `nu_indicator` | `"nu"` | Una cadena de formato usada para representar nu. |
| `unknown_indicator` | | El valor por defecto que se mostrará cuando se desconoce el intérprete. |
| `format` | `"[$indicator]($style) "` | El formato del módulo. |
| `style` | `"white bold"` | El estilo del módulo. |
| `disabled` | `true` | Deshabilita el módulo `shell`. |
### Variables
| Variable | Predeterminado | Descripción |
| --------- | -------------- | ------------------------------------------------------------------------------------ |
| indicator | | Ordena el valor de `indicator` para el intérprete de comandos actualmente utilizado. |
| style\* | | Refleja el valor de la opción `style`. |
| Variable | Predeterminado | Descripción |
| --------- | -------------- | ------------------------------------------------------------------------------------- |
| indicador | | Refleja el valor de `indicator` para el intérprete de comandos actualmente utilizado. |
| style\* | | Refleja el valor de la opción `style`. |
*: Esta variable sólo puede ser usada como parte de una cadena de estilo
@ -3122,12 +3175,12 @@ El módulo `shlvl` muestra la variable de entorno [`SHLVL`](https://tldp.org/LDP
| Opción | Por defecto | Descripción |
| ----------- | ---------------------------- | ----------------------------------------------------------------- |
| `threshold` | `2` | Mostrar umbral. |
| `threshold` | `2` | Mostrar el umbral. |
| `format` | `"[$symbol$shlvl]($style) "` | El formato del módulo. |
| `symbol` | `"↕️ "` | El símbolo utilizado para representar el `SHLVL`. |
| `repeat` | `false` | Hace que el `symbol` se repita con la cantidad actual de `SHLVL`. |
| `repetir` | `false` | Hace que el `symbol` se repita con la cantidad actual de `SHLVL`. |
| `style` | `"bold yellow"` | El estilo del módulo. |
| `disabled` | `true` | Desactiva el módulo `shlvl`. |
| `disabled` | `true` | Deshabilita el módulo `shlvl`. |
### Variables
@ -3146,7 +3199,7 @@ El módulo `shlvl` muestra la variable de entorno [`SHLVL`](https://tldp.org/LDP
[shlvl]
disabled = false
format = "$shlvl level(s) down"
format = "$shlvl nivel(es) abajo"
threshold = 3
```
@ -3161,7 +3214,7 @@ El módulo `singularity` muestra la imagen de [singularity](https://sylabs.io/si
| `format` | `'[$symbol\[$env\]]($style) '` | El formato del módulo. |
| `symbol` | `""` | Una cadena de formato que se muestra antes del nombre de la imagen. |
| `style` | `"bold dimmed blue"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `singularity`. |
| `disabled` | `false` | Deshabilita el módulo de `singularity`. |
### Variables
@ -3215,7 +3268,7 @@ El módulo `spack` muestra el entorno actual [Spack](https://spack.readthedocs.i
format = "[$symbol$environment](dimmed blue) "
```
## Status
## Estado
El módulo `status` muestra el código de salida del comando anterior. Si $success_symbol está vacío (por defecto), el módulo solo se mostrará si el código de salida no es `0`. El código de estado se convertirá a un entero con signo de 32 bits.
@ -3227,33 +3280,33 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
### Opciones
| Opción | Por defecto | Descripción |
| --------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `format` | `"[$symbol$status]($style) "` | El formato del módulo |
| `symbol` | `"✖"` | El símbolo mostrado en error del programa |
| `success_symbol` | `""` | El símbolo mostrado en el éxito del programa |
| `not_executable_symbol` | `"🚫"` | El símbolo mostrado cuando el archivo no es ejecutable |
| `not_found_symbol` | `"🔍"` | El símbolo mostrado cuando no se encuentra el comando |
| `sigint_symbol` | `"🧱"` | El símbolo mostrado en SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | El símbolo mostrado en cualquier señal |
| `style` | `"bold red"` | El estilo del módulo. |
| `recognize_signal_code` | `true` | Activar mapeo de señales desde el código de salida |
| `map_symbol` | `false` | Activar mapeo de símbolos desde el código de salida |
| `pipestatus` | `false` | Habilita el reporte de pipstatus |
| `pipestatus_separator` | <code>&vert;</code> | El símbolo usado para separar segmentos de pipestatus |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | El formato del módulo cuando el comando es un pipeline |
| `pipestatus_segment_format` | | Cuando se especifica, reemplaza `formato` al formatear segmentos de pipestatus |
| `disabled` | `true` | Desactiva el módulo `status`. |
| Opción | Por defecto | Descripción |
| --------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| `format` | `"[$symbol$status]($style) "` | El formato del módulo |
| `symbol` | `"✖"` | El símbolo mostrado en el error del programa |
| `success_symbol` | `""` | El símbolo mostrado en el éxito del programa |
| `not_executable_symbol` | `"🚫"` | El símbolo mostrado cuando el archivo no es ejecutable |
| `not_found_symbol` | `"🔍"` | El símbolo mostrado cuando no se encuentra el comando |
| `sigint_symbol` | `"🧱"` | El símbolo mostrado en SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | El símbolo mostrado en cualquier señal |
| `style` | `"bold red"` | El estilo del módulo. |
| `recognize_signal_code` | `true` | Habilita el mapeo de señales desde el código de salida |
| `map_symbol` | `false` | Habilita el mapeo de símbolos desde el código de salida |
| `pipestatus` | `false` | Habilita el reporte de pipstatus |
| `pipestatus_separator` | <code>&vert;</code> | El símbolo usado para separar segmentos de pipestatus (soporta formato) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | El formato del módulo cuando el comando es un pipeline |
| `pipestatus_segment_format` | | Cuando se especifica, reemplaza `formato` al formatear segmentos de pipestatus |
| `disabled` | `true` | Deshabilita el módulo `status`. |
### Variables
| Variable | Ejemplo | Descripción |
| -------------- | ------- | ------------------------------------------------------------------------------------------------------------------ |
| status | `127` | El código de salida del último comando |
| estado | `127` | El código de salida del último comando |
| hex_status | `0x7F` | El código de salida del último comando en hexadecimal |
| int | `127` | El código de salida del último comando |
| common_meaning | `ERROR` | Comprobación del código si no es una señal |
| signal_number | `9` | Número de señal correspondiente al código de salida, sólo si está señalizada |
| signal_number | `9` | Número de señal correspondiente al código de salida, sólo si está señalizado |
| signal_name | `KILL` | Nombre de la señal correspondiente al código de salida, sólo si está señalizada |
| maybe_int | `7` | Contiene el número de código de salida cuando no se ha encontrado ningún significado |
| pipestatus | | Renderizado en los códigos de salida de los programas del pipeline, esto sólo está disponible en pipestatus_format |
@ -3288,13 +3341,13 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
### Opciones
| Opción | Por defecto | Descripción |
| --------------- | ----------------------- | ------------------------------------------------------------------------------------------------ |
| `format` | `[as $symbol]($style)"` | El formato del módulo |
| `symbol` | `"🧙 "` | El símbolo mostrado cuando las credenciales están guardadas en caché |
| `style` | `"bold blue"` | El estilo del módulo. |
| `allow_windows` | `false` | Como Windows no tiene sudo de manera predeterminada, el valor predeterminado está deshabilitado. |
| `disabled` | `true` | Deshabilita el módulo `sudo`. |
| Opción | Por defecto | Descripción |
| --------------- | ------------------------ | -------------------------------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | El formato del módulo |
| `symbol` | `"🧙 "` | El símbolo mostrado cuando las credenciales se almacenan en caché |
| `style` | `"bold blue"` | El estilo del módulo. |
| `allow_windows` | `false` | Como Windows no tiene sudo por defecto, el valor por defecto está deshabilitado. |
| `disabled` | `true` | Deshabilita el módulo `sudo`. |
### Variables
@ -3317,7 +3370,7 @@ disabled = false
```
```toml
# On windows
# En Windows
# $HOME\.starship\config.toml
[sudo]
@ -3343,7 +3396,7 @@ Por defecto, el módulo `swift` muestra la versión instalada de [Swift](https:/
| `detect_files` | `["Package.swift"]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
| `style` | `"bold 202"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `swift`. |
| `disabled` | `false` | Deshabilita el módulo `swift`. |
### Variables
@ -3366,11 +3419,11 @@ format = "via [🏎 $version](red bold)"
## Terraform
El módulo `Terraform` muestra el espacio de trabajo de [Terraform](https://www.terraform.io/docs/language/state/workspaces.html) y la versión seleccionados actualmente.
El módulo `Terraform` muestra el [espacio de trabajo de Terraform](https://www.terraform.io/docs/language/state/workspaces.html) y la versión seleccionados actualmente.
::: tip
Por defecto no se muestra la versión de Terraform, ya que esto es lento para las versiones actuales de Terraform cuando hay muchos complementos en uso. Si aún deseas activarlo, [sigue el ejemplo que se muestra a continuación](#with-terraform-version).
Por defecto no se muestra la versión de Terraform, ya que esto es lento para las versiones actuales de Terraform cuando hay muchos plugins en uso. Si aún deseas activarlo, [sigue el ejemplo que se muestra a continuación](#with-terraform-version).
:::
@ -3381,25 +3434,25 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes
### Opciones
| Opción | Por defecto | Descripción |
| Opción | Predeterminado | Descripción |
| ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol$workspace]($style) "` | La cadena de formato para el módulo. |
| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"💠"` | Una cadena de formato que se muestra antes del espacio de trabajo de terraform. |
| `symbol` | `"💠"` | Una cadena de formato que se muestra antes del espacio de trabajo terraform. |
| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Qué extensiones deberían activar este módulo. |
| `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[".terraform"]` | Qué carpetas deberían activar este módulo. |
| `style` | `"bold 105"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `terraform`. |
| `disabled` | `false` | Deshabilita el módulo `terraform`. |
### Variables
| Variable | Ejemplo | Descripción |
| --------- | ---------- | ----------------------------------------- |
| version | `v0.12.24` | La versión de `terraform` |
| workspace | `default` | El espacio de trabajo actual de Terraform |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
| Variable | Ejemplo | Descripción |
| --------------- | ---------- | ----------------------------------------- |
| version | `v0.12.24` | La versión de `terraform` |
| área de trabajo | `default` | El espacio de trabajo actual de Terraform |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | | Refleja el valor de la opción `style` |
*: Esta variable sólo puede ser usada como parte de una cadena de estilo
@ -3425,7 +3478,7 @@ format = "[🏎💨 $workspace]($style) "
## Hora
El módulo `time` muestra la hora **local** actual. El valor de configuración de `format` es usado por la caja de [`chrono`](https://crates.io/crates/chrono) para controlar cómo se muestra la hora. Echa un vistazo a [los documentos de chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) para ver qué opciones están disponibles.
El módulo `time` muestra la hora **local** actual. El valor de configuración de `format` es usado por el crate de [`chrono`](https://crates.io/crates/chrono) para controlar cómo se muestra la hora. Echa un vistazo a [los documentos de chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) para ver qué opciones están disponibles.
::: tip
@ -3439,19 +3492,19 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
| ----------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | `"at [$time]($style) "` | La cadena de formato para el módulo. |
| `use_12hr` | `false` | Habilita el formato de 12 horas |
| `time_format` | see below | La [cadena de formato de chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) utilizada para formatear la hora. |
| `style` | `"bold yellow"` | El estilo para la hora del módulo |
| `time_format` | see below | La [cadena de formato de chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) utilizada para dar formato a la hora. |
| `style` | `"bold yellow"` | El estilo para el módulo de time |
| `utc_time_offset` | `"local"` | Establece el desplazamiento UTC a utilizar. Rango de -24 &lt; x &lt; 24. Permite a los flotantes acomodar los desplazamientos de zona horaria de 30/45 minutos. |
| `disabled` | `true` | Desactiva el módulo `time`. |
| `time_range` | `"-"` | Establece el intervalo de tiempo durante el cual el módulo se mostrará. La hora debe ser especificada en formato de 24 horas |
| `disabled` | `true` | Deshabilita el módulo `time`. |
| `time_range` | `"-"` | Establece el intervalo de tiempo durante el cual se mostrará el módulo. Las horas deben especificarse en formato de 24 horas |
Si `use_12hr` es `true`, entonces `time_format` por defecto `"%r"`. De lo contrario, el valor por defecto es `"%T"`. Configurar manualmente `time_format` sobrescribirá la configuración `use_12hr`.
Si `use_12hr` es `true`, entonces `time_format` por defecto es `"%r"`. De lo contrario, el valor por defecto es `"%T"`. Configurar manualmente `time_format` sobrescribirá la configuración `use_12hr`.
### Variables
| Variable | Ejemplo | Descripción |
| --------- | ---------- | ------------------------------------- |
| time | `13:08:10` | La hora actual. |
| tiempo | `13:08:10` | La hora actual. |
| style\* | | Refleja el valor de la opción `style` |
*: Esta variable sólo puede ser usada como parte de una cadena de estilo
@ -3469,7 +3522,7 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
## Nombre de usuario
## Username
El módulo `username` muestra el nombre de usuario activo. El módulo se muestra si algunas de las siguientes condiciones se cumplen:
@ -3480,7 +3533,7 @@ El módulo `username` muestra el nombre de usuario activo. El módulo se muestra
::: tip
La conexión SSH se detecta comprobando las variables de entorno `SSH_CONNECTION`, `SSH_CLIENT`, y `SSH_TTY`. Si su host SSH no configura estas variables, una solución es establecer una de ellas con un valor tonto.
La conexión SSH se detecta comprobando las variables de entorno `SSH_CONNECTION`, `SSH_CLIENT`, y `SSH_TTY`. Si tu host SSH no configura estas variables, una solución es establecer una de ellas con un valor tonto.
:::
@ -3492,7 +3545,7 @@ La conexión SSH se detecta comprobando las variables de entorno `SSH_CONNECTION
| `style_user` | `"bold yellow"` | El estilo usado para usuarios no root. |
| `format` | `"[$user]($style) in "` | El formato del módulo. |
| `show_always` | `false` | Siempre muestra el módulo `username`. |
| `disabled` | `false` | Desactiva el módulo `username`. |
| `disabled` | `false` | Deshabilita el módulo `username`. |
### Variables
@ -3585,7 +3638,7 @@ El módulo `vlang` te muestra la versión instalada de [V](https://vlang.io/). P
```toml
# ~/.config/starship.toml
[vlang]
format = "via [V $version](blue bold) "
format = "vía [V $version](blue bold) "
```
## VCSH
@ -3603,11 +3656,11 @@ El módulo `vcsh` muestra el repositorio activo [VCSH](https://github.com/RichiH
### Variables
| Variable | Ejemplo | Descripción |
| ----------- | ----------------------------------------------------------- | -------------------------------------- |
| repositorio | `dotfiles` si está en un repositorio VCSH nombrado dotfiles | El nombre del repositorio activo |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | `black bold dimmed` | Refleja el valor de la opción `style` |
| Variable | Ejemplo | Descripción |
| --------- | ----------------------------------------------------------- | -------------------------------------- |
| repo | `dotfiles` si está en un repositorio VCSH nombrado dotfiles | El nombre del repositorio activo |
| symbol | | Refleja el valor de la opción `symbol` |
| style\* | `black bold dimmed` | Refleja el valor de la opción `style` |
*: Esta variable sólo puede ser usada como parte de una cadena de estilo
@ -3634,7 +3687,7 @@ Por defecto, el módulo `zig` muestra la versión instalada de [Zig](https://zig
| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"↯ "` | El símbolo usado antes de mostrar la versión de Zig. |
| `style` | `"bold yellow"` | El estilo del módulo. |
| `disabled` | `false` | Desactiva el módulo `zig`. |
| `disabled` | `false` | Deshabilita el módulo `zig`. |
| `detect_extensions` | `["zig"]` | Qué extensiones deberían activar este módulo. |
| `detect_files` | `[]` | Qué nombres de archivo deberían activar este módulo. |
| `detect_folders` | `[]` | Qué carpetas deberían activar este módulo. |
@ -3662,7 +3715,7 @@ symbol = "⚡️ "
Los módulos `personalizados` muestran la salida de algunos comandos arbitrarios.
Estos módulos se mostrarán si se cumplen alguna de las siguientes condiciones:
Estos módulos se mostrarán si se cumple alguna de las siguientes condiciones:
- El directorio actual contiene un archivo cuyo nombre está en `detect_files`
- El directorio actual contiene un directorio cuyo nombre está en `detect_folders`
@ -3672,19 +3725,19 @@ Estos módulos se mostrarán si se cumplen alguna de las siguientes condiciones:
::: tip
Múltiples módulos personalizados pueden definirse usando una `.`.
Múltiples módulos personalizados pueden definirse usando un `.` (un punto).
:::
::: tip
El orden en el que se muestran los módulos personalizados se puede establecer individualmente incluyendo `${custom.foo}` en el `format` de nivel superior (ya que incluye un punto, necesita usar `${...}`). Por defecto, el módulo `custom` simplemente mostrará todos los módulos personalizados en el orden en que fueron definidos.
El orden en el que se muestran los módulos personalizados se puede establecer individualmente incluyendo `${custom.foo}` en el `format` de nivel superior (ya que incluye un punto, necesita usar `${...}`). Por defecto, el módulo `personalizado` simplemente mostrará todos los módulos personalizados en el orden en que fueron definidos.
:::
::: tip
[El issue #1252](https://github.com/starship/starship/discussions/1252) contiene ejemplos de módulos personalizados. Si tiene un ejemplo interesante no cubierto allí, no dude en compartirlo allí!
[El problema #1252](https://github.com/starship/starship/discussions/1252) contiene ejemplos de módulos personalizados. ¡Si tienes un ejemplo interesante no cubierto, siéntete libre de compartirlo ahí!
:::
@ -3698,30 +3751,30 @@ Las cadenas de formato también pueden contener secuencias específicas del int
### Opciones
| Opción | Predeterminado | Descripción |
| ------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command` | `""` | El comando cuya salida debe ser impresa. El comando se pasará en stdin al shell. |
| `when` | `false` | Valor booleano (`true` o `false`, sin comillas) o un comando de shell usado como una condición para mostrar el módulo. En caso de una cadena, el módulo se mostrará si el comando devuelve un código de estado `0`. |
| `shell` | | [Ver abajo](#custom-command-shell) |
| `description` | `"<custom module>"` | La descripción del módulo que se muestra al ejecutar `starship explain`. |
| `detect_files` | `[]` | Los archivos que se buscarán en el directorio de trabajo para obtener una coincidencia. |
| `detect_folders` | `[]` | Los directorios que se buscarán en el directorio de trabajo para una coincidencia. |
| `detect_extensions` | `[]` | Las extensiones que se buscarán en el directorio de trabajo para obtener una coincidencia. |
| `symbol` | `""` | El símbolo usado antes de mostrar la salida del comando. |
| `style` | `"bold green"` | El estilo del módulo. |
| `format` | `"[$symbol($output )]($style)"` | El formato del módulo. |
| `disabled` | `false` | Desactiva este módulo `custom`. |
| `os` | | Nombre del sistema operativo en el que se mostrará el módulo (unix, linux, macos, windows, ... ) [Ver valores posibles](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
| `use_stdin` | | Un valor booleano opcional que anula si los comandos deben ser reenviados al shell a través de la entrada estándar o como argumento. Si la entrada estándar unset es usada de manera predeterminada, a menos que el shell no lo soporte (cmd, nushell). Configurar esto desactiva el manejo de argumentos específicos del shell. |
| `ignore_timeout` | `false` | Ignorar la configuración global de `command_timeout` y seguir ejecutando comandos externos, sin importar el tiempo que tarden. |
| Opción | Predeterminado | Descripción |
| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `comando` | `""` | El comando cuya salida debe ser impresa. El comando se pasará en stdin al intérprete de comandos. |
| `cuando` | `false` | Valor booleano (`true` o `false`, sin comillas) o un comando de shell usado como una condición para mostrar el módulo. En caso de una cadena, el módulo se mostrará si el comando devuelve un código de estado `0`. |
| `shell` | | [Ver a continuación](#custom-command-shell) |
| `description` | `"<módulo personalizado>"` | La descripción del módulo que se muestra al ejecutar `starship explain`. |
| `detect_files` | `[]` | Los archivos que se buscarán en el directorio de trabajo para obtener una coincidencia. |
| `detect_folders` | `[]` | Los directorios que se buscarán en el directorio de trabajo para una coincidencia. |
| `detect_extensions` | `[]` | Las extensiones que se buscarán en el directorio de trabajo para obtener una coincidencia. |
| `symbol` | `""` | El símbolo usado antes de mostrar la salida del comando. |
| `style` | `"bold green"` | El estilo del módulo. |
| `format` | `"[$symbol($output )]($style)"` | El formato del módulo. |
| `disabled` | `false` | Deshabilita este módulo `custom`. |
| `os` | | Nombre del sistema operativo en el que se mostrará el módulo (unix, linux, macos, windows, ... ) [Ver valores posibles](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
| `use_stdin` | | Un valor booleano opcional que anula si los comandos deben ser reenviados al shell a través de la entrada estándar o como argumento. Si la entrada estándar unset es usada de manera predeterminada, a menos que el shell no lo soporte (cmd, nushell). Configurar esto desactiva el manejo de argumentos específicos del shell. |
| `ignore_timeout` | `false` | Ignorar la configuración global de `command_timeout` y seguir ejecutando comandos externos, sin importar el tiempo que tarden. |
### Variables
| Variable | Descripción |
| --------- | ----------------------------------------- |
| output | La salida del comando de shell en `shell` |
| symbol | Refleja el valor de la opción `symbol` |
| style\* | Refleja el valor de la opción `style` |
| Variable | Descripción |
| --------- | ----------------------------------------------------------- |
| salida | La salida del comando del intérprete de comandos en `shell` |
| symbol | Refleja el valor de la opción `symbol` |
| style\* | Refleja el valor de la opción `style` |
*: Esta variable sólo puede ser usada como parte de una cadena de estilo
@ -3736,7 +3789,7 @@ Si no está activado, se retornará a STARSHIP_SHELL y luego a "sh" en Linux, y
El `comando` será pasado en stdin.
Si no se da el `shell` o solo contiene un elemento y Starship detecta PowerShell los siguientes argumentos se añadirán automáticamente: `-NoProfile -Command -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. Este comportamiento puede evitarse pasando explícitamente argumentos al intérprete, p.ej.
Si no se da el `shell` o solo contiene un elemento y Starship detecta PowerShell los siguientes argumentos se añadirán automáticamente: `-NoProfile -Command -`. If `shell` is not given or only contains one element and Starship detects Cmd will be used, the following argument will automatically be added: `/C` and `stdin` will be set to `false`. If `shell` is not given or only contains one element and Starship detects Nushell will be used, the following arguments will automatically be added: `-c` and `stdin` will be set to `false`. Este comportamiento puede evitarse pasando explícitamente argumentos al intérprete de comandos, p.ej.
```toml
shell = ["pwsh", "-Command", "-"]
@ -3744,13 +3797,13 @@ shell = ["pwsh", "-Command", "-"]
::: warning Asegúrate de que tu configuración personalizada del intérprete de comandos salga con éxito
Si establece un comando personalizado, asegúrese de que el Shell por defecto usado por starship ejecutará correctamente el comando con una salida elgante (a través de la opción `shell`).
Si estableces un comando personalizado, asegúrate de que el intérprete de comandos por defecto usado por Starship ejecutará correctamente el comando con una salida elegante (a través de la opción `shell`).
Por ejemplo, PowerShell requiere el parámetro `-Command` para ejecutar una sola línea. Omitir este parámetro puede arrojar a starchip a un bucle recursivo donde el shell podría intentar cargar un entorno de perfil completo con starship en sí misma y volver a ejecutar el comando personalizado, entrando en un bucle infinito.
Por ejemplo, PowerShell requiere el parámetro `-Command` para ejecutar una sola línea. Omitir este parámetro puede arrojar a Starship a un bucle recursivo donde el intérprete de comandos podría intentar cargar un entorno de perfil completo con Starship en sí misma y volver a ejecutar el comando personalizado, entrando en un bucle infinito.
Se recomiendan parámetros similares a `-NoProfile` en PowerShell para otros shells para evitar tiempo extra de carga de un perfil personalizado en cada invocación de starship.
Se recomiendan parámetros similares a `-NoProfile` en PowerShell para otros intérprete de comandos también para evitar tiempo extra de carga de un perfil personalizado en cada invocación de Starship.
La detección automática de shells y la adición adecuada de parámetros están actualmente implementados, pero es posible que no todos los shells estén cubiertos. Por favor, [abre un issue](https://github.com/starship/starship/issues/new/choose) con los detalles del intérprete de comandos y la configuración de Starship si te encuentras en tal escenario.
La detección automática de intérpretes de comandos y la adición adecuada de parámetros están actualmente implementados, pero es posible que no todos los intérpretes de comandos estén cubiertos. Por favor, [abre un problema](https://github.com/starship/starship/issues/new/choose) con los detalles del intérprete de comandos y la configuración de Starship si te encuentras en tal escenario.
:::
@ -3762,7 +3815,7 @@ La detección automática de shells y la adición adecuada de parámetros están
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,8 +220,7 @@ Alternativamente, instale Starship usando cualquiera de los siguientes gestores
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Gentoo | [Paquetes Gentoo](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |

View File

@ -55,11 +55,10 @@ description: Starship est une invite minimaliste, ultra-rapide et hautement pers
```sh
brew install starship
```
Avec [Scoop](https://scoop.sh):
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. Ajouter le script dinitialisation au fichier configuration de votre shell:

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:
@ -78,7 +104,7 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## Commandes pré-commande et pré-exécution personnalisées en Bash
## Commandes pré-invite et pré-exécution personnalisées en Bash
Bash n'a pas de structure officielle préexec/précmd comme la plupart des autres shells. C'est pourquoi il est difficile de fournir des hooks entièrement personnalisables dans `bash`. Cependant, Starship vous permet dans une certaine mesure d'insérer vos propres fonctions dans la procédure de rendu du prompt :
@ -115,9 +141,9 @@ function Invoke-Starship-PreCommand {
}
```
## Modifier le titre des fenêtres
## Changer le titre de la fenêtre
Certaines commandes du shell changeront automatiquement le titre de la fenêtre (par exemple, pour refléter votre répertoire de travail). Fish le fait même par défaut. Starship ne fait pas ça, mais cest assez facile dajouter cette fonctionnalité à `bash`, `zsh`, `cmd` ou `powershell`.
Certaines commandes du shell changeront automatiquement le titre de la fenêtre (par exemple, pour refléter le dossier courant). Fish le fait même par défaut. Starship ne fait pas ça, mais cest assez facile dajouter cette fonctionnalité à `bash`, `zsh`, `cmd` ou `powershell`.
Tout d'abord, définissez une fonction de changement de titre de fenêtre (identique en bash et zsh) :
@ -143,7 +169,7 @@ precmd_functions+=(set_titre_fenetre)
Si vous aimez le résultat, ajoutez ces lignes à votre fichier de configuration shell (`~/.bashrc` ou `~/.zshrc`) pour le rendre permanent.
Par exemple, si vous voulez afficher votre répertoire actuel dans le titre de l'onglet de votre terminal, ajoutez le code suivant à votre `~/.bashrc` ou `~/.zshrc`:
Par exemple, si vous voulez afficher votre dossier courant dans le titre de l'onglet de votre terminal, ajoutez le code suivant à votre `~/.bashrc` ou `~/.zshrc`:
```bash
function set_win_title(){
@ -224,32 +250,32 @@ continuation_prompt = "▶▶"
## Chaînes de style
Les chaînes de style sont une liste de mots, séparés par des espaces blancs. Les mots ne sont pas sensibles à la casse (` bold ` et ` boLd ` sont considérés comme la même string). Chaque mot peut être l'un des suivants :
Les chaines de style sont une liste de mots séparés par des espaces. Les mots ne sont pas sensibles à la casse (`bold` et `boLd` sont considérés comme la même chaine). Les mots peuvent être:
- `bold`
- `bold (gras)`
- `italic (italique)`
- `underline`
- `dimmed`
- `inverted`
- `underline (souligné)`
- `dimmed (atténué)`
- `inverted (inversé)`
- `blink`
- `hidden`
- `strikethrough`
- `bg:<couleur>`
- `fg:<couleur>`
- `<couleur>`
- `none`
- `bg:<color> (arrière-plan)`
- `fg:<color> (avant-plan)`
- `<color>`
- `none (aucun)`
`<color>` est un spécificateur de couleur (discuté ci-dessous). `fg:<color>` et `<color>` font actuellement la même chose, bien que cela puisse changer dans le futur. `inverted` permute les couleurs de fond et de premier plan. L'ordre des mots dans le string n'a pas d'importance.
`<color>` spécifie une couleur (voir ci-dessous). `fg:<color>` and `<color>` font la même chose actuellement, mais cela pourrait changer dans le futur. `inverted` inverse les couleurs darrière-plan et davant-plan. Lordre des mots dans la chaine na pas dimportance.
La valeur `none` remplace toutes les autres valeurs si elle n'est pas incluse dans un spécificateur `bg:`, de sorte que par exemple `fg: red none fg:blue` créera une chaîne sans style. `bg:none` définit l'arrière plan sur la couleur par défaut, donc `fg:red bg:none` est équivalent à `red` ou `fg:red` et `bg:green fg:red bg:none` est aussi équivalent à `fg:red` ou `red`. Il peut devenir une erreur d'utiliser `none` en conjonction avec d'autres jetons dans le futur.
La valeur `none` écrase toutes les autres dans une chaine si elle ne fait pas partie dune déclaration `bg:`, donc par exemple `fg:red none fg:blue` va créer une chaine sans style. `bg:none` définit comme arrière-plan la couleur par défaut donc `fg:red bg:none` équivaut à `red` ou `fg:red` et `bg:green fg:red bg:none` équivaut aussi à `fg:red` or `red`. Cela pourrait devenir une erreur dutiliser `none` avec dautres mots dans le futur.
Un spécificateur de couleur peut être l'un des éléments suivants :
Une spécification de couleur peut être:
- Une des couleurs de terminal standard: `black` (noir), `red` (rouge), `green` (vert), `blue` (bleu), `yellow` (jaune), `purple` (violet), `cyan` (cyan), `white` (blanc). Vous pouvez éventuellement les préfixer avec `bright-` pour obtenir la version claire (par exemple `bright-white`).
- Un `#` suivi d'un nombre hexadécimal de six chiffres. Ceci spécifie un [ Code hexadécimal de couleur RVB ](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- Un nombre entre 0 et 255. Ceci spécifie un [code de couleur ANSI 8 bits](https://i.stack.imgur.com/KTSQa.png).
- Un `#` suivi dun nombre hexadécimal de 6 chiffres. Cela spécifie un [code de couleur RGB hexadécimal](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- Un nombre entre 0 et 255. Cela spécifie un [code couleur ANSI 8-bit](https://i.stack.imgur.com/KTSQa.png).
Si plusieurs couleurs sont spécifiées pour le premier plan/arrière-plan, la dernière dans le string prendra la priorité.
Si plusieurs couleurs sont définies pour lavant-plan/arrière-plan, la dernière dans le chaine sera prioritaire.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:

View File

@ -162,13 +162,15 @@ Voici la liste des options de configuration de l'invite en lui-même.
### Options
| Option | Défaut | Description |
| ----------------- | ------------------------------ | --------------------------------------------------------------------------- |
| `format` | [lien](#default-prompt-format) | Configure le format de l'invite. |
| `right_format` | `""` | Voir [Activer le prompt à droite](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Délai d'attente pour que starship scanne les fichiers (en millisecondes). |
| `command_timeout` | `500` | Délai maximal pour les commandes exécutées par starship (en millisecondes). |
| `add_newline` | `true` | Insère une ligne vide entre les invites du shell. |
| Option | Défaut | Description |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [lien](#default-prompt-format) | Configure le format de l'invite. |
| `right_format` | `""` | Voir [Activer le prompt à droite](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Délai d'attente pour que starship scanne les fichiers (en millisecondes). |
| `command_timeout` | `500` | Délai maximal pour les commandes exécutées par starship (en millisecondes). |
| `add_newline` | `true` | Insère une ligne vide entre les invites du shell. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### Exemple
@ -184,8 +186,18 @@ format = """
# Attendez 10 millisecondes pour que starship vérifie les fichiers dans le répertoire de travail.
scan_timeout = 10
# Désactive la nouvelle ligne au début de l'invite
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Format par Défaut
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +444,12 @@ La valeur par défaut pour les options `charging_symbol` et `discharging_symbol`
L'option `display` est une array de la table suivante.
| Option | Défaut | Description |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | La limite supérieure pour l'option d'affichage. |
| `style` | `bold red` | Le style de l'option display si elle est utilisée. |
| `charging_symbol` | `-` | Symbole optionnel affiché si l'option display est utilisée, la valeur par défaut est l'option `charging_symbol` du module "battery". |
| `discharging_symbol` | `-` | Symbole optionnel affiché si l'option display est utilisée, la valeur par défaut est l'option `discharging_symbol` du module "battery". |
| Option | Défaut | Description |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | La limite supérieure pour l'option d'affichage. |
| `style` | `"red bold"` | Le style de l'option display si elle est utilisée. |
| `charging_symbol` | | Symbole optionnel affiché si l'option display est utilisée, la valeur par défaut est l'option `charging_symbol` du module "battery". |
| `discharging_symbol` | | Symbole optionnel affiché si l'option display est utilisée, la valeur par défaut est l'option `discharging_symbol` du module "battery". |
#### Exemple
@ -462,24 +475,24 @@ Le module `buf` affiche la version de [Buf](https://buf.build) installée. Par d
### Options
| Option | Défaut | Description |
| ------------------- | ------------------------------------------------------------ | ------------------------------------------------------ |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | Le format du module `buf`. |
| `version_format` | `"v${raw}"` | Le format de la version. |
| `symbol` | `"🦬 "` | Le symbole utilisé avant dafficher la version de Buf. |
| `detect_extensions` | `[]` | Quelles extensions devraient activer ce module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Les fichiers qui activent ce module. |
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
| `style` | `"bold blue"` | Le style du module. |
| `disabled` | `false` | Désactive le module `elixir`. |
| Option | Défaut | Description |
| ------------------- | ----------------------------------------------- | ------------------------------------------------------ |
| `format` | `"with [$symbol($version )]($style)"` | Le format du module `buf`. |
| `version_format` | `"v${raw}"` | Le format de la version. |
| `symbol` | `"🦬 "` | Le symbole utilisé avant dafficher la version de Buf. |
| `detect_extensions` | `[]` | Quelles extensions devraient activer ce module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Les fichiers qui activent ce module. |
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
| `style` | `"bold blue"` | Le style du module. |
| `disabled` | `false` | Désactive le module `elixir`. |
### Variables
| Variable | Exemple | Description |
| ------------- | -------- | -------------------------------------- |
| `buf_version` | `v1.0.0` | La version de `buf` |
| `symbol` | | Reflète la valeur de l'option `symbol` |
| `style`* | | Reflète la valeur de l'option `style` |
| Variable | Exemple | Description |
| --------- | -------- | -------------------------------------- |
| `version` | `v1.0.0` | La version de `buf` |
| `symbol` | | Reflète la valeur de l'option `symbol` |
| `style`* | | Reflète la valeur de l'option `style` |
*: Cette variable peut uniquement être utilisée dans une chaine de style
@ -609,9 +622,9 @@ Par défaut, il ne change que la couleur. Si vous désirez également changer sa
### Variables
| Variable | Exemple | Description |
| -------- | ------- | --------------------------------------------------------------- |
| symbol | | Reflète sois `success_symbol`, `error_symbol` ou `vicmd_symbol` |
| Variable | Exemple | Description |
| -------- | ------- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Exemples
@ -794,12 +807,12 @@ Le module `container` affiche un symbole et le nom du conteneur, si vous êtes d
### Options
| Option | Défaut | Description |
| ---------- | -------------------------------------- | ---------------------------------------------------- |
| `symbol` | `"⬢"` | Le symbole affiché quand vous êtes dans un conteneur |
| `style` | `"bold red dimmed"` | Le style du module. |
| `format` | `"[$symbol \\[$name\\]]($style) "` | Format du module. |
| `disabled` | `false` | Désactive le module `container`. |
| Option | Défaut | Description |
| ---------- | ---------------------------------- | ---------------------------------------------------- |
| `symbol` | `"⬢"` | Le symbole affiché quand vous êtes dans un conteneur |
| `style` | `"bold red dimmed"` | Le style du module. |
| `format` | `'[$symbol \[$name\]]($style) '` | Format du module. |
| `disabled` | `false` | Désactive le module `container`. |
### Variables
@ -817,7 +830,7 @@ Le module `container` affiche un symbole et le nom du conteneur, si vous êtes d
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Options
| Option | Défaut | Description |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------ |
| `format` | `via [$symbol($version )]($style)` | Format du module. |
| `version_format` | `v${raw}` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | Le style du module. |
| `detect_extensions` | `[]` | Quelles extensions devraient activer ce module. |
| `detect_files` | `["daml.yaml"]` | Les fichiers qui activent ce module. |
| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
| `disabled` | `false` | Disables the `daml` module. |
| Option | Défaut | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | Format du module. |
| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | Le style du module. |
| `detect_extensions` | `[]` | Quelles extensions devraient activer ce module. |
| `detect_files` | `["daml.yaml"]` | Les fichiers qui activent ce module. |
| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
| `disabled` | `false` | Disables the `daml` module. |
### Variables
@ -993,7 +1006,7 @@ Par exemple, donné `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo
| `read_only` | `"🔒"` | Le symbole indiquant que le répertoire courant est en lecture seule. |
| `read_only_style` | `"red"` | Le style du symbole en lecture seule. |
| `truncation_symbol` | `""` | Le symbole en préfixe aux chemins tronqués. eg: "…/" |
| `repo_root_style` | `None` | Le style pour la racine du dépôt Git. La valeur par défaut est équivalent à `style`. |
| `repo_root_style` | | Le style pour la racine du dépôt Git. La valeur par défaut est équivalent à `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | Le format dun dépôt Git quand `repo_root_style` est défini. |
| `home_symbol` | `"~"` | Le symbole indiquant le répertoire personnel. |
| `use_os_path_sep` | `true` | Utiliser le séparateur de chemin du système dexploitation au lieu de toujours utiliser `/` (par ex. `\` sous Windows) |
@ -1480,16 +1493,16 @@ Le module `git_commit` affiche le hash du commit actuel ainsi que le tag (le cas
### Options
| Option | Défaut | Description |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | La longueur du hash affiché du commit git. |
| `format` | `"[\\($hash$tag\\)]($style) "` | Format du module. |
| `style` | `"bold green"` | Le style du module. |
| `only_detached` | `true` | Ne montrer le hash du commit qu'en mode `HEAD` détachée. |
| `tag_disabled` | `true` | Désactive l'affichage des informations du tag dans le module `git_commit`. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Symbole préfixant les informations affichées concernant le tag |
| `disabled` | `false` | Désactive le module `git_commit`. |
| Option | Défaut | Description |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | La longueur du hash affiché du commit git. |
| `format` | `'[\($hash$tag\)]($style) '` | Format du module. |
| `style` | `"bold green"` | Le style du module. |
| `only_detached` | `true` | Ne montrer le hash du commit qu'en mode `HEAD` détachée. |
| `tag_disabled` | `true` | Désactive l'affichage des informations du tag dans le module `git_commit`. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Symbole préfixant les informations affichées concernant le tag |
| `disabled` | `false` | Désactive le module `git_commit`. |
### Variables
@ -1567,7 +1580,7 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
| `added_style` | `"bold green"` | Le style pour le compte des ajouts. |
| `deleted_style` | `"bold green"` | Le style pour le compte des suppressions. |
| `only_nonzero_diffs` | `true` | Afficher le statut seulement pour les items modifiés. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Format du module. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | Format du module. |
| `disabled` | `true` | Désactive le module `git_metrics`. |
### Variables
@ -1588,7 +1601,7 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Statut Git
@ -1690,7 +1703,7 @@ Utiliser un exécutable Starship Windows pour les chemins Windows dans WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
Le module `java` affiche la version actuellement installée de [Java](https://www.oracle.com/java/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
- Le répertoire actuel contient un fichier `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, ou `build.boot`
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- Le répertoire actuel contient un fichier avec l'extension `.java`, `.class`, `. gradle`, `.jar`, `.clj`, ou `.cljc`
### Options
| Option | Défaut | Description |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| `format` | `"via [${symbol}(${version} )]($style)"` | Format du module. |
| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Quelles extensions devraient activer ce module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Les fichiers qui activent ce module. |
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
| `symbol` | `"☕ "` | Une chaîne de caractères représentant le symbole de Java |
| `style` | `"red dimmed"` | Le style du module. |
| `disabled` | `false` | Désactive le module `java`. |
| Option | Défaut | Description |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| `format` | `"via [${symbol}(${version} )]($style)"` | Format du module. |
| `version_format` | `"v${raw}"` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Quelles extensions devraient activer ce module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Les fichiers qui activent ce module. |
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
| `symbol` | `"☕ "` | Une chaîne de caractères représentant le symbole de Java |
| `style` | `"red dimmed"` | Le style du module. |
| `disabled` | `false` | Désactive le module `java`. |
### Variables
@ -2258,9 +2271,48 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Options
| Option | Défaut | Description |
| ------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. Vous pouvez utiliser `""` pour ne pas afficher de symbole. |
| `format` | `"via [$symbol$project]($style) "` | Format du module. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | Le style du module. |
| `disabled` | `false` | Disables the `meson` module. |
### Variables
| Variable | Exemple | Description |
| --------- | ---------- | -------------------------------------- |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
*: Cette variable peut uniquement être utilisée dans une chaine de style
### Exemple
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Branche Mercurial
Le module `hg_branch` affiche la branche active du dépôt dans votre répertoire courant.
Le module `hg_branch` affiche la branche active du dépôt dans le dossier courant.
### Options
@ -2296,7 +2348,7 @@ truncation_symbol = ""
## Nim
Le module `nim` affiche la version actuellement installée de [Nim](https://nim-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
Le module `nim` affiche la version de [Nim](https://nim-lang.org/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
- Le dossier courant contient un fichier `nim.cfg`
- Le répertoire actuel contient un fichier avec l'extension `.nim`
@ -2376,7 +2428,7 @@ format = 'via [☃️ $state( \($name\))](bold blue) '
## Node.js
Le module `nodejs` affiche la version actuellement installée de [Node.js](https://nodejs.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
Le module `nodejs` affiche la version de [Node.js](https://nodejs.org/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
- Le dossier courant contient un fichier `package.json`
- Le répertoire courant contient un fichier `.node-version`
@ -2420,7 +2472,7 @@ format = "via [🤖 $version](bold green) "
## OCaml
Le module `ocaml` affiche la version actuellement installée de [OCaml](https://ocaml.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
Le module `ocaml` affiche la version de [OCaml](https://ocaml.org/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
- Le répertoire courant contient un fichier avec l'extension `.opam` ou le répertoire `_opam`
- Le répertoire courant contient un répertoire `esy.lock`
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### Options
| Option | Défaut | Description |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | Format du module. |
| `symbol` | `"☁️ "` | Le symbole utilisé avant d'afficher le cloud OpenStack actuel. |
| `style` | `"bold yellow"` | Le style du module. |
| `disabled` | `false` | Désactive le module `openstack`. |
| Option | Défaut | Description |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | Format du module. |
| `symbol` | `"☁️ "` | Le symbole utilisé avant d'afficher le cloud OpenStack actuel. |
| `style` | `"bold yellow"` | Le style du module. |
| `disabled` | `false` | Désactive le module `openstack`. |
### Variables
@ -2495,12 +2547,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
## Version du package
## Version du paquet
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart` packages.
@ -2556,7 +2608,7 @@ format = "via [🎁 $version](208 bold) "
## Perl
Le module `perl` affiche la version actuellement installée de [Perl](https://www.perl.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
Le module `perl` affiche la version de [Perl](https://www.perl.org/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
- Le répertoire courant contient un fichier `Makefile.PL` ou `Build.PL`
- Le répertoire courant contient un fichier `cpanfile` ou `cpanfile.snapshot`
@ -2596,7 +2648,7 @@ format = "via [🦪 $version]($style) "
## PHP
Le module `php` affiche la version actuellement installée de [PHP](https://www.php.net/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
Le module `php` affiche la version de [PHP](https://www.php.net/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
- Le dossier courant contient un fichier `composer.json`
- Le répertoire courant contient un fichier `.php-version`
@ -2694,7 +2746,7 @@ format = "[$symbol$stack]($style) "
## PureScript
Le module `purescript` affiche la version actuellement installée de [PureScript](https://www.purescript.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
Le module `purescript` affiche la version de [PureScript](https://www.purescript.org/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
- Le répertoire courant contient un fichier `spago.dhall`
- Le répertoire actuel contient un fichier avec l'extension `.purs`
@ -2733,7 +2785,7 @@ format = "via [$symbol$version](bold white)"
## Python
Le module `python` affiche la version actuellement installée de [Python](https://www.python.org/) ainsi que la version d'[environnement virtuel Python](https://docs.python.org/tutorial/venv.html) si il y en a un d'activé.
Le module `python` affiche la version de [Python](https://www.python.org/) installée et l[environnement virtual Python](https://docs.python.org/tutorial/venv.html) actif sil y en a un.
Si `pyenv_version_name` est défini à `true`, il affichera le nom de la version de pyenv. Sinon, il affichera le numéro de version que donne `python --version`.
@ -2823,7 +2875,7 @@ python_binary = ["./venv/bin/python", "python", "python3", "python2"]
## R
Le module `rlang` affiche la version de [R](https://www.r-project.org/) actuellement installée. Le module saffiche si lune de ces conditions est remplie :
Le module `rlang` affiche la version de [R](https://www.r-project.org/) installée. Le module sera affiché si l'une de ces conditions est remplie:
- Le répertoire actuel contient un fichier avec l'extension `.R`.
- Le répertoire actuel contient un fichier avec l'extension `.Rd`.
@ -2903,7 +2955,7 @@ format = "via [🦪 $version]($style) "
## Red
Par défaut, le module `red` affiche la version actuellement installée de [Red](https://www.red-lang.org/). Le module est affiché si l'une de ces conditions est remplie :
Par défaut, le module `red` affiche la version de [Red](https://www.red-lang.org/) installée. Le module est affiché si l'une de ces conditions est remplie :
- Le répertoire actuel contient un fichier avec l'extension `.red` ou `.reds`
@ -2941,7 +2993,7 @@ symbol = "🔴 "
## Ruby
Par défaut, le module `ruby` affiche la version actuellement installée de [Ruby](https://www.ruby-lang.org/). Le module est affiché si l'une de ces conditions est remplie :
Le module `ruby` affiche la version de [Ruby](https://www.ruby-lang.org/) installée. Le module est affiché si l'une de ces conditions est remplie :
- Le répertoire courant contient un fichier `Gemfile`
- Le répertoire courant contient un fichier `.ruby-version`
@ -2985,7 +3037,7 @@ symbol = "🔺 "
## Rust
Par défaut, le module `rust` affiche la version actuellement installée de [Rust](https://www.rust-lang.org/). Le module est affiché si l'une de ces conditions est remplie :
Le module `rust` affiche la version de [Rust](https://www.rust-lang.org/) installée. Le module est affiché si l'une de ces conditions est remplie :
- Le répertoire courant contient un fichier `Cargo.toml`
- Le répertoire actuel contient un fichier avec l'extension `.rs`
@ -3026,7 +3078,7 @@ format = "via [⚙️ $version](red bold)"
## Scala
Le module `scala` affiche la version actuellement installée de [Scala](https://www.scala-lang.org/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
Le module `scale` affiche la version de [Scala](https://www.scala-lang.org/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
- Le répertoire courant contient un fichier `build.sbt`, `.scalaenv` ou `.sbtenv`
- Le répertoire actuel contient un fichier avec l'extension `.scala` ou `.sbt`
@ -3078,16 +3130,16 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
| Option | Défaut | Description |
| ---------------------- | ------------------------- | ----------------------------------------------------------- |
| `bash_indicator` | `bsh` | Une chaîne de format utilisée pour représenter bash. |
| `fish_indicator` | `fsh` | Une chaîne de format utilisée pour représenter fish. |
| `zsh_indicator` | `zsh` | Une chaîne de format utilisée pour représenter zsh. |
| `powershell_indicator` | `psh` | Une chaîne de format utilisée pour représenter powershell. |
| `ion_indicator` | `ion` | Une chaîne de format utilisée pour représenter ion. |
| `elvish_indicator` | `esh` | Une chaîne de format utilisée pour représenter elvish. |
| `tcsh_indicator` | `tsh` | Une chaîne de format utilisée pour représenter tcsh. |
| `xonsh_indicator` | `xsh` | Chaine de formatage utilisée pour représenter xonsh. |
| `cmd_indicator` | `cmd` | Chaine de formatage utilisée pour représenter cmd. |
| `nu_indicator` | `nu` | Chaine de formatage utilisée pour représenter nu. |
| `bash_indicator` | `"bsh"` | Chaine de formatage utilisée pour représenter bash. |
| `fish_indicator` | `"fsh"` | Chaine de formatage utilisée pour représenter fish. |
| `zsh_indicator` | `"zsh"` | Chaine de formatage utilisée pour représenter zsh. |
| `powershell_indicator` | `"psh"` | Chaine de formatage utilisée pour représenter powershell. |
| `ion_indicator` | `"ion"` | Chaine de formatage utilisée pour représenter ion. |
| `elvish_indicator` | `"esh"` | Chaine de formatage utilisée pour représenter elvish. |
| `tcsh_indicator` | `"tsh"` | Chaine de formatage utilisée pour représenter tcsh. |
| `xonsh_indicator` | `"xsh"` | Chaine de formatage utilisée pour représenter xonsh. |
| `cmd_indicator` | `"cmd"` | Chaine de formatage utilisée pour représenter cmd. |
| `nu_indicator` | `"nu"` | Chaine de formatage utilisée pour représenter nu. |
| `unknown_indicator` | | La valeur par défaut à afficher quand le shell est inconnu. |
| `format` | `"[$indicator]($style) "` | Format du module. |
| `style` | `"white bold"` | Le style du module. |
@ -3216,7 +3268,7 @@ Le module `spack` affiche lenvironnement [Spack](https://spack.readthedocs.io
format = "[$symbol$environment](dimmed blue) "
```
## Status
## Statut
Le module `status` affiche le code de sortie de la commande précédente. Si $success_symbol est vide (par défaut), ce module sera affiché uniquement quand le code de sortie nest pas `0`. Le code de statut est converti en entier signé 32 bits.
@ -3228,29 +3280,29 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
### Options
| Option | Défaut | Description |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | Le format du module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold green"` | Le style du module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Désactiver le module `status`. |
| Option | Défaut | Description |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | Le format du module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold green"` | Le style du module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Désactiver le module `status`. |
### Variables
| Variable | Exemple | Description |
| -------------- | ------- | ------------------------------------------------------------------------------------------- |
| status | `127` | Le code de sortie de la dernière commande |
| statut | `127` | Le code de sortie de la dernière commande |
| hex_status | `0x7F` | Le code de sortie de la dernière commande en hexa |
| int | `127` | Le code de sortie de la dernière commande |
| common_meaning | `ERROR` | Signification du code si nest pas un signal |
@ -3289,13 +3341,13 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
### Options
| Option | Défaut | Description |
| --------------- | ----------------------- | ----------------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | Le format du module |
| `symbol` | `"🧙 "` | Le symbole affiché quand les identifiants sont en cache |
| `style` | `"bold blue"` | Le style du module. |
| `allow_windows` | `false` | Puisque Windows na pas de sudo par défaut, désactivé par défaut. |
| `disabled` | `true` | Désactive le module `sudo`. |
| Option | Défaut | Description |
| --------------- | ------------------------ | ----------------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | Le format du module |
| `symbol` | `"🧙 "` | Le symbole affiché quand les identifiants sont en cache |
| `style` | `"bold blue"` | Le style du module. |
| `allow_windows` | `false` | Puisque Windows na pas de sudo par défaut, désactivé par défaut. |
| `disabled` | `true` | Désactive le module `sudo`. |
### Variables
@ -3318,7 +3370,7 @@ disabled = false
```
```toml
# Sous Windows
# Sous windows
# $HOME\.starship\config.toml
[sudo]
@ -3328,7 +3380,7 @@ disabled = false
## Swift
Par défaut, le module `swift` affiche la version actuellement installée de [Swift](https://swift.org/). Le module est affiché si l'une de ces conditions est remplie :
Par défaut, le module `swift` affiche la version de [Swift](https://swift.org/) installée. Le module est affiché si l'une de ces conditions est remplie :
- Le répertoire courant contient un fichier `Package.swift`
- Le répertoire actuel contient un fichier avec l'extension `.swift`
@ -3426,7 +3478,7 @@ format = "[🏎💨 $workspace]($style) "
## Date et Heure
Le module `time` affiche l'heure actuelle **localement**. La valeur de `format` est utilisée par le package [`chrono`](https://crates.io/crates/chrono) pour contrôler la façon dont l'heure est affichée. Consultez la [doc de chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) pour découvrir les options disponibles.
Le module `time` affiche la date et heure **locale**. La valeur de `format` est utilisée par le package [`chrono`](https://crates.io/crates/chrono) pour contrôler la façon dont l'heure est affichée. Consultez la [doc de chrono strftime](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) pour découvrir les options disponibles.
::: tip
@ -3443,10 +3495,10 @@ Ce module est désactivé par défaut. Pour l'activer, configurez `disabled` sur
| `time_format` | voir plus bas | Le [format chrono](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) utilisé pour formater l'heure. |
| `style` | `"bold yellow"` | Le style utilisé par le module |
| `utc_time_offset` | `"local"` | Définir le décalage horaire UTC à utiliser. Intervalle de -24 &lt; x &lt; 24. Accepte des nombres décimaux pour s'adapter aux décalages de 30/45 minutes. |
| `disabled` | `true` | Désactiver le module `time`. |
| `disabled` | `true` | Désactive le module `time`. |
| `time_range` | `"-"` | Définit la plage de temps pendant laquelle le module sera affiché. Les heures doivent être spécifiées au format 24 heures |
Si `use_12hr` est à `true`, alors `time_format` vaut `"%r"`. Sinon, il est défini comme `"%T"`. Définir manuellement `time_format` outrepasse le paramètre `use_12hr`.
Si `use_12hr` est à `true`, alors `time_format` vaut `"%r"`. Sinon, il vaut `"%T"`. Définir manuellement `time_format` outrepasse le paramètre `use_12hr`.
### Variables
@ -3472,7 +3524,7 @@ time_range = "10:00:00-14:00:00"
## Nom d'utilisateur
Le module `username` affiche le nom d'utilisateur de l'utilisateur actif. Le module est affiché si l'une de ces conditions est remplie :
Le module `username` affiche le nom de lutilisateur actif. Le module est affiché si l'une de ces conditions est remplie :
- L'utilisateur courant est root/admin
- L'utilisateur courant est différent de celui connecté
@ -3493,7 +3545,7 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
| `style_user` | `"bold yellow"` | Le style utilisé pour les utilisateurs non-root. |
| `format` | `"[$user]($style) in "` | Format du module. |
| `show_always` | `false` | Toujours afficher le module `username`. |
| `disabled` | `false` | Désactiver le module `username`. |
| `disabled` | `false` | Désactive le module `username`. |
### Variables
@ -3510,14 +3562,14 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
[username]
style_user = "white bold"
style_root = "black bold"
format = "user: [$user]($style) "
format = "utilisateur: [$user]($style) "
disabled = false
show_always = true
```
## Vagrant
Le module `vagrant` affiche la version actuellement installée de [Vagrant](https://www.vagrantup.com/). Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
Le module `vagrant` affiche la version de [Vagrant](https://www.vagrantup.com/) installée. Par défaut le module sera activé si au moins l'une des conditions suivantes est remplie:
- Le répertoire courant contient un fichier `Vagrantfile`
@ -3623,7 +3675,7 @@ format = "[🆅 $repo](bold blue) "
## Zig
Par défaut, le module `zig` affiche la version actuellement installée de [Zig](https://ziglang.org/). Le module est affiché si l'une de ces conditions est remplie :
Le module `zig` affiche la version de [Zig](https://ziglang.org/) installée. Le module est affiché si l'une de ces conditions est remplie :
- Le répertoire courant contient un fichier `.zig`
@ -3644,7 +3696,7 @@ Par défaut, le module `zig` affiche la version actuellement installée de [Zig]
| Variable | Exemple | Description |
| --------- | -------- | -------------------------------------- |
| version | `v0.6.0` | La version de `zig` |
| version | `v0.6.0` | La version de `zip` |
| symbol | | Reflète la valeur de l'option `symbol` |
| style\* | | Reflète la valeur de l'option `style` |
@ -3763,7 +3815,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,7 +220,6 @@ Vous pouvez aussi installer Starship en utilisant lun de ces gestionnaires de
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Paquets Fedora](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Paquets Gentoo](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

View File

@ -55,11 +55,10 @@ description: Starship merupakan sebuah prompt yang minimal, super cepat, dan san
```sh
brew install starship
```
Dengan [Scoop](https://scoop.sh):
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. Tambahkan skrip init ke dalam file konfigurasi Shell:

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:
@ -80,9 +106,9 @@ load(io.popen('starship init cmd'):read("*a"))()
## Kustomisasi Perintah pre-prompt dan pre-execution Pada Bash
Bash tidak memiliki framework preexec/precmd yang tetap seperti kebanyakan shell pada umumnya. Oleh karena itu, sulit halnya untuk membuat hook yang dapat dikustomisasi sepenuhnya di dalam `bash`. Namun, Starship memberikan beberapa cara supaya kamu bisa memasukkan fungsimu sendiri ke dalam prosedur prompt-rendering:
Bash tidak memiliki framework preexec/precmd yang tetap seperti kebanyakan shell pada umumnya. Oleh karena itu, sulit halnya untuk membuat hook yang dapat dikustomisasi sepenuhnya di dalam `bash`. Namun, Starship memberimu sedikit kemampuan untuk bisa menambahkan function milikmu ke dalam prosedur prompt-rendering:
- Untuk menjalankan fungsi yang dikustomisasi tepat sebelum prompt, buatlah sebuah fungsi baru lalu berikan nama `starship_precmd_user_func` ke fungsi tersebut. Sebagai contoh, untuk menampilkan gambar roket sebelum prompt, kamu bisa melakukannya dengan cara
- Untuk menjalankan custom function tepat sebelum prompt, buatlah sebuah fungsi baru lalu berikan nama `starship_precmd_user_func` ke fungsi tersebut. Sebagai contoh, untuk menampilkan roket sebelum prompt, kamu bisa
```bash
function blastoff(){
@ -91,7 +117,7 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- Untuk menjalankan fungsi yang dikustomisasi tepat sebelum commands berjalan, kamu bisa menggunakan [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Akan tetapi, kamu **harus** melakukan proses trap pada DEBUG signal _sebelum_ menjalankan Starship! Starship bisa menyimpan nilai dari DEBUG trap, tapi jika trap diganti setelah starship berjalan, beberapa fungsi akan rusak.
- Untuk menjalankan custom function tepat sebelum perintah berjalan, kamu bisa menggunakan [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Akan tetapi, kamu **harus** melakukan proses trap pada DEBUG signal _sebelum_ menjalankan Starship! Starship bisa menyimpan nilai dari DEBUG trap, tapi jika trap diganti setelah starship berjalan, beberapa fungsi akan rusak.
```bash
function blastoff(){
@ -105,7 +131,7 @@ set +o functrace
## Perintah Custom pre-promt dan pre-execution di PowerShell
PowerShell tidak memiliki framework preecex/precmd seperti kebanyak shells pada umumnya. Karena itu, sulit halnya untuk membuat hook yang dapat dikustomisasi sepenuhnya di dalam `powershell`. Namun, Starship memberikan beberapa cara supaya kamu bisa memasukkan fungsimu sendiri ke dalam prosedur prompt-rendering:
PowerShell tidak memiliki framework preecex/precmd seperti kebanyak shells pada umumnya. Karena itu, sulit halnya untuk membuat hook yang dapat dikustomisasi sepenuhnya di dalam `powershell`. Namun, Starship memberimu sedikit kemampuan untuk bisa menambahkan function milikmu ke dalam prosedur prompt-rendering:
Buatlah sebuah funciton dengan nama `Invoke-Starship-PreCommand`
@ -119,7 +145,7 @@ function Invoke-Starship-PreCommand {
Beberapa prompt shell dengan otomatis akan mengubah judul window-nya untukmu (mis. untuk merefleksikan direktori kerjamu). Fish bahkan mengaturnya sebagai bawaan. Di dalam Starship tidak bisa, namun mudah halnya untuk menambahkan fungsionalitas tersebut ke dalam `bash`, `zsh`, `cmd` ataupun `powershell`.
Pertama, buatlah fungsi untuk mengubah judul window (bekerja pada bash dan zsh):
Pertama, buatlah function untuk mengubah judul window (pada bash dan zsh):
```bash
function set_win_title(){
@ -129,7 +155,7 @@ function set_win_title(){
Kamu bisa menggunakan variabel untuk mengkustomisasi judulnya (`$USER`, `$HOSTNAME`, dan `$PWD` adalah opsi yang populer).
Di dalam `bash`, atur fungsi berikut menjadi fungsi precmd untuk starship:
Di dalam `bash`, atur function berikut menjadi function precmd untuk starship:
```bash
starship_precmd_user_func="set_win_title"
@ -141,7 +167,7 @@ Dalam `zsh`, pada array `precmd_functions`, tambahkan:
precmd_functions+=(set_win_title)
```
Kalau kamu suka hasilnya, tambahkan baris (`~/.bashrc` or `~/.zshrc`) ke dalam file konfigurasi shell milikmu untuk membuatnya permanen.
Kalau kamu suka dengan hasilnya, tambahkan baris (`~/.bashrc` or `~/.zshrc`) ke dalam file konfigurasi shell milikmu untuk membuatnya menjadi tetap.
Sebagai contoh, kalau kamu mau menampilkan lokasi direktori pada judul label terminalmu, tambahkan bagian berikut ke dalam `~/.bashrc` atau `~/.zshrc`:
@ -224,7 +250,7 @@ continuation_prompt = "▶▶"
## Menata String
Penataan string adalah kumpulan kata-kata, yang dipisahkan oleh ruang kosong. Kumpulan katanya tidak bersifat case sensitive (mis. `tebal` dan `TeBaL` dianggap sebagai string yang sama). Tiap-tiap kata berikut adalah opsinya:
Penataan string adalah kumpulan kata-kata, yang dipisahkan oleh ruang kosong. Kumpulannya tidak bersifat case sensitive (mis. `tebal` dan `TeBaL` dianggap sebagai string yang sama). Tiap-tiap kata berikut adalah opsinya:
- `bold`
- `italic`

View File

@ -162,13 +162,15 @@ Berikut adalah opsi konfigurasi dari list yang bersifat prompt-wide.
### Opsi
| Opsi | Bawaan | Deskripsi |
| ----------------- | ------------------------------ | ---------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Mengkonfigurasi format pada prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Batas waktu starpship untuk memindai file (dalam milidetik). |
| `command_timeout` | `500` | Batas waktu untuk perintah yang dijalankan starship (dalam milidetik). |
| `add_newline` | `true` | Memasukkan baris kosong antara prompt shell. |
| Opsi | Bawaan | Deskripsi |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Mengkonfigurasi format pada prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Batas waktu starpship untuk memindai file (dalam milidetik). |
| `command_timeout` | `500` | Batas waktu untuk perintah yang dijalankan starship (dalam milidetik). |
| `add_newline` | `true` | Memasukkan baris kosong antara prompt shell. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### Contoh
@ -184,8 +186,18 @@ format = """
# Menunggu 10 milidetik untuk starship mencek file pada direktori terkini.
scan_timeout = 10
# Menonaktifkan baris kosong di awal prompt
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Format Prompt Bawaan
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +444,12 @@ Nilai bawaan untuk opsi `charging_symbol` dan `discharging_symbol` adalah nilai
Opsi dari `display` merupakan sebuah array dari tabel berikut.
| Opsi | Bawaan | Deskripsi |
| -------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `bold red` | The style used if the display option is in use. |
| `charging_symbol` | `-` | Simbol opsional ditampilan jika opsi tampilan sedang digunakan, bawaan untuk opsi `charging_symbol` dari baterai. |
| `discharging_symbol` | `-` | Simbol opsional ditampilan jika opsi tampilan sedang digunakan, bawaan untuk opsi `discharging_symbol` dari baterai. |
| Opsi | Bawaan | Deskripsi |
| -------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `"red bold"` | The style used if the display option is in use. |
| `charging_symbol` | | Simbol opsional ditampilan jika opsi tampilan sedang digunakan, bawaan untuk opsi `charging_symbol` dari baterai. |
| `discharging_symbol` | | Simbol opsional ditampilan jika opsi tampilan sedang digunakan, bawaan untuk opsi `discharging_symbol` dari baterai. |
#### Contoh
@ -462,24 +475,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### Opsi
| Opsi | Bawaan | Deskripsi |
| ------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `fromat` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | Format dari versi. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | filenames mana yang sebaiknya memicu modul ini. |
| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. |
| `style` | `"bold blue"` | Gaya penataan untuk modul. |
| `disabled` | `false` | Menonaktifkan modul `elixir`. |
| Opsi | Bawaan | Deskripsi |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `fromat` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | Format dari versi. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | filenames mana yang sebaiknya memicu modul ini. |
| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. |
| `style` | `"bold blue"` | Gaya penataan untuk modul. |
| `disabled` | `false` | Menonaktifkan modul `elixir`. |
### Variabel
| Variabel | Contoh | Deskripsi |
| ------------- | -------- | --------------------------------- |
| `buf_version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Menyalin nilai dari opsi `symbol` |
| `style`* | | Menyalin nilai dari opsi `style` |
| Variabel | Contoh | Deskripsi |
| --------- | -------- | --------------------------------- |
| `version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Menyalin nilai dari opsi `symbol` |
| `style`* | | Menyalin nilai dari opsi `style` |
*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string
@ -609,9 +622,9 @@ Secara bawaan karakter hanya dapat mengganti warna. Jika kamu juga ingin menggan
### Variabel
| Variabel | Contoh | Deskripsi |
| -------- | ------ | ---------------------------------------------------------------------- |
| symbol | | Representasi dari `success_symbol`, `error_symbol` atau `vicmd_symbol` |
| Variabel | Contoh | Deskripsi |
| -------- | ------ | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Contoh
@ -794,12 +807,12 @@ The `container` module displays a symbol and container name, if inside a contain
### Opsi
| Opsi | Bawaan | Deskripsi |
| ---------- | -------------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | Gaya penataan untuk modul. |
| `fromat` | `"[$symbol \\[$name\\]]($style) "` | Format dari modul. |
| `disabled` | `false` | Disables the `container` module. |
| Opsi | Bawaan | Deskripsi |
| ---------- | ---------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | Gaya penataan untuk modul. |
| `fromat` | `'[$symbol \[$name\]]($style) '` | Format dari modul. |
| `disabled` | `false` | Disables the `container` module. |
### Variabel
@ -817,7 +830,7 @@ The `container` module displays a symbol and container name, if inside a contain
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Opsi
| Opsi | Bawaan | Deskripsi |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------- |
| `fromat` | `via [$symbol($version )]($style)` | Format dari modul. |
| `version_format` | `v${raw}` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | Gaya penataan untuk modul. |
| `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. |
| `detect_files` | `["daml.yaml"]` | filenames mana yang sebaiknya memicu modul ini. |
| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. |
| `disabled` | `false` | Disables the `daml` module. |
| Opsi | Bawaan | Deskripsi |
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- |
| `fromat` | `"via [$symbol($version )]($style)"` | Format dari modul. |
| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | Gaya penataan untuk modul. |
| `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. |
| `detect_files` | `["daml.yaml"]` | filenames mana yang sebaiknya memicu modul ini. |
| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. |
| `disabled` | `false` | Disables the `daml` module. |
### Variabel
@ -993,7 +1006,7 @@ Sebagai contoh, untuk `~/Dev/Nix/nixpkgs/pkgs` dimana `nixpkgs` merupakan root r
| `read_only` | `"🔒"` | Simbol yang mengindikasikan direktori saat ini bersifat read only. |
| `read_only_style` | `"red"` | Corak gaya untuk simbol read only. |
| `truncation_symbol` | `""` | Simbol untuk awalan jalur yang disingkat. misalnya: ".../" |
| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `home_symbol` | `"~"` | Simbol yang mengindikasikan direktori home. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
@ -1480,16 +1493,16 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### Opsi
| Opsi | Bawaan | Deskripsi |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `fromat` | `"[\\($hash$tag\\)]($style) "` | Format dari modul. |
| `style` | `"bold green"` | Gaya penataan untuk modul. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
| Opsi | Bawaan | Deskripsi |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `fromat` | `'[\($hash$tag\)]($style) '` | Format dari modul. |
| `style` | `"bold green"` | Gaya penataan untuk modul. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
### Variabel
@ -1567,7 +1580,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `fromat` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Format dari modul. |
| `fromat` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | Format dari modul. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variabel
@ -1588,7 +1601,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git Status
@ -1690,7 +1703,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
### Opsi
| Opsi | Bawaan | Deskripsi |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `fromat` | `"via [${symbol}(${version} )]($style)"` | Format dari modul. |
| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Ekstensi mana yang sebaiknya memicu modul ini. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | filenames mana yang sebaiknya memicu modul ini. |
| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | Gaya penataan untuk modul. |
| `disabled` | `false` | Disables the `java` module. |
| Opsi | Bawaan | Deskripsi |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `fromat` | `"via [${symbol}(${version} )]($style)"` | Format dari modul. |
| `version_format` | `"v${raw}"` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Ekstensi mana yang sebaiknya memicu modul ini. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | filenames mana yang sebaiknya memicu modul ini. |
| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | Gaya penataan untuk modul. |
| `disabled` | `false` | Disables the `java` module. |
### Variabel
@ -2258,6 +2271,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Opsi
| Opsi | Bawaan | Deskripsi |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. |
| `fromat` | `"via [$symbol$project]($style) "` | Format dari modul. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | Gaya penataan untuk modul. |
| `disabled` | `false` | Disables the `meson` module. |
### Variabel
| Variabel | Contoh | Deskripsi |
| --------- | ---------- | --------------------------------- |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Menyalin nilai dari opsi `symbol` |
| style\* | | Menyalin nilai dari opsi `style` |
*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string
### Contoh
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory.
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### Opsi
| Opsi | Bawaan | Deskripsi |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `fromat` | `"on [$symbol$cloud(\\($project\\))]($style) "` | Format dari modul. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | Gaya penataan untuk modul. |
| `disabled` | `false` | Disables the `openstack` module. |
| Opsi | Bawaan | Deskripsi |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `fromat` | `'on [$symbol$cloud(\($project\))]($style) '` | Format dari modul. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | Gaya penataan untuk modul. |
| `disabled` | `false` | Disables the `openstack` module. |
### Variabel
@ -2495,7 +2547,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
@ -3077,16 +3129,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Opsi | Bawaan | Deskripsi |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `fromat` | `"[$indicator]($style) "` | Format dari modul. |
| `style` | `"white bold"` | Gaya penataan untuk modul. |
@ -3227,23 +3279,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Opsi
| Opsi | Bawaan | Deskripsi |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `fromat` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Gaya penataan untuk modul. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| Opsi | Bawaan | Deskripsi |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `fromat` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Gaya penataan untuk modul. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variabel
@ -3288,13 +3340,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Opsi
| Opsi | Bawaan | Deskripsi |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `fromat` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | Gaya penataan untuk modul. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| Opsi | Bawaan | Deskripsi |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `fromat` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | Gaya penataan untuk modul. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Variabel
@ -3762,7 +3814,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,7 +220,6 @@ Alternatively, install Starship using any of the following package managers:
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

View File

@ -55,11 +55,10 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
```sh
brew install starship
```
Con [Scoop](https://scoop.sh):
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. Aggiungi lo script di inizializzazione al file di configurazione della shell:

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:

View File

@ -162,13 +162,15 @@ This is the list of prompt-wide configuration options.
### Opzioni
| Opzione | Default | Descrizione |
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configura il formato del prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout per starship per scansionare i file (in millisecondi). |
| `command_timeout` | `500` | Timeout per i comandi eseguiti da starship (in millisecondi). |
| `add_newline` | `true` | Inserisce una riga vuota tra i prompt della shell. |
| Opzione | Default | Descrizione |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configura il formato del prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout per starship per scansionare i file (in millisecondi). |
| `command_timeout` | `500` | Timeout per i comandi eseguiti da starship (in millisecondi). |
| `add_newline` | `true` | Inserisce una riga vuota tra i prompt della shell. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### Esempio
@ -186,6 +188,16 @@ scan_timeout = 10
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Default Prompt Format
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +444,12 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
The `display` option is an array of the following table.
| Opzione | Default | Descrizione |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `bold red` | The style used if the display option is in use. |
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
| Opzione | Default | Descrizione |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `"red bold"` | The style used if the display option is in use. |
| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
#### Esempio
@ -462,24 +475,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### Opzioni
| Opzione | Default | Descrizione |
| ------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | Il formato della versione. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `elixir` module. |
| Opzione | Default | Descrizione |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | Il formato della versione. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `elixir` module. |
### Variables
| Variable | Esempio | Descrizione |
| ------------- | -------- | ------------------------------------ |
| `buf_version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
| Variable | Esempio | Descrizione |
| --------- | -------- | ------------------------------------ |
| `version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
@ -609,9 +622,9 @@ By default it only changes color. If you also want to change its shape take a lo
### Variables
| Variable | Esempio | Descrizione |
| -------- | ------- | --------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
| Variable | Esempio | Descrizione |
| -------- | ------- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Examples
@ -794,12 +807,12 @@ The `container` module displays a symbol and container name, if inside a contain
### Opzioni
| Opzione | Default | Descrizione |
| ---------- | -------------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | Lo stile per il modulo. |
| `format` | `"[$symbol \\[$name\\]]($style) "` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
| Opzione | Default | Descrizione |
| ---------- | ---------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | Lo stile per il modulo. |
| `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
@ -817,7 +830,7 @@ The `container` module displays a symbol and container name, if inside a contain
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Opzioni
| Opzione | Default | Descrizione |
| ------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | The format for the module. |
| `version_format` | `v${raw}` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | Lo stile per il modulo. |
| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `["daml.yaml"]` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
| `disabled` | `false` | Disables the `daml` module. |
| Opzione | Default | Descrizione |
| ------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | Lo stile per il modulo. |
| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `["daml.yaml"]` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
| `disabled` | `false` | Disables the `daml` module. |
### Variables
@ -993,7 +1006,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `home_symbol` | `"~"` | The symbol indicating home directory. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
@ -1480,16 +1493,16 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### Opzioni
| Opzione | Default | Descrizione |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
| `style` | `"bold green"` | Lo stile per il modulo. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
| Opzione | Default | Descrizione |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `'[\($hash$tag\)]($style) '` | The format for the module. |
| `style` | `"bold green"` | Lo stile per il modulo. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
### Variables
@ -1567,7 +1580,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | The format for the module. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
@ -1588,7 +1601,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git Status
@ -1690,7 +1703,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
### Opzioni
| Opzione | Default | Descrizione |
| ------------------- | --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `java` module. |
| Opzione | Default | Descrizione |
| ------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minore`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Quali estensioni dovrebbero attivare questo modulo. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Quali nomi di file dovrebbero attivare questo modulo. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `java` module. |
### Variables
@ -2258,6 +2271,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Opzioni
| Opzione | Default | Descrizione |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. |
| `format` | `"via [$symbol$project]($style) "` | The format for the module. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blu grassetto"` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `meson` module. |
### Variables
| Variable | Esempio | Descrizione |
| --------- | ---------- | ------------------------------------ |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### Esempio
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory.
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### Opzioni
| Opzione | Default | Descrizione |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `openstack` module. |
| Opzione | Default | Descrizione |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | Lo stile per il modulo. |
| `disabled` | `false` | Disables the `openstack` module. |
### Variables
@ -2495,7 +2547,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
@ -3077,16 +3129,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Opzione | Default | Descrizione |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | The format for the module. |
| `style` | `"white bold"` | Lo stile per il modulo. |
@ -3227,23 +3279,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Opzioni
| Opzione | Default | Descrizione |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Lo stile per il modulo. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| Opzione | Default | Descrizione |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Lo stile per il modulo. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables
@ -3288,13 +3340,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Opzioni
| Opzione | Default | Descrizione |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | Lo stile per il modulo. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| Opzione | Default | Descrizione |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | Lo stile per il modulo. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Variables
@ -3762,7 +3814,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,7 +220,6 @@ Alternatively, install Starship using any of the following package managers:
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

View File

@ -55,11 +55,10 @@ description: Starship はミニマルで、非常に高速で、カスタマイ
```sh
brew install starship
```
[ Scoop ](https://scoop.sh)の場合:
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. 初期化のためのスクリプトをシェルの設定ファイルに追加

View File

@ -54,6 +54,32 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## TransientPrompt and TransientRightPrompt in Fish
過去に出力されたプロンプトを置き換えることができます。 全ての情報が必要では無い時に役に立ちます。 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.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. Starshipの `character` モジュールを表示する場合はこのようにします:
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:

View File

@ -161,13 +161,15 @@ detect_extensions = ["ts", "!video.ts", "!audio.ts"]
### オプション
| オプション | デフォルト | 説明 |
| ----------------- | ------------------------------ | ------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | プロンプトの形式を設定します。 |
| `right_format` | `""` | [右プロンプトの有効化](/advanced-config/#enable-right-prompt)を参照してください。 |
| `scan_timeout` | `30` | ファイルをスキャンする際のタイムアウト時間 (milliseconds) です。 |
| `command_timeout` | `500` | Starshipによって実行されたコマンドのタイムアウト時間 (milliseconds) です。 |
| `add_newline` | `true` | シェルプロンプトの間に空行を挿入します。 |
| オプション | デフォルト | 説明 |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | プロンプトの形式を設定します。 |
| `right_format` | `""` | [右プロンプトの有効化](/advanced-config/#enable-right-prompt)を参照してください。 |
| `scan_timeout` | `30` | ファイルをスキャンする際のタイムアウト時間 (milliseconds) です。 |
| `command_timeout` | `500` | Starshipによって実行されたコマンドのタイムアウト時間 (milliseconds) です。 |
| `add_newline` | `true` | シェルプロンプトの間に空行を挿入します。 |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### 設定例
@ -184,8 +186,18 @@ format = """
scan_timeout = 10
# プロンプトの先頭の空行を無効にします
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### デフォルトのプロンプトフォーマット
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -429,12 +442,12 @@ style = "bold red"
`display`オプションは、次の表の通りです。
| オプション | デフォルト | 説明 |
| -------------------- | ---------- | -------------------------------------------------------------------------------------- |
| `threshold` | `10` | バッテリーが表示される上限です。 |
| `style` | `bold red` | displayオプションが使用されている場合のスタイルです。 |
| `charging_symbol` | `-` | displayオプションが使用されている場合はこののシンボルが表示されます。デフォルトはバッテリーの `charging_symbol` オプションと同じになります。 |
| `discharging_symbol` | `-` | displayオプションが使用されている場合はこののシンボルが表示されます。デフォルトはバッテリーの `discharging_symbol` オプションと同じになります。 |
| オプション | デフォルト | 説明 |
| -------------------- | ------------ | -------------------------------------------------------------------------------------- |
| `threshold` | `10` | バッテリーが表示される上限です。 |
| `style` | `"red bold"` | displayオプションが使用されている場合のスタイルです。 |
| `charging_symbol` | | displayオプションが使用されている場合はこののシンボルが表示されます。デフォルトはバッテリーの `charging_symbol` オプションと同じになります。 |
| `discharging_symbol` | | displayオプションが使用されている場合はこののシンボルが表示されます。デフォルトはバッテリーの `discharging_symbol` オプションと同じになります。 |
#### 設定例
@ -460,24 +473,24 @@ discharging_symbol = "💦"
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------------------------------ | -------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | `buf`モジュールの形式。 |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 |
| `symbol` | `"🦬 "` | Bufのバージョンを表示する前に使用される記号です。 |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
| `style` | `"bold blue"` | モジュールのスタイルです。 |
| `disabled` | `false` | `elixir`モジュールを無効にします。 |
| オプション | デフォルト | 説明 |
| ------------------- | ----------------------------------------------- | -------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | `buf`モジュールの形式。 |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 |
| `symbol` | `"🦬 "` | Bufのバージョンを表示する前に使用される記号です。 |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
| `style` | `"bold blue"` | モジュールのスタイルです。 |
| `disabled` | `false` | `elixir`モジュールを無効にします。 |
### 変数
| 変数 | 設定例 | 説明 |
| ------------- | -------- | ---------------------- |
| `buf_version` | `v1.0.0` | `buf`のバージョン |
| `symbol` | | オプション `記号` の値をミラーする |
| `style`* | | オプション `style` の値をミラーする |
| 変数 | 設定例 | 説明 |
| --------- | -------- | ---------------------- |
| `version` | `v1.0.0` | `buf`のバージョン |
| `symbol` | | オプション `記号` の値をミラーする |
| `style`* | | オプション `style` の値をミラーする |
*: この変数は、スタイル文字列の一部としてのみ使用することができます。
@ -607,9 +620,9 @@ format = "via [$name $version]($style)"
### 変数
| 変数 | 設定例 | 説明 |
| ------ | --- | ----------------------------------------------------------- |
| symbol | | `success_symbol` 、もしくは `error_symbol``vicmd_symbol` のミラー |
| 変数 | 設定例 | 説明 |
| ------ | --- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### 設定例
@ -792,12 +805,12 @@ format = "[$symbol$environment](dimmed green) "
### オプション
| オプション | デフォルト | 説明 |
| ---------- | -------------------------------------- | ------------------------- |
| `symbol` | `"⬢"` | コンテナ内にいる場合、このシンボルが表示されます。 |
| `style` | `"bold red dimmed"` | モジュールのスタイルです。 |
| `format` | `"[$symbol \\[$name\\]]($style) "` | module のフォーマットです。 |
| `disabled` | `false` | `container`モジュールを無効にします。 |
| オプション | デフォルト | 説明 |
| ---------- | ---------------------------------- | ------------------------- |
| `symbol` | `"⬢"` | コンテナ内にいる場合、このシンボルが表示されます。 |
| `style` | `"bold red dimmed"` | モジュールのスタイルです。 |
| `format` | `'[$symbol \[$name\]]($style) '` | module のフォーマットです。 |
| `disabled` | `false` | `container`モジュールを無効にします。 |
### 変数
@ -815,7 +828,7 @@ format = "[$symbol$environment](dimmed green) "
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -865,16 +878,16 @@ format = "via [✨ $version](bold blue) "
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ---------------------------------- | ------------------------------------------------------ |
| `format` | `via [$symbol($version )]($style)` | module のフォーマットです。 |
| `version_format` | `v${raw}` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"Λ "` | Damlの記号を表すフォーマット文字列です。 |
| `style` | `"bold cyan"` | モジュールのスタイルです。 |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["daml.yaml"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
| `disabled` | `false` | `daml`モジュールを無効にします。 |
| オプション | デフォルト | 説明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | module のフォーマットです。 |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"Λ "` | Damlの記号を表すフォーマット文字列です。 |
| `style` | `"bold cyan"` | モジュールのスタイルです。 |
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["daml.yaml"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
| `disabled` | `false` | `daml`モジュールを無効にします。 |
### 変数
@ -991,7 +1004,7 @@ fishスタイルのpwdオプションを使用すると、切り捨てられた
| `read_only` | `"🔒"` | このシンボルが表示されている時、現在のディレクトリは読み取り専用です。 |
| `read_only_style` | `"red"` | 読み取り専用シンボルのスタイルです。 |
| `truncation_symbol` | `""` | 切り捨てられたパスの接頭辞として付けるシンボルです。 例: "…/" |
| `repo_root_style` | `None` | gitリポジトリのルートのスタイルです。 デフォルトの値は `style` と同じです。 |
| `repo_root_style` | | gitリポジトリのルートのスタイルです。 デフォルトの値は `style` と同じです。 |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | `repo_root_style` が定義されている場合の git リポジトリのフォーマットです。 |
| `home_symbol` | `"~"` | ホームディレクトリを示すシンボルです。 |
| `use_os_path_sep` | `true` | `/`を使用する代わりに、OS固有のパスの区切り文字を使用します。(例: Windowsの場合`\`) |
@ -1478,16 +1491,16 @@ ignore_branches = ["master", "main"]
### オプション
| オプション | デフォルト | 説明 |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | 表示されるgitコミットハッシュの長さです。 |
| `format` | `"[\\($hash$tag\\)]($style) "` | module のフォーマットです。 |
| `style` | `"bold green"` | モジュールのスタイルです。 |
| `only_detached` | `true` | detached `HEAD` 状態のときのみ git コミットハッシュを表示する |
| `tag_disabled` | `true` | `git_commit` モジュールのタグ情報の表示を無効にする。 |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | 表示される情報の前に追加されるタグシンボル |
| `disabled` | `false` | `git_commit` モジュールを無効にします。 |
| オプション | デフォルト | 説明 |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | 表示されるgitコミットハッシュの長さです。 |
| `format` | `'[\($hash$tag\)]($style) '` | module のフォーマットです。 |
| `style` | `"bold green"` | モジュールのスタイルです。 |
| `only_detached` | `true` | detached `HEAD` 状態のときのみ git コミットハッシュを表示する |
| `tag_disabled` | `true` | `git_commit` モジュールのタグ情報の表示を無効にする。 |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | 表示される情報の前に追加されるタグシンボル |
| `disabled` | `false` | `git_commit` モジュールを無効にします。 |
### 変数
@ -1565,7 +1578,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | module のフォーマットです。 |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | module のフォーマットです。 |
| `disabled` | `true` | Disables the `git_metrics` module. |
### 変数
@ -1586,7 +1599,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git Status
@ -1688,7 +1701,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1850,21 +1863,21 @@ disabled = false
`Java`モジュールは、現在インストールされている[Java](https://www.oracle.com/java/)のバージョンを表示します。 デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
- カレントディレクトリに`pom.xml`、`build.gradle.kts`、`build.sbt`、`.java-version`、`.deps.edn`、`project.clj`または`build.boot`が含まれている
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- カレントディレクトリに拡張子が`.java`、`.class`、`.gradle`、`.jar`、`.clj`または`.cljc`のファイルが含まれている
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| `format` | `"via [${symbol}(${version} )]($style)"` | module のフォーマットです。 |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | モジュールのスタイルです。 |
| `disabled` | `false` | `Java`モジュールを無効にします。 |
| オプション | デフォルト | 説明 |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| `format` | `"via [${symbol}(${version} )]($style)"` | module のフォーマットです。 |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | どの拡張子がこのモジュールをアクティブにするか |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | モジュールのスタイルです。 |
| `disabled` | `false` | `Java`モジュールを無効にします。 |
### 変数
@ -2256,6 +2269,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### オプション
| オプション | デフォルト | 説明 |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. `""`で記号なしにできます。 |
| `format` | `"via [$symbol$project]($style) "` | module のフォーマットです。 |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `meson` module. |
### 変数
| 変数 | 設定例 | 説明 |
| --------- | ---------- | ------------------------------ |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | オプション `記号` の値をミラーする |
| style\* | | オプション `style` の値をミラーする |
*: この変数は、スタイル文字列の一部としてのみ使用することができます。
### 設定例
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
` hg_branch `モジュールは、現在のディレクトリにあるリポジトリのアクティブなブランチを示します。
@ -2469,12 +2521,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### オプション
| オプション | デフォルト | 説明 |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | module のフォーマットです。 |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `openstack` module. |
| オプション | デフォルト | 説明 |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | module のフォーマットです。 |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
| `disabled` | `false` | Disables the `openstack` module. |
### 変数
@ -2493,14 +2545,14 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
## パッケージのバージョン
`package`モジュールは、現在のディレクトリがパッケージのリポジトリである場合に表示され、現在のバージョンが表示されます。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart` packages.
`package` モジュールは、現在のディレクトリがパッケージのリポジトリである場合に表示され、現在のバージョンが表示されます。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart` packages.
- [**npm**](https://docs.npmjs.com/cli/commands/npm) The `npm` package version is extracted from the `package.json` present in the current directory
- [**Cargo**](https://doc.rust-lang.org/cargo/) The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
@ -2531,7 +2583,7 @@ symbol = "☁️ "
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `style` | `"bold 208"` | モジュールのスタイルです。 |
| `display_private` | `false` | Enable displaying version for packages marked as private. |
| `disabled` | `false` | `package`モジュールを無効にします。 |
| `disabled` | `false` | `package` モジュールを無効にします。 |
### 変数
@ -2751,7 +2803,7 @@ The `python` module shows the currently installed version of [Python](https://ww
| オプション | デフォルト | 説明 |
| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | moduleのフォーマットです。 |
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | module のフォーマットです。 |
| `version_format` | `"v${raw}"` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
| `style` | `"yellow bold"` | モジュールのスタイルです。 |
@ -3075,16 +3127,16 @@ The `shell` module shows an indicator for currently used shell.
| オプション | デフォルト | 説明 |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | module のフォーマットです。 |
| `style` | `"white bold"` | モジュールのスタイルです。 |
@ -3225,23 +3277,23 @@ The `status` module displays the exit code of the previous command. If $success_
### オプション
| オプション | デフォルト | 説明 |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| オプション | デフォルト | 説明 |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | モジュールのスタイルです。 |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### 変数
@ -3286,13 +3338,13 @@ The `sudo` module displays if sudo credentials are currently cached. The module
### オプション
| オプション | デフォルト | 説明 |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | モジュールのスタイルです。 |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| オプション | デフォルト | 説明 |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | モジュールのスタイルです。 |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### 変数
@ -3388,7 +3440,7 @@ Terraformのバージョンはデフォルトでは表示されません。多
| `detect_files` | `[]` | どのファイル名がこのモジュールをアクティブにするか |
| `detect_folders` | `[".terraform"]` | どのフォルダーがこのモジュールをアクティブにするか |
| `style` | `"bold 105"` | モジュールのスタイルです。 |
| `disabled` | `false` | `terraform`モジュールを無効にします。 |
| `disabled` | `false` | `terraform` モジュールを無効にします。 |
### 変数
@ -3449,7 +3501,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. それ以外の
| 変数 | 設定例 | 説明 |
| --------- | ---------- | ---------------------- |
| 時刻 | `13:08:10` | The current time. |
| time | `13:08:10` | The current time. |
| style\* | | オプション `style` の値をミラーする |
*: この変数は、スタイル文字列の一部としてのみ使用することができます。
@ -3469,7 +3521,7 @@ time_range = "10:00:00-14:00:00"
## ユーザー名
`username`モジュールには、アクティブなユーザーのユーザー名が表示されます。 次の条件のいずれかが満たされると、モジュールが表示されます:
`username`モジュールはアクティブなユーザーのユーザー名を表示します。 次の条件のいずれかが満たされると、モジュールが表示されます:
- The current user is root/admin
- カレントユーザーが、ログインしているユーザーとは異なる
@ -3489,8 +3541,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
| `style_root` | `"bold red"` | The style used when the user is root/admin. |
| `style_user` | `"bold yellow"` | 非rootユーザーに使用されるスタイルです。 |
| `format` | `"[$user]($style) in "` | module のフォーマットです。 |
| `show_always` | `false` | `username`モジュールを常に表示します。 |
| `disabled` | `false` | `username`モジュールを無効にします。 |
| `show_always` | `false` | `username` モジュールを常に表示します。 |
| `disabled` | `false` | `username` モジュールを無効にします。 |
### 変数
@ -3760,7 +3812,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,7 +220,6 @@ curl -sS https://starship.rs/install.sh | sh
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

View File

@ -55,11 +55,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
```sh
brew install starship
```
[Scoop](https://scoop.sh)을 통한 설치:
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. 쉘 설정 파일에 init 스크립트 추가:

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:

View File

@ -162,13 +162,15 @@ This is the list of prompt-wide configuration options.
### Options
| Option | Default | Description |
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| Option | Default | Description |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### Example
@ -186,6 +188,16 @@ scan_timeout = 10
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Default Prompt Format
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +444,12 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
The `display` option is an array of the following table.
| Option | Default | Description |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `bold red` | The style used if the display option is in use. |
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
| Option | Default | Description |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `"red bold"` | The style used if the display option is in use. |
| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
#### Example
@ -462,24 +475,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### Options
| Option | Default | Description |
| ------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `elixir` module. |
| Option | Default | Description |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `elixir` module. |
### Variables
| Variable | Example | Description |
| ------------- | -------- | ------------------------------------ |
| `buf_version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
| Variable | Example | Description |
| --------- | -------- | ------------------------------------ |
| `version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
@ -609,9 +622,9 @@ By default it only changes color. If you also want to change its shape take a lo
### Variables
| Variable | Example | Description |
| -------- | ------- | --------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
| Variable | Example | Description |
| -------- | ------- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Examples
@ -794,12 +807,12 @@ The `container` module displays a symbol and container name, if inside a contain
### Options
| Option | Default | Description |
| ---------- | -------------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | `"[$symbol \\[$name\\]]($style) "` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
| Option | Default | Description |
| ---------- | ---------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
@ -817,7 +830,7 @@ The `container` module displays a symbol and container name, if inside a contain
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Options
| Option | Default | Description |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | The format for the module. |
| `version_format` | `v${raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
### Variables
@ -993,7 +1006,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `home_symbol` | `"~"` | The symbol indicating home directory. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
@ -1480,16 +1493,16 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### Options
| Option | Default | Description |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
| `style` | `"bold green"` | The style for the module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
| Option | Default | Description |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `'[\($hash$tag\)]($style) '` | The format for the module. |
| `style` | `"bold green"` | The style for the module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
### Variables
@ -1567,7 +1580,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | The format for the module. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
@ -1588,7 +1601,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git Status
@ -1690,7 +1703,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
### Options
| Option | Default | Description |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
| Option | Default | Description |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
### Variables
@ -2258,6 +2271,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Options
| Option | Default | Description |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. |
| `format` | `"via [$symbol$project]($style) "` | The format for the module. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | The style for the module. |
| `disabled` | `false` | Disables the `meson` module. |
### Variables
| Variable | Example | Description |
| --------- | ---------- | ------------------------------------ |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory.
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### Options
| Option | Default | Description |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
| Option | Default | Description |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
### Variables
@ -2495,7 +2547,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
@ -3077,16 +3129,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Default | Description |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | The format for the module. |
| `style` | `"white bold"` | The style for the module. |
@ -3227,23 +3279,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | Default | Description |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| Option | Default | Description |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables
@ -3288,13 +3340,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | Default | Description |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| Option | Default | Description |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Variables
@ -3762,7 +3814,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,7 +220,6 @@ Alternatively, install Starship using any of the following package managers:
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

View File

@ -55,11 +55,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
```sh
brew install starship
```
Met [Scoop](https://scoop.sh):
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. Voeg het initscript toe aan het configuratiebestand van uw shell:

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:

View File

@ -162,13 +162,15 @@ This is the list of prompt-wide configuration options.
### Options
| Option | Default | Description |
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| Option | Default | Description |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### Example
@ -186,6 +188,16 @@ scan_timeout = 10
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Default Prompt Format
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +444,12 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
The `display` option is an array of the following table.
| Option | Default | Description |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `bold red` | The style used if the display option is in use. |
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
| Option | Default | Description |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `"red bold"` | The style used if the display option is in use. |
| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
#### Example
@ -462,24 +475,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### Options
| Option | Default | Description |
| ------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `elixir` module. |
| Option | Default | Description |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `elixir` module. |
### Variables
| Variable | Example | Description |
| ------------- | -------- | ------------------------------------ |
| `buf_version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
| Variable | Example | Description |
| --------- | -------- | ------------------------------------ |
| `version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
@ -609,9 +622,9 @@ By default it only changes color. If you also want to change its shape take a lo
### Variables
| Variable | Example | Description |
| -------- | ------- | --------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
| Variable | Example | Description |
| -------- | ------- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Examples
@ -794,12 +807,12 @@ The `container` module displays a symbol and container name, if inside a contain
### Options
| Option | Default | Description |
| ---------- | -------------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | `"[$symbol \\[$name\\]]($style) "` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
| Option | Default | Description |
| ---------- | ---------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
@ -817,7 +830,7 @@ The `container` module displays a symbol and container name, if inside a contain
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Options
| Option | Default | Description |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | The format for the module. |
| `version_format` | `v${raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
### Variables
@ -993,7 +1006,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `home_symbol` | `"~"` | The symbol indicating home directory. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
@ -1480,16 +1493,16 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### Options
| Option | Default | Description |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
| `style` | `"bold green"` | The style for the module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
| Option | Default | Description |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `'[\($hash$tag\)]($style) '` | The format for the module. |
| `style` | `"bold green"` | The style for the module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
### Variables
@ -1567,7 +1580,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | The format for the module. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
@ -1588,7 +1601,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git Status
@ -1690,7 +1703,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
### Options
| Option | Default | Description |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
| Option | Default | Description |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
### Variables
@ -2258,6 +2271,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Options
| Option | Default | Description |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. |
| `format` | `"via [$symbol$project]($style) "` | The format for the module. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | The style for the module. |
| `disabled` | `false` | Disables the `meson` module. |
### Variables
| Variable | Example | Description |
| --------- | ---------- | ------------------------------------ |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory.
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### Options
| Option | Default | Description |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
| Option | Default | Description |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
### Variables
@ -2495,7 +2547,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
@ -3077,16 +3129,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Default | Description |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | The format for the module. |
| `style` | `"white bold"` | The style for the module. |
@ -3227,23 +3279,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | Default | Description |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| Option | Default | Description |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables
@ -3288,13 +3340,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | Default | Description |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| Option | Default | Description |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Variables
@ -3762,7 +3814,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -218,7 +218,6 @@ Alternatively, install Starship using any of the following package managers:
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

View File

@ -55,11 +55,10 @@ description: Starship to minimalny, szybki i ekstremalnie konfigurowalny wiersz
```sh
brew install starship
```
Za pomocą [Scoop](https://scoop.sh):
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. Dodaj skrypt inicjalizacyjny do konfiguracji twojej powłoki:

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:

View File

@ -162,13 +162,15 @@ This is the list of prompt-wide configuration options.
### Options
| Option | Default | Description |
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| Option | Default | Description |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### Example
@ -186,6 +188,16 @@ scan_timeout = 10
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Default Prompt Format
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +444,12 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
The `display` option is an array of the following table.
| Option | Default | Description |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `bold red` | The style used if the display option is in use. |
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
| Option | Default | Description |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `"red bold"` | The style used if the display option is in use. |
| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
#### Example
@ -462,24 +475,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### Options
| Option | Default | Description |
| ------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `elixir` module. |
| Option | Default | Description |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `elixir` module. |
### Variables
| Zmienne | Example | Description |
| ------------- | -------- | ------------------------------------ |
| `buf_version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
| Zmienne | Example | Description |
| --------- | -------- | ------------------------------------ |
| `version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
@ -609,9 +622,9 @@ By default it only changes color. If you also want to change its shape take a lo
### Variables
| Zmienne | Example | Description |
| ------- | ------- | --------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
| Zmienne | Example | Description |
| ------- | ------- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Examples
@ -794,12 +807,12 @@ The `container` module displays a symbol and container name, if inside a contain
### Options
| Option | Default | Description |
| ---------- | -------------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | `"[$symbol \\[$name\\]]($style) "` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
| Option | Default | Description |
| ---------- | ---------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
@ -817,7 +830,7 @@ The `container` module displays a symbol and container name, if inside a contain
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Options
| Option | Default | Description |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | The format for the module. |
| `version_format` | `v${raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
### Variables
@ -993,7 +1006,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `home_symbol` | `"~"` | The symbol indicating home directory. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
@ -1480,16 +1493,16 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### Options
| Option | Default | Description |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
| `style` | `"bold green"` | The style for the module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
| Option | Default | Description |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `'[\($hash$tag\)]($style) '` | The format for the module. |
| `style` | `"bold green"` | The style for the module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
### Variables
@ -1567,7 +1580,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | The format for the module. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
@ -1588,7 +1601,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git Status
@ -1690,7 +1703,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
### Options
| Option | Default | Description |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
| Option | Default | Description |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
### Variables
@ -2258,6 +2271,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Options
| Option | Default | Description |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. |
| `format` | `"via [$symbol$project]($style) "` | The format for the module. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | The style for the module. |
| `disabled` | `false` | Disables the `meson` module. |
### Variables
| Zmienne | Example | Description |
| --------- | ---------- | ------------------------------------ |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory.
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### Options
| Option | Default | Description |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
| Option | Default | Description |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
### Variables
@ -2495,7 +2547,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
@ -3077,16 +3129,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Default | Description |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | The format for the module. |
| `style` | `"white bold"` | The style for the module. |
@ -3227,23 +3279,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | Default | Description |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| Option | Default | Description |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables
@ -3288,13 +3340,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | Default | Description |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| Option | Default | Description |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Variables
@ -3762,7 +3814,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,7 +220,6 @@ Alternatively, install Starship using any of the following package managers:
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

View File

@ -55,11 +55,10 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
```sh
brew install starship
```
Com o [Scoop](https://scoop.sh):
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. Adicione o script de inicialização no arquivo de configuração do seu shell:

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:
@ -78,11 +104,11 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## Comandos personalizados de pre-prompt e pre-execution no Bash
## Comandos personalizados de pré-prompt e pré-execução no Bash
O Bash não possui uma estrutura formal para os hooks preexec/precmd como a maioria dos outros shells. Por esse motivo, é difícil fornecer hooks totalmente customizáveis no `bash`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering:
Bash não possui uma estrutura formal pré-prompt/pré-execução como a maioria dos outros shells. Por causa disso, é difícil fornecer ganchos totalmente personalizáveis no `bash`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering:
- Para rodar uma função personalizada antes do prompt iniciar, defina uma nova função e atribua seu nome para `starship_precmd_user_func`. Por exemplo, para desenhar um foguete antes do prompt iniciar você faria
- Para executar uma função personalizada logo antes de o prompt ser inicializado, define uma nova função e, em seguida, atribui seu nome a `starship_precmd_user_func`. Por exemplo, para exibir um foguete antes do prompt, você faria
```bash
function blastoff(){
@ -91,7 +117,7 @@ function blastoff(){
starship_precmd_user_func="blastoff"
```
- Para rodar uma função personalizada antes que um comando seja executado, você pode usar [`DEBUG` como mecanismo de armadilha](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). No entanto, você **deve** capturar o sinal DEBUG _antes_ de inicializar o Starship! O Starship consegue preservar o valor da armadilha DEBUG, mas se a armadilha for substituída depois do starship iniciar, algumas funções iram quebrar.
- Para executar uma função personalizada logo antes de um comando ser executado, você pode usar o [`DEBUG` mecanismo de captura](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). No entanto, você **deve** capturar o sinal DEBUG _antes_ de inicializar o Starship! Starship pode preservar o valor da captura do DEBUG, mas se a captura for substituída após a inicialização do starship, algumas funcionalidades serão interrompidas.
```bash
function blastoff(){
@ -103,9 +129,9 @@ eval $(starship init bash)
set +o functrace
```
## Comandos personalizados de pre-prompt e pre-execution no PowerShell
## Comandos personalizados de pré-prompt e pré-execução no PowerShell
O PowerShell não possui uma estrutura formal para os hooks preexec/precmd como a maioria dos outros shells. Por esse motivo, é difícil fornecer hooks totalmente customizáveis no `powershell`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering:
PowerShell não possui uma estrutura formal pré-prompt/pré-execução como a maioria dos outros shells. Por causa disso, é difícil fornecer ganchos totalmente personalizáveis no `powershell`. No entanto, Starship te oferece uma capacidade limitada de inserir suas próprias funções na processo de prompt-rendering:
Crie uma função chamada `Invoke-Starship-PreCommand`
@ -115,11 +141,11 @@ function Invoke-Starship-PreCommand {
}
```
## Altera o título da janela
## Alterar Título da Janela
Alguns shell prompts iram alterar o titulo da janela automaticamente para você (e.x: para espelhar o diretório atual). Fish faz isso por padrão. Starship não faz isso, mas é bastante simples adicionar essa funcionalidade para `bash`, `zsh`, `cmd` ou `powershell`.
Alguns prompts do shell alterarão automaticamente o título da janela para você (ex., para refletir no seu diretório de trabalho). Fish ainda faz isso por padrão. Starship não faz isso, mas é bastante simples adicionar essa funcionalidade para `bash`, `zsh`, `cmd` ou `powershell`.
Primeiro, defina uma função de alteração de titulo de janela (é o mesmo para bash e zsh):
Primeiro, defina uma função de mudança de título da janela (idêntica em bash e zsh):
```bash
function set_win_title(){
@ -127,23 +153,23 @@ function set_win_title(){
}
```
Você pode usar variáveis para customizar o titulo (`$USER`, `$HOSTNAME`, e `$PWD` são escolhas populares).
Você pode usar variáveis para personalizar este título (`$USER`, `$HOSTNAME` e `$PWD` são escolhas populares).
No `bash`, defina esta função como a precedente da função starship:
No `bash`, defina esta função como a função precmd da nave estelar:
```bash
starship_precmd_user_func="set_win_title"
```
No `zsh`, adicione no array `precmd_functions`:
No `zsh`, adicione isso ao array `precmd_functions`:
```bash
precmd_functions+=(set_win_title)
```
Se você gostar do resultado, adicione esta linha ao seu arquivo de configuração de shell (`~/.bashrc` or `~/.zshrc`) para torna-lo permanente.
Se você gostar do resultado, adicione estas linhas ao seu arquivo de configuração do shell (`~/.bashrc` ou `~/.zshrc`) para torná-lo permanente.
Por exemplo, se você quiser exibir seu diretório atual no seu titulo de aba do terminal, adicione o seguinte snippet ao seu `~/.bashrc` ou `~/.zshrc`:
Por exemplo, se você deseja exibir seu diretório atual no título da guia do terminal, adicione o seguinte trecho ao seu `~/.bashrc` ou `~/.zshrc`:
```bash
function set_win_title(){
@ -165,19 +191,19 @@ load(io.popen('starship init cmd'):read("*a"))()
Você também pode definir uma saída semelhante com o PowerShell criando uma função chamada `Invoke-Starship-PreCommand`.
```powershell
# edit $PROFILE
# editar $PROFILE
function Invoke-Starship-PreCommand {
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
}
Invoke-Expression (&starship init powershell)
Invoke-Expression (& starship init powershell)
```
## Ativando o Prompt Direito
Alguns shells suportam um prompt no lado direito que renderiza na mesma linha do input. Starship consegue definir o conteúdo do prompt direito usando a opção `right_format`. Qualquer módulo pode ser usado no `format` é suportado o `right_format`. A variável `$all` só irá alterar os módulos que não usaram de forma explicita o `format` ou `right_format`.
Alguns shells suportam um prompt direito que é renderizado na mesma linha que a entrada. Starship pode definir o conteúdo do prompt correto usando a opção `right_format`. Qualquer módulo que pode ser usado no `format` também é compatível com `right_format`. A variável `$all` conterá apenas módulos não usado explicitamente em `format` ou `right_format`.
Nota: O prompt direito é uma linha única seguindo 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).
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 compatível com os seguintes shells: elvish, fish, zsh, xonsh, cmd.
@ -186,14 +212,14 @@ Nota: O prompt direito é uma linha única seguindo o local de entrada. Para ali
```toml
# ~/.config/starship.toml
# Um prompt esquerdo minimo
# Um prompt mínimo à esquerda
format = """$character"""
# Move o resto do prompt para direita
# movw o restante do prompt para a direita
right_format = """$all"""
```
Gera um prompt parecido com o seguinte:
Produz um prompt como o seguinte:
```
▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
@ -224,7 +250,7 @@ continuation_prompt = "▶▶"
## Estilo dos textos
Estilo de strings são uma lista de palavras, separadas por espaço. As palavras não são case sensitive (ou seja `bold` e `BoLd` são consideradas iguais). Cada palavra pode ser uma das seguintes:
As strings de estilo são uma lista de palavras, separadas por espaços em branco. As palavras não diferenciam maiúsculas de minúsculas (ou seja, `bold` e `BoLd` são considerados a mesma string). Cada palavra pode ser as seguintes:
- `bold`
- `italic`
@ -239,17 +265,17 @@ Estilo de strings são uma lista de palavras, separadas por espaço. As palavras
- `<color>`
- `none`
onde `<color>` é uma especialista de cores (discutido abaixo). `fg:<color>` e `<color>` atualmente fazem a mesma coisa, isto deve mudar no futuro. `inverted` troca as cores de background e foreground. A ordem de palavras na string não importa.
onde `<color>` é um especificador de cor (discutido abaixo). `fg:<color>` e `<color>` atualmente fazem a mesma coisa, embora isso possa mudar no futuro. `inverted` troca as cores de fundo e primeiro plano. A ordem das palavras na string não importa.
O token `none` substitui todos os outros tokens na string se ele não fizer parte de um `bg:` especificado que seja, por exemplo `fg:red none fg:blue` ainda criará uma string sem estilo. `bg:none` define a cor padrão de background então `fg:red bg:none` é equivalente a `red` ou `fg:red` e `bg:green fg:red bg:none` é equivalente a `fg:red` ou`red`. Pode se transformar em um erro ao usar `none` em um conjunto de outros tokens no futuro.
O token `none` substitui todos os outros tokens em uma string se não fizer parte de um especificador `bg:`, de modo que, ex., `fg:red none fg:blue` ainda criará uma string sem estilo. `bg:none` define o plano de fundo para a cor padrão para que `fg:red bg:none` seja equivalente a `red` ou `fg:red` e `bg:green fg:red bg:none` também é equivalente a `fg:red` ou `red`. Pode ser um erro usar `none` em conjunto com outros tokens no futuro.
Um especialista em cores pode ser um dos seguintes:
Um especificador de cor pode ser um dos seguintes:
- Uma das cores padrão do terminal: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Você pode, opcionalmente, prefixar esses com `bright-` para obter a versão brilhante/clara (por exemplo, `bright-white`).
- Um `#` seguido por um número de seis dígitos hexadecimais. Isto especifica um [Código RGB em formato hexadecimal](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- Um número entre 0-255. Este especifica um [Código de Cor ANSI 8 bits](https://i.stack.imgur.com/KTSQa.png).
- Um `#` seguido por um número hexadecimal de seis dígitos. Especifica um [Código hexadecimal de cor RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- Um número entre 0-255. Especifica um [Código de cores ANSI de 8 bits](https://i.stack.imgur.com/KTSQa.png).
Se múltiplas cores forem especificadas para foreground/background, a ultima da string que terá prioridade.
Se várias cores forem especificadas para primeiro plano/plano de fundo, a última na string terá prioridade.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:

View File

@ -162,13 +162,15 @@ Está é a lista de opções de configuração de prompt.
### Opções
| Opções | Padrão | Descrição |
| ----------------- | ------------------------------ | ---------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configura o formato do prompt. |
| `right_format` | `""` | Veja [Ativa o prompt direito](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Tempo limite para escanear arquivos (em milissegundos). |
| `command_timeout` | `500` | Tempo limite de execução de comandos pelo starship (em milissegundos). |
| `add_newline` | `true` | Insere linha vazia entre os prompts do shell. |
| Opções | Padrão | Descrição |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configura o formato do prompt. |
| `right_format` | `""` | Veja [Ativa o prompt direito](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Tempo limite para escanear arquivos (em milissegundos). |
| `command_timeout` | `500` | Tempo limite de execução de comandos pelo starship (em milissegundos). |
| `add_newline` | `true` | Insere linha vazia entre os prompts do shell. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### Exemplo
@ -184,8 +186,18 @@ format = """
#Espera 10 milissegundos para que o starship check os arquivos do diretório atual.
scan_timeout = 10
# Desabilita uma nova linha no inicio do prompt
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Format de Prompt Padrão
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +444,12 @@ O valor padrão das opções `charging_symbol` e `discharging_symbol`é respecti
A opção `display` é um array da seguinte tabela.
| Opções | Padrão | Descrição |
| -------------------- | ---------- | -------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | O limite superior para exibição. |
| `style` | `bold red` | O estilo usado para exibir quando estiver em uso. |
| `charging_symbol` | `-` | Simbolo opcional, mostrado quando a opção estiver em uso, o simbolo padrão é `charging_symbol`. |
| `discharging_symbol` | `-` | Simbolo opcional, mostrado quando a opção estiver em uso, o simbolo padrão é `discharging_symbol`. |
| Opções | Padrão | Descrição |
| -------------------- | ------------ | -------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | O limite superior para exibição. |
| `style` | `"red bold"` | O estilo usado para exibir quando estiver em uso. |
| `charging_symbol` | | Simbolo opcional, mostrado quando a opção estiver em uso, o simbolo padrão é `charging_symbol`. |
| `discharging_symbol` | | Simbolo opcional, mostrado quando a opção estiver em uso, o simbolo padrão é `discharging_symbol`. |
#### Exemplo
@ -462,24 +475,24 @@ O módulo `buf` mostra a versão instalada do [Buf](https://buf.build). Por padr
### Opções
| Opções | Padrão | Descrição |
| ------------------- | ------------------------------------------------------------ | ------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | O formato do módulo `buf`. |
| `version_format` | `"v${raw}"` | O formato da versão. |
| `symbol` | `"🦬 "` | O símbolo usado antes de exibir a versão do Buf. |
| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
| `style` | `"bold blue"` | O estilo do módulo. |
| `disabled` | `false` | Desabilita o módulo `elixir`. |
| Opções | Padrão | Descrição |
| ------------------- | ----------------------------------------------- | ------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | O formato do módulo `buf`. |
| `version_format` | `"v${raw}"` | O formato da versão. |
| `symbol` | `"🦬 "` | O símbolo usado antes de exibir a versão do Buf. |
| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
| `style` | `"bold blue"` | O estilo do módulo. |
| `disabled` | `false` | Desabilita o módulo `elixir`. |
### Variáveis
| Variável | Exemplo | Descrição |
| ------------- | -------- | --------------------------------- |
| `buf_version` | `v1.0.0` | A versão do `buf` |
| `symbol` | | Espelha o valor da opção `symbol` |
| `style`* | | Espelha o valor da opção `style` |
| Variável | Exemplo | Descrição |
| --------- | -------- | --------------------------------- |
| `version` | `v1.0.0` | A versão do `buf` |
| `symbol` | | Espelha o valor da opção `symbol` |
| `style`* | | Espelha o valor da opção `style` |
*: Esta variável só pode ser usada como parte de uma string de estilo
@ -609,9 +622,9 @@ Por padrão ele apenas muda de cor. Se você deseja alterar o formato de uma olh
### Variáveis
| Variável | Exemplo | Descrição |
| -------- | ------- | ---------------------------------------------------------------- |
| symbol | | Um espelho de `success_symbol`, `error_symbol` ou `vicmd_symbol` |
| Variável | Exemplo | Descrição |
| -------- | ------- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Exemplos
@ -794,12 +807,12 @@ O módulo `container` exibe um símbolo e nome do contêiner, se dentro de um co
### Opções
| Opções | Padrão | Descrição |
| ---------- | -------------------------------------- | ------------------------------------------------- |
| `symbol` | `"⬢"` | O símbolo mostrado, quando dentro de um contêiner |
| `style` | `"bold red dimmed"` | O estilo do módulo. |
| `format` | `"[$symbol \\[$name\\]]($style) "` | O formato do módulo. |
| `disabled` | `false` | Desabilita o módulo `container`. |
| Opções | Padrão | Descrição |
| ---------- | ---------------------------------- | ------------------------------------------------- |
| `symbol` | `"⬢"` | O símbolo mostrado, quando dentro de um contêiner |
| `style` | `"bold red dimmed"` | O estilo do módulo. |
| `format` | `'[$symbol \[$name\]]($style) '` | O formato do módulo. |
| `disabled` | `false` | Desabilita o módulo `container`. |
### Variáveis
@ -817,7 +830,7 @@ O módulo `container` exibe um símbolo e nome do contêiner, se dentro de um co
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Opções
| Opções | Padrão | Descrição |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `format` | `via [$symbol($version )]($style)` | O formato do módulo. |
| `version_format` | `v${raw}` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | O estilo do módulo. |
| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. |
| `detect_files` | `["daml.yaml"]` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
| `disabled` | `false` | Disables the `daml` module. |
| Opções | Padrão | Descrição |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | O estilo do módulo. |
| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. |
| `detect_files` | `["daml.yaml"]` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
| `disabled` | `false` | Disables the `daml` module. |
### Variáveis
@ -993,7 +1006,7 @@ Por exemplo, dado `~/Dev/Nix/nixpkgs/pkgs` onde `nixpkgs` é o repositório raiz
| `read_only` | `"🔒"` | O simbolo que indica que o diretório atual é somente leitura. |
| `read_only_style` | `"red"` | O estilo para o simbolo de somente leitura. |
| `truncation_symbol` | `""` | O simbolo para prefixo de caminhos truncados. ex: "…/" |
| `repo_root_style` | `None` | O estilo para a raiz do repositório git. O valor padrão é equivalente a `style`. |
| `repo_root_style` | | O estilo para a raiz do repositório git. O valor padrão é equivalente a `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | O formato de um repositório git quando `repo_root_style` é definido. |
| `home_symbol` | `"~"` | O simbolo para indicar o diretório home. |
| `use_os_path_sep` | `true` | Use o separador de caminho específico do sistema opracional em vez de sempre usar `/` (por exemplo, `\` no Windows) |
@ -1478,16 +1491,16 @@ O módulo `git_commit` exibe o hash do comiit atual e também a tag (se existir)
### Opções
| Opções | Padrão | Descrição |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | O tamanho do git commit hash para ser exibido. |
| `format` | `"[\\($hash$tag\\)]($style) "` | O formato do módulo. |
| `style` | `"bold green"` | O estilo do módulo. |
| `only_detached` | `true` | Apenas exibe o git commit hash quando o estado for detached `HEAD` |
| `tag_disabled` | `true` | Desabilita a exibição da informação da tag no módulo `git_commit`. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Simbolo da tag prefixado na informação a ser exibida |
| `disabled` | `false` | Desabilita o módulo `git_commit`. |
| Opções | Padrão | Descrição |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | O tamanho do git commit hash para ser exibido. |
| `format` | `'[\($hash$tag\)]($style) '` | O formato do módulo. |
| `style` | `"bold green"` | O estilo do módulo. |
| `only_detached` | `true` | Apenas exibe o git commit hash quando o estado for detached `HEAD` |
| `tag_disabled` | `true` | Desabilita a exibição da informação da tag no módulo `git_commit`. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Simbolo da tag prefixado na informação a ser exibida |
| `disabled` | `false` | Desabilita o módulo `git_commit`. |
### Variáveis
@ -1565,7 +1578,7 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para
| `added_style` | `"bold green"` | O estilo para a contagem de adições. |
| `deleted_style` | `"bold red"` | O estilo para a contagem de exclusões. |
| `only_nonzero_diffs` | `true` | Exibe apenas o status para itens alterados. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | O formato do módulo. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | O formato do módulo. |
| `disabled` | `true` | Desabilita o módulo `git_metrics`. |
### Variáveis
@ -1586,7 +1599,7 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git Status
@ -1688,7 +1701,7 @@ Use o executável do Windows Starship em caminhos do Windows em WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/nomedousuario/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1850,21 +1863,21 @@ disabled = false
O módulo `java` exibe o versão atual instalada do [Java](https://www.oracle.com/java/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida:
- O diretório atual contenha algum dos arquivos `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot`
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- O diretório atual contenha arquivos com as extensões `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc`
### Opções
| Opções | Padrão | Descrição |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `format` | `"via [${symbol}(${version} )]($style)"` | O formato do módulo. |
| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Quais extensões devem ativar este módulo. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
| `symbol` | `"☕ "` | Um formato de string que representa o simbolo do Java |
| `style` | `"red dimmed"` | O estilo do módulo. |
| `disabled` | `false` | Desabilita o módulo `java`. |
| Opções | Padrão | Descrição |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `format` | `"via [${symbol}(${version} )]($style)"` | O formato do módulo. |
| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Quais extensões devem ativar este módulo. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
| `symbol` | `"☕ "` | Um formato de string que representa o simbolo do Java |
| `style` | `"red dimmed"` | O estilo do módulo. |
| `disabled` | `false` | Desabilita o módulo `java`. |
### Variáveis
@ -2256,6 +2269,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Opções
| Opções | Padrão | Descrição |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. Você pode usar `""` para sem simbolo. |
| `format` | `"via [$symbol$project]($style) "` | O formato do módulo. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | O estilo do módulo. |
| `disabled` | `false` | Disables the `meson` module. |
### Variáveis
| Variável | Exemplo | Descrição |
| --------- | ---------- | --------------------------------- |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Espelha o valor da opção `symbol` |
| style\* | | Espelha o valor da opção `style` |
*: Esta variável só pode ser usada como parte de uma string de estilo
### Exemplo
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
O módulo `hg_branch` exibe o braço atual do repositório no diretório atual.
@ -2287,7 +2339,7 @@ O módulo `hg_branch` exibe o braço atual do repositório no diretório atual.
# ~/.config/starship.toml
[hg_branch]
format = "on [🌱 $branch](bold purple)"
format = "em [🌱 $branch](bold purple)"
truncation_length = 4
truncation_symbol = ""
```
@ -2307,7 +2359,7 @@ O módulo `nim` exibe a versão atual instalada do [Nim](https://nim-lang.org/).
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo |
| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"👑 "` | O simbolo usado antes de exibir a versão do Nim. |
| `symbol` | `"👑 "` | O símbolo usado antes de exibir a versão do Nim. |
| `detect_extensions` | `["nim", "nims", "nimble"]` | Quais extensões devem ativar este módulo. |
| `detect_files` | `["nim.cfg"]` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
@ -2469,12 +2521,12 @@ O módulo `openstack` exibe o OpenStack cloud e projeto atual. O módulo apenas
### Opções
| Opções | Padrão | Descrição |
| ---------- | --------------------------------------------------- | ---------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | O formato do módulo. |
| `symbol` | `"☁️ "` | O simbolo usado para exibir o OpenStack cloud atual. |
| `style` | `"bold yellow"` | O estilo do módulo. |
| `disabled` | `false` | Desabilita o módulo `openstack`. |
| Opções | Padrão | Descrição |
| ---------- | ----------------------------------------------- | ---------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | O formato do módulo. |
| `symbol` | `"☁️ "` | O simbolo usado para exibir o OpenStack cloud atual. |
| `style` | `"bold yellow"` | O estilo do módulo. |
| `disabled` | `false` | Desabilita o módulo `openstack`. |
### Variáveis
@ -2493,12 +2545,12 @@ O módulo `openstack` exibe o OpenStack cloud e projeto atual. O módulo apenas
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
## Package Version
## Versionamento de Pacotes
O módulo `package` é mostrado quando o diretório atual é o repositório de um pacote e mostra sua versão atual. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart` packages.
@ -2527,7 +2579,7 @@ O módulo `package` é mostrado quando o diretório atual é o repositório de u
| Opções | Padrão | Descrição |
| ----------------- | --------------------------------- | ------------------------------------------------------------------------------------ |
| `format` | `"is [$symbol$version]($style) "` | O formato do módulo. |
| `symbol` | `"📦 "` | O simbolo usado antes de exibir a versão do pacote. |
| `symbol` | `"📦 "` | O símbolo usado antes de exibir a versão do pacote. |
| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `style` | `"bold 208"` | O estilo do módulo. |
| `display_private` | `false` | Habilita a exibição da versão para os pacotes marcados como privado. |
@ -2568,7 +2620,7 @@ O módulo `perl` exibe a versão atual instalada do [Perl](https://www.perl.org/
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | A string de formato do módulo. |
| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"🐪 "` | O simbolo usado ante de exibir a versão do Perl |
| `symbol` | `"🐪 "` | O símbolo usado antes de exibir a versão do Perl. |
| `detect_extensions` | `["pl", "pm", "pod"]` | Quais extensões devem ativar este módulo. |
| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
@ -2594,7 +2646,7 @@ format = "via [🦪 $version]($style) "
## PHP
O módulo `php` exibe a versão atual instalada do [PHP](https://www.php.net/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida:
O módulo `php` mostra a versão atualmente instalada do [PHP](https://www.php.net/). Por padrão o módulo vai exibir se uma das condições a seguir for atendida:
- O diretório atual contem um arquivo `composer.json`
- O diretório atual tenha um arquivo `.php-version`
@ -2606,7 +2658,7 @@ O módulo `php` exibe a versão atual instalada do [PHP](https://www.php.net/).
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"🐘 "` | O simbolo usado antes de exibir a versão do PHP. |
| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. |
| `detect_extensions` | `["php"]` | Quais extensões devem ativar este módulo. |
| `detect_files` | `["composer.json", ".php-version"]` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
@ -2660,13 +2712,13 @@ Por padrão o módulo vai exibir se uma das condições a seguir for atendida:
### Variáveis
| Variável | Exemplo | Descrição |
| --------- | ---------- | --------------------------------- |
| version | `v0.12.24` | A versão do `pulumi` |
| stack | `dev` | A stack Pulumi atual |
| username | `alice` | O nome de usuário Pulumi atual |
| symbol | | Espelha o valor da opção `symbol` |
| style\* | | Espelha o valor da opção `style` |
| Variável | Exemplo | Descrição |
| --------------- | ---------- | --------------------------------- |
| version | `v0.12.24` | A versão do `pulumi` |
| stack | `dev` | A stack Pulumi atual |
| nome do usuário | `alice` | O nome de usuário Pulumi atual |
| symbol | | Espelha o valor da opção `symbol` |
| style\* | | Espelha o valor da opção `style` |
*: Esta variável só pode ser usada como parte de uma string de estilo
@ -2703,7 +2755,7 @@ O módulo `purescript` exibe a versão atual instalada do [PureScript](https://w
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ |
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"<=> "` | O simbolo usado antes de exibir a versão do PureScript. |
| `symbol` | `"<=> "` | O símbolo usado antes de exibir a versão do PureScript. |
| `detect_extensions` | `["purs"]` | Quais extensões devem ativar este módulo. |
| `detect_files` | `["spago.dhall"]` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo. |
@ -2795,7 +2847,7 @@ pyenv_version_name = true
# ~/.config/starship.toml
[python]
# Apenas use o binário `python3` para pegar a versão.
# Use apenas o binário `python3` para obter a versão.
python_binary = "python3"
```
@ -2803,7 +2855,7 @@ python_binary = "python3"
# ~/.config/starship.toml
[python]
#Não acione arquivos com a extensão py
# Não acione para arquivos com a extensão py
detect_extensions = []
```
@ -2811,16 +2863,16 @@ detect_extensions = []
# ~/.config/starship.toml
[python]
# Exibe a versão do python dentro de um local venv.
# Exibe a versão do python de dentro de um venv local.
#
# Observe que isso só funcionará quando o venv estiver dentro do projeto e somente
# funcionar no diretório que contém o venv dir mas talvez isso esteja ok?
# Note que isso só funcionará quando o venv estiver dentro do projeto e só
# funcionará apenas no diretório que contém o diretório venv, mas talvez isso seja ok?
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
```
## R
O módulo `rlang` exibe a versão atual instalada do [R](https://www.r-project.org/). O módulo vai exibir se algumas das condições a seguir for atendida:
O módulo `rlang` mostra a versão atualmente instalada do [R](https://www.r-project.org/). O módulo será mostrado se qualquer uma das seguintes condições for atendida:
- O diretório atual tenha um arquivo com a extensão `.R`.
- O diretório atual tenha um arquivo com a extensão `.Rd`.
@ -2857,7 +2909,7 @@ O módulo `rlang` exibe a versão atual instalada do [R](https://www.r-project.o
# ~/.config/starship.toml
[rlang]
format = "with [📐 $version](blue bold) "
format = "com [📐 $version](blue bold) "
```
## Raku
@ -3035,7 +3087,7 @@ O módulo `scala` exibe a versão atual instalada do [Scala](https://www.scala-l
| ------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------ |
| `format` | `"via [${symbol}(${version} )]($style)"` | O formato do módulo. |
| `version_format` | `"v${raw}"` | O formato da versão. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["sbt", "escala"]` | Quais extensões devem ativar este módulo. |
| `detect_extensions` | `["sbt", "scala"]` | Quais extensões devem ativar este módulo. |
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Quais nomes de arquivos devem ativar este módulo. |
| `detect_folders` | `[".metals"]` | Quais pastas devem ativar este módulo. |
| `symbol` | `"🆂 "` | Uma string que representa o simbolo do Scala. |
@ -3075,16 +3127,16 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para
| Opções | Padrão | Descrição |
| ---------------------- | ------------------------- | ------------------------------------------------------- |
| `bash_indicator` | `bsh` | Uma string para representar o bash. |
| `fish_indicator` | `fsh` | Uma string usada para representar o fish. |
| `zsh_indicator` | `zsh` | Uma string usada para representar o zsh. |
| `powershell_indicator` | `psh` | Uma string usada para representar o powershell. |
| `ion_indicator` | `ion` | Uma string usada para representar o ion. |
| `elvish_indicator` | `esh` | Uma string usada para representar o elvish. |
| `tcsh_indicator` | `tsh` | Uma string usada para representar o tcsh. |
| `xonsh_indicator` | `xsh` | Uma string usada para representar o xonsh. |
| `cmd_indicator` | `cmd` | Uma string usada para representar o cmd. |
| `nu_indicator` | `nu` | Uma string usada para representar o nu. |
| `bash_indicator` | `"bsh"` | Uma string para representar o bash. |
| `fish_indicator` | `"fsh"` | Uma string usada para representar o fish. |
| `zsh_indicator` | `"zsh"` | Uma string usada para representar o zsh. |
| `powershell_indicator` | `"psh"` | Uma string usada para representar o powershell. |
| `ion_indicator` | `"ion"` | Uma string usada para representar o ion. |
| `elvish_indicator` | `"esh"` | Uma string usada para representar o elvish. |
| `tcsh_indicator` | `"tsh"` | Uma string usada para representar o tcsh. |
| `xonsh_indicator` | `"xsh"` | Uma string usada para representar o xonsh. |
| `cmd_indicator` | `"cmd"` | Uma string usada para representar o cmd. |
| `nu_indicator` | `"nu"` | Uma string usada para representar o nu. |
| `unknown_indicator` | | Valor padrão para exibir quando o shell é desconhecido. |
| `format` | `"[$indicator]($style) "` | O formato do módulo. |
| `style` | `"white bold"` | O estilo do módulo. |
@ -3225,23 +3277,23 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para
### Opções
| Opções | Padrão | Descrição |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | O formato do módulo |
| `symbol` | `"✖"` | O simbolo exibido no erro de programa |
| `success_symbol` | `""` | O simbolo exibido no sucesso de programa |
| `not_executable_symbol` | `"🚫"` | O simbolo exibido quando o arquivo não é executável |
| `not_found_symbol` | `"🔍"` | O simbolo exibido quando o comando não é encontrado |
| `sigint_symbol` | `"🧱"` | O simbolo exibido no SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | O simbolo exibido em qualquer sinal |
| `style` | `"bold red"` | O estilo do módulo. |
| `recognize_signal_code` | `true` | Habilita o mapeamento de sinais para códigos de saída |
| `map_symbol` | `false` | Habilita o mapeamento de símbolos para códigos de saída |
| `pipestatus` | `false` | Habilita o relatório de pipestatus |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | O formato do módulo quando o comando é um pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Desabilita o módulo `status`. |
| Opções | Padrão | Descrição |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | O formato do módulo |
| `symbol` | `"✖"` | O simbolo exibido no erro de programa |
| `success_symbol` | `""` | O simbolo exibido no sucesso de programa |
| `not_executable_symbol` | `"🚫"` | O simbolo exibido quando o arquivo não é executável |
| `not_found_symbol` | `"🔍"` | O simbolo exibido quando o comando não é encontrado |
| `sigint_symbol` | `"🧱"` | O simbolo exibido no SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | O simbolo exibido em qualquer sinal |
| `style` | `"bold red"` | O estilo do módulo. |
| `recognize_signal_code` | `true` | Habilita o mapeamento de sinais para códigos de saída |
| `map_symbol` | `false` | Habilita o mapeamento de símbolos para códigos de saída |
| `pipestatus` | `false` | Habilita o relatório de pipestatus |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | O formato do módulo quando o comando é um pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Desabilita o módulo `status`. |
### Variáveis
@ -3286,13 +3338,13 @@ Este módulo é desabilitado por padrão. Para habilitar, defina `disabled` para
### Opções
| Opções | Padrão | Descrição |
| --------------- | ----------------------- | -------------------------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | O formato do módulo |
| `symbol` | `"🧙 "` | O simbolo exibido quando as credenciais estão em cache |
| `style` | `"bold blue"` | O estilo do módulo. |
| `allow_windows` | `false` | Desde que o Windows não tem um padrão sudo, o valor padrão é desabilitado. |
| `disabled` | `true` | Desabilita o módulo `sudo`. |
| Opções | Padrão | Descrição |
| --------------- | ------------------------ | -------------------------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | O formato do módulo |
| `symbol` | `"🧙 "` | O simbolo exibido quando as credenciais estão em cache |
| `style` | `"bold blue"` | O estilo do módulo. |
| `allow_windows` | `false` | Desde que o Windows não tem um padrão sudo, o valor padrão é desabilitado. |
| `disabled` | `true` | Desabilita o módulo `sudo`. |
### Variáveis
@ -3467,9 +3519,9 @@ utc_time_offset = "-5"
time_range = "10:00:00-14:00:00"
```
## Username
## Nome do usuário
O módulo `username` exibe o username do usuário ativo. O módulo será mostrado se alguma das seguintes condições for atendida:
O módulo `username` mostra o nome de usuário do usuário ativo. O módulo será mostrado se alguma das seguintes condições for atendida:
- O usuário atual é root/admin
- O usuário atual não é o mesmo que está logado
@ -3497,7 +3549,7 @@ Conexões SSH são detectadas checando as variáveis de ambiente `SSH_CONNECTION
| Variável | Exemplo | Descrição |
| -------- | ------------ | -------------------------------------------------------------------------------------- |
| `style` | `"red bold"` | Espelha o valor da opção `style_root` quando o root esta logado e `style_user` se não. |
| `user` | `"matchai"` | O ID do usuário logado atualmente. |
| `user` | `"fulano"` | O ID do usuário logado atualmente. |
### Exemplo
@ -3670,7 +3722,7 @@ Esses módulos serão mostrados se alguma das seguintes condições for atendida
::: tip
Vários módulos personalizados podem ser definidos usando `.`.
Vários módulos personalizados podem ser definidos usando um `.`.
:::
@ -3760,7 +3812,7 @@ Detecção automática de shell e adição de parâmetros estão sendo implement
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,7 +220,6 @@ Ou instale o Starship usando qualquer um dos seguintes gerenciadores de pacotes:
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

View File

@ -55,11 +55,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
```sh
brew install starship
```
With [Scoop](https://scoop.sh):
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. Add the init script to your shell's config file:

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:

View File

@ -162,13 +162,15 @@ This is the list of prompt-wide configuration options.
### Options
| Option | Default | Description |
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| Option | Default | Description |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### Example
@ -186,6 +188,16 @@ scan_timeout = 10
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Default Prompt Format
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +444,12 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
The `display` option is an array of the following table.
| Option | Default | Description |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `bold red` | The style used if the display option is in use. |
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
| Option | Default | Description |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `style` | `"red bold"` | The style used if the display option is in use. |
| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
#### Example
@ -462,24 +475,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### Options
| Option | Default | Description |
| ------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `elixir` module. |
| Option | Default | Description |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `elixir` module. |
### Variables
| Variable | Example | Description |
| ------------- | -------- | ------------------------------------ |
| `buf_version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
| Variable | Example | Description |
| --------- | -------- | ------------------------------------ |
| `version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
@ -609,9 +622,9 @@ By default it only changes color. If you also want to change its shape take a lo
### Variables
| Variable | Example | Description |
| -------- | ------- | --------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
| Variable | Example | Description |
| -------- | ------- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Examples
@ -794,12 +807,12 @@ The `container` module displays a symbol and container name, if inside a contain
### Options
| Option | Default | Description |
| ---------- | -------------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | `"[$symbol \\[$name\\]]($style) "` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
| Option | Default | Description |
| ---------- | ---------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | The style for the module. |
| `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
@ -817,7 +830,7 @@ The `container` module displays a symbol and container name, if inside a contain
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Options
| Option | Default | Description |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | The format for the module. |
| `version_format` | `v${raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
### Variables
@ -993,7 +1006,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `home_symbol` | `"~"` | The symbol indicating home directory. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
@ -1480,16 +1493,16 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### Options
| Option | Default | Description |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
| `style` | `"bold green"` | The style for the module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
| Option | Default | Description |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `'[\($hash$tag\)]($style) '` | The format for the module. |
| `style` | `"bold green"` | The style for the module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
### Variables
@ -1567,7 +1580,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | The format for the module. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
@ -1588,7 +1601,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git Status
@ -1690,7 +1703,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
### Options
| Option | Default | Description |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
| Option | Default | Description |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
### Variables
@ -2258,6 +2271,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Options
| Option | Default | Description |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. |
| `format` | `"via [$symbol$project]($style) "` | The format for the module. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | The style for the module. |
| `disabled` | `false` | Disables the `meson` module. |
### Variables
| Variable | Example | Description |
| --------- | ---------- | ------------------------------------ |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory.
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### Options
| Option | Default | Description |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
| Option | Default | Description |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
### Variables
@ -2495,7 +2547,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
@ -3077,16 +3129,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Default | Description |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | The format for the module. |
| `style` | `"white bold"` | The style for the module. |
@ -3227,23 +3279,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | Default | Description |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| Option | Default | Description |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables
@ -3288,13 +3340,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | Default | Description |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| Option | Default | Description |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Variables
@ -3762,7 +3814,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,7 +220,6 @@ Alternatively, install Starship using any of the following package managers:
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

View File

@ -55,11 +55,10 @@ description: Starship - минимальная, быстрая и бесконе
```sh
brew install starship
```
С [Scoop](https://scoop.sh):
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. Добавить сценарий инициализации в конфигурационный файл вашей оболочки:

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:

View File

@ -162,13 +162,15 @@ detect_extensions = ["ts", "!video.ts", "!audio.ts"]
### Опции
| Параметр | По умолчанию | Описание |
| ----------------- | -------------------------------- | ---------------------------------------------------------------- |
| `format` | [ссылка](#default-prompt-format) | Настройка форматирования оболочки. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Тайм-аут запуска сканирования файлов (в миллисекундах). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| Параметр | По умолчанию | Описание |
| ----------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [ссылка](#default-prompt-format) | Настройка форматирования оболочки. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Тайм-аут запуска сканирования файлов (в миллисекундах). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### Пример
@ -186,6 +188,16 @@ scan_timeout = 10
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Формат оболочки по умолчанию
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -434,9 +447,9 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
| Параметр | По умолчанию | Описание |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | Верхняя граница опции отображения. |
| `style` | `bold red` | Используемый стиль, если используется опция отображения. |
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
| `style` | `"red bold"` | Используемый стиль, если используется опция отображения. |
| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
#### Пример
@ -462,24 +475,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### Опции
| Параметр | По умолчанию | Описание |
| ------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `elixir`. |
| Параметр | По умолчанию | Описание |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `elixir`. |
### Переменные
| Переменная | Пример | Описание |
| ------------- | -------- | ------------------------------------ |
| `buf_version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Отражает значение параметра `symbol` |
| `style`* | | Отражает значение параметра `style` |
| Переменная | Пример | Описание |
| ---------- | -------- | ------------------------------------ |
| `version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Отражает значение параметра `symbol` |
| `style`* | | Отражает значение параметра `style` |
*: Эта переменная может использоваться только в качестве части строки style
@ -609,9 +622,9 @@ By default it only changes color. If you also want to change its shape take a lo
### Переменные
| Переменная | Пример | Описание |
| ---------- | ------ | --------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
| Переменная | Пример | Описание |
| ---------- | ------ | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Примеры
@ -794,12 +807,12 @@ The `container` module displays a symbol and container name, if inside a contain
### Опции
| Параметр | По умолчанию | Описание |
| ---------- | -------------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | Стиль модуля. |
| `format` | `"[$symbol \\[$name\\]]($style) "` | Формат модуля. |
| `disabled` | `false` | Disables the `container` module. |
| Параметр | По умолчанию | Описание |
| ---------- | ---------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | Стиль модуля. |
| `format` | `'[$symbol \[$name\]]($style) '` | Формат модуля. |
| `disabled` | `false` | Disables the `container` module. |
### Переменные
@ -817,7 +830,7 @@ The `container` module displays a symbol and container name, if inside a contain
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Опции
| Параметр | По умолчанию | Описание |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | Формат модуля. |
| `version_format` | `v${raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | Стиль модуля. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
| Параметр | По умолчанию | Описание |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | Формат модуля. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | Стиль модуля. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
### Переменные
@ -993,7 +1006,7 @@ format = "via [🦕 $version](green bold) "
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `home_symbol` | `"~"` | The symbol indicating home directory. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
@ -1480,16 +1493,16 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### Опции
| Параметр | По умолчанию | Описание |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | Длина отображаемого хэша коммита git. |
| `format` | `"[\\($hash$tag\\)]($style) "` | Формат модуля. |
| `style` | `"bold green"` | Стиль модуля. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Отключает модуль `git_commit`. |
| Параметр | По умолчанию | Описание |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | Длина отображаемого хэша коммита git. |
| `format` | `'[\($hash$tag\)]($style) '` | Формат модуля. |
| `style` | `"bold green"` | Стиль модуля. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Отключает модуль `git_commit`. |
### Переменные
@ -1567,7 +1580,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Формат модуля. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | Формат модуля. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Переменные
@ -1588,7 +1601,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Статус Git
@ -1690,7 +1703,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
### Опции
| Параметр | По умолчанию | Описание |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | Формат модуля. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `java`. |
| Параметр | По умолчанию | Описание |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | Формат модуля. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | Стиль модуля. |
| `disabled` | `false` | Отключает модуль `java`. |
### Переменные
@ -2258,15 +2271,54 @@ symbol = " "
style = "bold dimmed green"
```
## Ветка Mercurial
## Meson
Модуль `hg_branch` показывает активную ветку репозитория в вашем текущем каталоге.
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Опции
| Параметр | По умолчанию | Описание |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. |
| `format` | `"via [$symbol$project]($style) "` | Формат модуля. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | Стиль модуля. |
| `disabled` | `false` | Disables the `meson` module. |
### Переменные
| Переменная | Пример | Описание |
| ---------- | ---------- | ------------------------------------ |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Отражает значение параметра `symbol` |
| style\* | | Отражает значение параметра `style` |
*: Эта переменная может использоваться только в качестве части строки style
### Пример
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Ветвь Mercurial
Модуль `hg_branch` показывает активную ветку репозитория в вашей текущей директории.
### Опции
| Параметр | По умолчанию | Описание |
| ------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
| `symbol` | `" "` | Символ, используемый перед закладкой hg или именем ветки репозитория в текущем каталоге. |
| `symbol` | `" "` | Символ, используемый перед закладкой hg или именем ветви репозитория в текущем каталоге. |
| `style` | `"bold purple"` | Стиль модуля. |
| `format` | `"on [$symbol$branch]($style) "` | Формат модуля. |
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes |
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### Опции
| Параметр | По умолчанию | Описание |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | Формат модуля. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | Стиль модуля. |
| `disabled` | `false` | Disables the `openstack` module. |
| Параметр | По умолчанию | Описание |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | Формат модуля. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | Стиль модуля. |
| `disabled` | `false` | Disables the `openstack` module. |
### Переменные
@ -2495,7 +2547,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
@ -3077,16 +3129,16 @@ The `shell` module shows an indicator for currently used shell.
| Параметр | По умолчанию | Описание |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | Формат модуля. |
| `style` | `"white bold"` | Стиль модуля. |
@ -3227,23 +3279,23 @@ The `status` module displays the exit code of the previous command. If $success_
### Опции
| Параметр | По умолчанию | Описание |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Стиль модуля. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| Параметр | По умолчанию | Описание |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Стиль модуля. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Переменные
@ -3288,13 +3340,13 @@ The `sudo` module displays if sudo credentials are currently cached. The module
### Опции
| Параметр | По умолчанию | Описание |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | Стиль модуля. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| Параметр | По умолчанию | Описание |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | Стиль модуля. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Переменные
@ -3445,7 +3497,7 @@ format = "[🏎💨 $workspace]($style) "
| `disabled` | `true` | Отключает модуль `time`. |
| `time_range` | `"-"` | Sets the time range during which the module will be shown. Times must be specified in 24-hours format |
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Иначе по умолчанию используется `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Иначе, принимается значение `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
### Переменные
@ -3471,7 +3523,7 @@ time_range = "10:00:00-14:00:00"
## Имя пользователя
Модуль `username` показывает имя активного пользователя. Модуль будет показан, если любое из следующих условий соблюдено:
Модуль `username` показывает имя текущего пользователя. Модуль будет показан, если любое из следующих условий соблюдено:
- The current user is root/admin
- Текущий пользователь отличается от залогиненного
@ -3762,7 +3814,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,7 +220,6 @@ Alternatively, install Starship using any of the following package managers:
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

View File

@ -55,11 +55,10 @@ description: Starship, her prompt için minimal, son derece hızlı ve son derec
```sh
brew install starship
```
Scoop [ile](https://scoop.sh):
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. Add the init script to your shell's config file:

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:

View File

@ -162,13 +162,15 @@ This is the list of prompt-wide configuration options.
### Options
| Option | Default | Description |
| ----------------- | ------------------------------ | ---------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| Option | Default | Description |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### Example
@ -186,6 +188,16 @@ scan_timeout = 10
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Default Prompt Format
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +444,12 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
The `display` option is an array of the following table.
| Option | Default | Description |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `stil` | `bold red` | The style used if the display option is in use. |
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
| Option | Default | Description |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | The upper bound for the display option. |
| `stil` | `"red bold"` | The style used if the display option is in use. |
| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
#### Example
@ -462,24 +475,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### Options
| Option | Default | Description |
| ------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `stil` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `elixir` module. |
| Option | Default | Description |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `stil` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `elixir` module. |
### Variables
| Variable | Example | Description |
| ------------- | -------- | ------------------------------------ |
| `buf_version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
| Variable | Example | Description |
| --------- | -------- | ------------------------------------ |
| `version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
@ -609,9 +622,9 @@ By default it only changes color. If you also want to change its shape take a lo
### Variables
| Variable | Example | Description |
| -------- | ------- | --------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
| Variable | Example | Description |
| -------- | ------- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Examples
@ -794,12 +807,12 @@ The `container` module displays a symbol and container name, if inside a contain
### Options
| Option | Default | Description |
| ---------- | -------------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `stil` | `"bold red dimmed"` | The style for the module. |
| `format` | `"[$symbol \\[$name\\]]($style) "` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
| Option | Default | Description |
| ---------- | ---------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `stil` | `"bold red dimmed"` | The style for the module. |
| `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
@ -817,7 +830,7 @@ The `container` module displays a symbol and container name, if inside a contain
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Options
| Option | Default | Description |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | The format for the module. |
| `version_format` | `v${raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `stil` | `"bold cyan"` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
| Option | Default | Description |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `stil` | `"bold cyan"` | The style for the module. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
### Variables
@ -993,7 +1006,7 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `home_symbol` | `"~"` | The symbol indicating home directory. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
@ -1480,16 +1493,16 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### Options
| Option | Default | Description |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
| `stil` | `"bold green"` | The style for the module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
| Option | Default | Description |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `'[\($hash$tag\)]($style) '` | The format for the module. |
| `stil` | `"bold green"` | The style for the module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
### Variables
@ -1567,7 +1580,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | The format for the module. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
@ -1588,7 +1601,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git Status
@ -1690,7 +1703,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
### Options
| Option | Default | Description |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `stil` | `"red dimmed"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
| Option | Default | Description |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `stil` | `"red dimmed"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
### Variables
@ -2258,6 +2271,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Options
| Option | Default | Description |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. |
| `format` | `"via [$symbol$project]($style) "` | The format for the module. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `stil` | `"blue bold"` | The style for the module. |
| `disabled` | `false` | Disables the `meson` module. |
### Variables
| Variable | Example | Description |
| --------- | ---------- | ------------------------------------ |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### Example
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory.
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### Options
| Option | Default | Description |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `stil` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
| Option | Default | Description |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `stil` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `openstack` module. |
### Variables
@ -2495,7 +2547,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
@ -3077,16 +3129,16 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
| Option | Default | Description |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | The format for the module. |
| `stil` | `"white bold"` | The style for the module. |
@ -3227,23 +3279,23 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | Default | Description |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `stil` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| Option | Default | Description |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `stil` | `"bold red"` | The style for the module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables
@ -3288,13 +3340,13 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
### Options
| Option | Default | Description |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `stil` | `"bold blue"` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| Option | Default | Description |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `stil` | `"bold blue"` | The style for the module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Variables
@ -3762,7 +3814,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,7 +220,6 @@ Alternatif olarak aşağıdaki paket yöneticileri ile de Starship'i yükleyebil
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

176
docs/uk-UA/README.md Normal file
View File

@ -0,0 +1,176 @@
---
home: true
heroImage: /logo.svg
heroText:
tagline: Простий, супер швидкий та безмежно адаптивний командний рядок для будь-якої оболонки!
actionText: Get Started →
actionLink: ./guide/
features:
-
title: Compatibility First
details: Works on the most common shells on the most common operating systems. Use it everywhere!
-
title: Rust-Powered
details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible.
-
title: Customizable
details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be.
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
#Used for the description meta tag, for SEO
metaTitle: "Starship: Cross-Shell Prompt"
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.
---
<div class="center">
<video class="demo-video" muted autoplay loop playsinline>
<source src="/demo.webm" type="video/webm">
<source src="/demo.mp4" type="video/mp4">
</video>
</div>
### Передумови
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
### Quick Install
1. Install the **starship** binary:
#### Install Latest Version
With Shell:
```sh
curl -sS https://starship.rs/install.sh | sh
```
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
#### Install via Package Manager
With [Homebrew](https://brew.sh/):
```sh
brew install starship
```
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
winget install starship
```
1. Add the init script to your shell's config file:
#### Bash
Add the following to the end of `~/.bashrc`:
```sh
# ~/.bashrc
eval "$(starship init bash)"
```
#### Fish
Add the following to the end of `~/.config/fish/config.fish`:
```sh
# ~/.config/fish/config.fish
starship init fish | source
```
#### Zsh
Add the following to the end of `~/.zshrc`:
```sh
# ~/.zshrc
eval "$(starship init zsh)"
```
#### Powershell
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
```sh
Invoke-Expression (&starship init powershell)
```
#### Ion
Add the following to the end of `~/.config/ion/initrc`:
```sh
# ~/.config/ion/initrc
eval $(starship init ion)
```
#### Elvish
::: warning
Only elvish v0.18 or higher is supported.
:::
Add the following to the end of `~/.elvish/rc.elv`:
```sh
# ~/.elvish/rc.elv
eval (starship init elvish)
```
#### Tcsh
Add the following to the end of `~/.tcshrc`:
```sh
# ~/.tcshrc
eval `starship init tcsh`
```
#### Nushell
::: warning
This will change in the future. Only Nushell v0.61+ is supported.
:::
Add the following to to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
```sh
mkdir ~/.cache/starship
starship init nu | save ~/.cache/starship/init.nu
```
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
```sh
source ~/.cache/starship/init.nu
```
#### Xonsh
Add the following to the end of `~/.xonshrc`:
```sh
# ~/.xonshrc
execx($(starship init xonsh))
```
#### Cmd
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
```lua
-- starship.lua
load(io.popen('starship init cmd'):read("*a"))()
```

View File

@ -0,0 +1,284 @@
# Advanced Configuration
While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship.
::: warning
The configurations in this section are subject to change in future releases of Starship.
:::
## 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`.
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
```powershell
function Invoke-Starship-TransientFunction {
&starship module character
}
Invoke-Expression (&starship init powershell)
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:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
- `off`: do not replace the prompt (i.e. turn off transience)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
```lua
function starship_transient_prompt_func(prompt)
return io.popen("starship module character"
.." --keymap="..rl.getvariable('keymap')
):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
```lua
function starship_transient_rprompt_func(prompt)
return io.popen("starship module time"):read("*a")
end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:
- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do
```lua
function starship_preprompt_user_func(prompt)
print("🚀")
end
load(io.popen('starship init cmd'):read("*a"))()
```
- To run a custom function right before a command is executed, define a new function called `starship_precmd_user_func`. This function receives the current commandline as a string that you can utilize. For example, to print the command that's about to be executed, you would do
```lua
function starship_precmd_user_func(line)
print("Executing: "..line)
end
load(io.popen('starship init cmd'):read("*a"))()
```
## Custom pre-prompt and pre-execution Commands in Bash
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
```bash
function blastoff(){
echo "🚀"
}
starship_precmd_user_func="blastoff"
```
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
```bash
function blastoff(){
echo "🚀"
}
trap blastoff DEBUG # Trap DEBUG *before* running starship
set -o functrace
eval $(starship init bash)
set +o functrace
```
## Custom pre-prompt and pre-execution Commands in PowerShell
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
Create a function named `Invoke-Starship-PreCommand`
```powershell
function Invoke-Starship-PreCommand {
$host.ui.Write("🚀")
}
```
## Change Window Title
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
First, define a window title change function (identical in bash and zsh):
```bash
function set_win_title(){
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
}
```
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
In `bash`, set this function to be the precmd starship function:
```bash
starship_precmd_user_func="set_win_title"
```
In `zsh`, add this to the `precmd_functions` array:
```bash
precmd_functions+=(set_win_title)
```
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
```bash
function set_win_title(){
echo -ne "\033]0; $(basename "$PWD") \007"
}
starship_precmd_user_func="set_win_title"
```
For Cmd, you can change the window title using the `starship_preprompt_user_func` function.
```lua
function starship_preprompt_user_func(prompt)
console.settitle(os.getenv('USERNAME').."@"..os.getenv('COMPUTERNAME')..": "..os.getcwd())
end
load(io.popen('starship init cmd'):read("*a"))()
```
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
```powershell
# edit $PROFILE
function Invoke-Starship-PreCommand {
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a")
}
Invoke-Expression (&starship init powershell)
```
## Enable Right Prompt
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](/config/#fill).
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd.
### Example
```toml
# ~/.config/starship.toml
# A minimal left prompt
format = """$character"""
# move the rest of the prompt to the right
right_format = """$all"""
```
Produces a prompt like the following:
```
▶ starship on  rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
```
## Continuation Prompt
Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote).
Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `"[∙](bright-black) "`.
Note: `continuation_prompt` should be set to a literal string without any variables.
Note: Continuation prompts are only available in the following shells:
- `bash`
- `zsh`
- `PowerShell`
### Example
```toml
# ~/.config/starship.toml
# A continuation prompt that displays two filled in arrows
continuation_prompt = "▶▶"
```
## Style Strings
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
- `bold`
- `italic`
- `underline`
- `dimmed`
- `inverted`
- `blink`
- `hidden`
- `strikethrough`
- `bg:<color>`
- `fg:<color>`
- `<color>`
- `none`
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
A color specifier can be one of the following:
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
If multiple colors are specified for foreground/background, the last one in the string will take priority.
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
- Many terminals disable support for `blink` by default
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app

3830
docs/uk-UA/config/README.md Normal file

File diff suppressed because it is too large Load Diff

122
docs/uk-UA/faq/README.md Normal file
View File

@ -0,0 +1,122 @@
# Frequently Asked Questions
## What is the configuration used in the demo GIF?
- **Terminal Emulator**: [iTerm2](https://iterm2.com/)
- **Theme**: Minimal
- **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
- **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
- **Shell**: [Fish Shell](https://fishshell.com/)
- **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
- **Prompt**: [Starship](https://starship.rs/)
## How do I get command completion as shown in the demo GIF?
Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
## Do top level `format` and `<module>.disabled` do the same thing?
Yes, they can both be used to disable modules in the prompt. If all you plan to do is disable modules, `<module>.disabled` is the preferred way to do so for these reasons:
- Disabling modules is more explicit than omitting them from the top level `format`
- Newly created modules will be added to the prompt as Starship is updated
## The docs say Starship is cross-shell. Why isn't my preferred shell supported?
The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used.
Here's a small example getting Starship working with bash:
```sh
# Get the status code from the last command executed
STATUS=$?
# Get the number of jobs running.
NUM_JOBS=$(jobs -p | wc -l)
# Set the prompt to the output of `starship prompt`
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
```
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
For a list of all flags accepted by `starship prompt`, use the following command:
```sh
starship prompt --help
```
The prompt will use as much context as is provided, but no flags are "required".
## How do I run Starship on Linux distributions with older versions of glibc?
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
```sh
curl -sS https://starship.rs/install.sh | sh -s -- --platform unknown-linux-musl
```
## Why do I see `Executing command "..." timed out.` warnings?
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](/config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
## I see symbols I don't understand or expect, what do they mean?
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
## Starship is doing something unexpected, how can I debug it?
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
```sh
env STARSHIP_LOG=trace starship module rust
```
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
```sh
env STARSHIP_LOG=trace starship timings
```
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
Finally if you find a bug you can use the `bug-report` command to create a Github issue.
```sh
starship bug-report
```
## Why don't I see a glyph symbol in my prompt?
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
- You are using a [Nerd Font](https://www.nerdfonts.com/).
To test your system, run the following commands in a terminal:
```sh
echo -e "\xf0\x9f\x90\x8d"
echo -e "\xee\x82\xa0"
```
The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
## How do I uninstall Starship?
Starship is just as easy to uninstall as it is to install in the first place.
1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship.
1. Delete the Starship binary.
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
If Starship was installed using the install script, the following command will delete the binary:
```sh
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
```

427
docs/uk-UA/guide/README.md Normal file
View File

@ -0,0 +1,427 @@
<p align="center">
<img
width="400"
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
alt="Starship Cross-shell prompt"
/>
</p>
<p align="center">
<a href="https://github.com/starship/starship/actions"
><img
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
alt="GitHub Actions workflow status"
/></a>
<a href="https://crates.io/crates/starship"
><img
src="https://img.shields.io/crates/v/starship?style=flat-square"
alt="Crates.io version"
/></a>
<a href="https://repology.org/project/starship/versions"
><img
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
alt="Packaging status" /></a
><br />
<a href="https://discord.gg/starship"
><img
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
alt="Chat on Discord"
/></a>
<a href="https://twitter.com/StarshipPrompt"
><img
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Follow @StarshipPrompt on Twitter"
/></a>
</p>
<p align="center">
<a href="https://starship.rs">Вебсайт</a>
·
<a href="#🚀-installation">Встановлення</a>
·
<a href="https://starship.rs/config/">Конфігурація</a>
</p>
<p align="center">
<a href="https://github.com/starship/starship/blob/master/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
alt="English"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
alt="Deutsch"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
alt="Español"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
alt="Français"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/id-ID/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-id.png"
alt="Bahasa Indonesia"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/it-IT/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-it.png"
alt="Italiano"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
alt="日本語"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
alt="Português do Brasil"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
alt="Русский"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
alt="Tiếng Việt"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
alt="简体中文"
/></a>
&nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
alt="繁體中文"
/></a>
</p>
[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)
<h1></h1>
<img
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
alt="Starship with iTerm2 and the Snazzy theme"
width="50%"
align="right"
/>
**Простий, супер швидкий та безмежно адаптивний командний рядок для будь-якої оболонки!**
- **Швидкий:** так, швидкий - _реально_ швидкий! 🚀
- **Адаптивний:** налаштуйте кожен елемент вашого командного запиту.
- **Універсальний:** працює у всіх командних оболонках, в будь-якій операційній системі.
- **Інформативний:** одразу показує потрібну інформацію.
- **Багато функцій:** підтримує всі ваші улюблені інструменти.
- **Простий:** швидка інсталяція дозволяє почати роботу за лічені хвилини.
<p align="center">
<a href="https://starship.rs/config/"><strong>Ознайомтесь з документацією Starship &nbsp;&nbsp;</strong></a>
</p>
<a name="🚀-installation"></a>
## 🚀 Встановлення
### Передумови
- Встановлений та ввімкнений набір шрифтів та термінальних іконок [Nerd Font](https://www.nerdfonts.com/) (як от [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
### Крок 1. Встановіть Starship
Виберіть вашу операційну систему зі списку нижче, щоб переглянути інструкцію з установки:
<details>
<summary>Android</summary>
Встановіть Starship використовуючи менеджер пакетів:
| Репозиторій | Командна інструкція |
| --------------------------------------------------------------------------------- | ---------------------- |
| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` |
</details>
<details>
<summary>BSD</summary>
Встановіть 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>
Оновіться до останньої версії системи:
```sh
curl -sS https://starship.rs/install.sh | sh
```
Як варіант, можете встановити 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` |
| удь-який_ | [Snapcraft](https://snapcraft.io/starship) | `snap install starship` |
| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` |
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
</details>
<details>
<summary>macOS</summary>
Оновіться до останньої версії системи:
```sh
curl -sS https://starship.rs/install.sh | sh
```
Як варіант, можете встановити 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` |
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
</details>
<details>
<summary>Windows</summary>
Встановіть останню версію системи за допомогою MSI-інсталятора з розділу [релізів](https://github.com/starship/starship/releases/latest).
Встановіть Starship використовуючи будь-який з наступних менеджерів пакетів:
| Репозиторій | Командна інструкція |
| -------------------------------------------------------------------------------------------- | --------------------------------------- |
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
| [winget](https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship) | `winget install --id Starship.Starship` |
</details>
### Крок 2. Налаштування вашої оболонки для використання Starship
Налаштуйте свою оболонку, щоб ініціалізувати starship. Виберіть ваш варіант зі списку:
<details>
<summary>Bash</summary>
Add the following to the end of `~/.bashrc`:
```sh
eval "$(starship init bash)"
```
</details>
<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:
```lua
load(io.popen('starship init cmd'):read("*a"))()
```
</details>
<details>
<summary>Elvish</summary>
Add the following to the end of `~/.elvish/rc.elv`:
```sh
eval (starship init elvish)
```
Note: Only Elvish v0.18+ is supported
</details>
<details>
<summary>Fish</summary>
Add the following to the end of `~/.config/fish/config.fish`:
```fish
starship init fish | source
```
</details>
<details>
<summary>Ion</summary>
Add the following to the end of `~/.config/ion/initrc`:
```sh
eval $(starship init ion)
```
</details>
<details>
<summary>Nushell</summary>
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
```sh
mkdir ~/.cache/starship
starship init nu | save ~/.cache/starship/init.nu
```
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
```sh
source ~/.cache/starship/init.nu
```
Note: Only Nushell v0.61+ is supported
</details>
<details>
<summary>PowerShell</summary>
Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`):
```powershell
Invoke-Expression (&starship init powershell)
```
</details>
<details>
<summary>Tcsh</summary>
Add the following to the end of `~/.tcshrc`:
```sh
eval `starship init tcsh`
```
</details>
<details>
<summary>Xonsh</summary>
Add the following to the end of `~/.xonshrc`:
```python
execx($(starship init xonsh))
```
</details>
<details>
<summary>Zsh</summary>
Add the following to the end of `~/.zshrc`:
```sh
eval "$(starship init zsh)"
```
</details>
### Крок 3. Configure 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:
- **[Configuration](https://starship.rs/config/)** learn how to configure Starship to tweak your prompt to your liking
- **[Presets](https://starship.rs/presets/)** get inspired by the pre-built configuration of others
## 🤝 Contributing
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/).
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
## 💭 Inspired By
Please check out these previous works that helped inspire the creation of starship. 🙏
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** A ZSH prompt for astronauts.
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** Cross-shell robbyrussell theme written in JavaScript.
- **[reujab/silver](https://github.com/reujab/silver)** A cross-shell customizable powerline-like prompt with icons.
<p align="center">
<br>
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
</p>
## 📝 License
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.

View File

@ -0,0 +1,93 @@
# Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
## [Chocolatey](https://chocolatey.org)
### Передумови
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
### Installation
```powershell
choco install starship
```
## [termux](https://termux.com)
### Передумови
```sh
pkg install getconf
```
### Installation
```sh
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.termux/files/usr/bin
```
## [Funtoo Linux](https://www.funtoo.org/Welcome)
### Installation
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
```sh
emerge app-shells/starship
```
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](https://github.com/nix-community/home-manager)
Enable the `programs.starship` module in your `home.nix` file, and add your settings
```nix
{
programs.starship = {
enable = true;
# Configuration written to ~/.config/starship.toml
settings = {
# add_newline = false;
# character = {
# success_symbol = "[➜](bold green)";
# error_symbol = "[➜](bold red)";
# };
# package.disabled = true;
};
};
}
```
then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
```sh
sudo nixos-rebuild switch
```

View File

@ -0,0 +1,267 @@
# Migrating to v0.45.0
Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization.
This guide is intended to walk you through the breaking changes.
## `prompt_order` has been replaced by a root-level `format`
Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship.
Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves.
**Example pre-v0.45.0 configuration**
```toml
prompt_order = [
"username",
"hostname",
"directory",
"git_branch",
"git_commit",
"git_state",
"git_status",
"cmd_duration",
"custom",
"line_break",
"jobs",
"battery",
"time",
"character",
]
```
**Example v0.45.0 configuration**
```toml
format = """\
$username\
$hostname\
$directory\
$git_branch\
$git_commit\
$git_state\
$git_status\
$cmd_duration\
$custom\
$line_break\
$jobs\
$battery\
$time\
$character\
"""
```
## Module `prefix` and `suffix` have been replaced by `format`
Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered.
Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output.
**Example pre-v0.45.0 configuration**
```toml
[cmd_duration]
prefix = "took "
```
**Example v0.45.0 configuration**
```toml
[cmd_duration]
# $duration The command duration (e.g. "15s")
# $style The default style of the module (e.g. "bold yellow")
format = "took [$duration]($style) "
```
### Affected Modules
#### Character
| Removed Property | Replacement |
| ----------------------- | ---------------- |
| `symbol` | `success_symbol` |
| `use_symbol_for_status` | `error_symbol` |
| `style_success` | `success_symbol` |
| `style_failure` | `error_symbol` |
**Changes to the Default Configuration**
```diff
[character]
-- symbol = ""
-- error_symbol = "✖"
-- use_symbol_for_status = true
-- vicmd_symbol = ""
++ success_symbol = "[](bold green)"
++ error_symbol = "[](bold red)"
++ vicmd_symbol = "[](bold green)"
```
Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code.
With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties.
To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file:
```toml
[character]
error_symbol = "[✖](bold red)"
```
_Note:_ The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
#### Command Duration
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
**Changes to the Default Configuration**
```diff
[cmd_duration]
-- prefix = "took "
++ format = "took [$duration]($style) "
```
#### Directory
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
**Changes to the Default Configuration**
```diff
[directory]
-- prefix = "in "
++ format = "[$path]($style)[$read_only]($read_only_style) "
```
#### Environment Variable
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**
```diff
[env_var]
-- prefix = ""
-- suffix = ""
++ format = "with [$env_value]($style) "
```
#### Git Commit
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**
```diff
[git_commit]
-- prefix = "("
-- suffix = ")"
++ format = '[\($hash\)]($style) '
```
#### Git Status
| Removed Property | Replacement |
| ----------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
| `show_sync_count` | `format` |
**Changes to the Default Configuration**
```diff
[git_status]
-- prefix = "["
-- suffix = "]"
-- show_sync_count = false
++ format = '([\[$all_status$ahead_behind\]]($style) )'
```
Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch.
With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`.
To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file:
```toml
[git_status]
ahead = "⇡${count}"
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
behind = "⇣${count}"
```
#### Hostname
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**
```diff
[hostname]
-- prefix = ""
-- suffix = ""
++ format = "[$hostname]($style) in "
```
#### Singularity
| Removed Property | Replacement |
| ---------------- | ----------- |
| `label` | `format` |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**
```diff
[singularity]
-- prefix = ""
-- suffix = ""
++ format = '[$symbol\[$env\]]($style) '
```
#### Time
| Removed Property | Replacement |
| ---------------- | ------------- |
| `format` | `time_format` |
**Changes to the Default Configuration**
```diff
[time]
-- format = "🕙[ %T ]"
++ time_format = "%T"
++ format = "at 🕙[$time]($style) "
```
#### Custom Commands
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**
```diff
[custom.example]
-- prefix = ""
-- suffix = ""
++ format = "[$symbol$output]($style) "
```

View File

@ -0,0 +1,41 @@
# Presets
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
To get details on how to use a preset, simply click on the image.
## [Nerd Font Symbols](./nerd-font.md)
This preset changes the symbols for each module to use Nerd Font symbols.
[![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png "Click to view Nerd Font Symbols preset")](./nerd-font)
## [Bracketed Segments](./bracketed-segments.md)
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
[![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png "Click to view Bracketed Segments preset")](./bracketed-segments)
## [Plain Text Symbols](./plain-text.md)
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
[![Screenshot of Plain Text Symbols preset](/presets/img/plain-text-symbols.png "Click to view Plain Text Symbols preset")](./plain-text)
## [No Runtime Versions](./no-runtimes.md)
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
[![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png "Click to view No Runtime Versions preset")](./no-runtimes)
## [Pure Prompt](./pure-preset.md)
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
[![Screenshot of Pure preset](/presets/img/pure-preset.png "Click to view Pure Prompt preset")](./pure-preset)
## [Pastel Powerline](./pastel-powerline.md)
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
[![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png "Click to view Pure Prompt preset")](./pastel-powerline)

View File

@ -0,0 +1,17 @@
[Return to Presets](./README.md#bracketed-segments)
# Bracketed Segments Preset
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png)
### Configuration
```sh
starship preset bracketed-segments > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/bracketed-segments.toml)
<<< @/.vuepress/public/presets/toml/bracketed-segments.toml

View File

@ -0,0 +1,21 @@
[Return to Presets](./README.md#nerd-font-symbols)
# Nerd Font Symbols Preset
This preset changes the symbols for each module to use Nerd Font symbols.
![Screenshot of Nerd Font Symbols preset](/presets/img/nerd-font-symbols.png)
### Передумови
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
### Configuration
```sh
starship preset nerd-font-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
<<< @/.vuepress/public/presets/toml/nerd-font-symbols.toml

View File

@ -0,0 +1,17 @@
[Return to Presets](./README.md#no-runtime-versions)
# No Runtime Versions Preset
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
![Screenshot of Hide Runtime Versions preset](/presets/img/no-runtime-versions.png)
### Configuration
```sh
starship preset no-runtime-versions > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
<<< @/.vuepress/public/presets/toml/no-runtime-versions.toml

View File

@ -0,0 +1,21 @@
[Return to Presets](./README.md#pastel-powerline)
# Pastel Powerline Preset
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
![Screenshot of Pastel Powerline preset](/presets/img/pastel-powerline.png)
### Передумови
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Caskaydia Cove Nerd Font)
### Configuration
```sh
starship preset pastel-powerline > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pastel-powerline.toml)
<<< @/.vuepress/public/presets/toml/pastel-powerline.toml

View File

@ -0,0 +1,17 @@
[Return to Presets](./README.md#plain-text-symbols)
## Plain Text Symbols Preset
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
![Screenshot of Plain Text Symbols preset](/presets/img/plain-text-symbols.png)
### Configuration
```sh
starship preset plain-text-symbols > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
<<< @/.vuepress/public/presets/toml/plain-text-symbols.toml

View File

@ -0,0 +1,17 @@
[Return to Presets](./README.md#pure)
# Pure Preset
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
![Screenshot of Pure preset](/presets/img/pure-preset.png)
### Configuration
```sh
starship preset pure-preset > ~/.config/starship.toml
```
[Click to download TOML](/presets/toml/pure-preset.toml)
<<< @/.vuepress/public/presets/toml/pure-preset.toml

View File

@ -55,11 +55,10 @@ description: Starship là prompt nhỏ, cực nhanh, và khả năng tuỳ biế
```sh
brew install starship
```
Với [Scoop](https://scoop.sh):
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. Thêm đoạn mã khởi tạo vào tệp tin cấu hình shell của bạn:

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:
@ -228,8 +254,8 @@ Chuỗi kiểu là một danh sách các từ, được phân cách bởi khoả
- `bold`
- `nghiêng`
- `underline`
- `dimmed`
- `gạch dưới`
- `làm tối đi`
- `đảo ngược`
- `blink`
- `hidden`

View File

@ -162,13 +162,15 @@ Cái này là danh sách các tuỳ chọn cho cấu hình prompt-wide.
### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
| ----------------- | ------------------------------ | ------------------------------------------------------------------------ |
| `format` | [link](#default-prompt-format) | Cấu hình định dạng của prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout của starship cho việc quét các tập tin (tính theo milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Chèn dòng trắng giữa các dấu nhắc lệnh. |
| Tuỳ chọn | Mặc định | Mô tả |
| ----------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Cấu hình định dạng của prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout của starship cho việc quét các tập tin (tính theo milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Chèn dòng trắng giữa các dấu nhắc lệnh. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### Ví dụ
@ -184,8 +186,18 @@ format = """
# Chờ 10 milliseconds để starship kiểm tra các tập tin trong đường dẫn hiện tại.
scan_timeout = 10
# Vô hiệu hóa dòng trắng tại ví trị bắt đầu của dấu nhắc lệnh
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Định dạng prompt mặc định
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +444,12 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
Tuỳ chọn `display` là một mảng của của bảng sau.
| Tuỳ chọn | Mặc định | Mô tả |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | Cận trên cho tuỳ chọn hiển thị. |
| `style` | `bold red` | Kiểu sử dụng nếu tuỳ chọn hiển thị được sử dụng bên trong. |
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
| Tuỳ chọn | Mặc định | Mô tả |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | Cận trên cho tuỳ chọn hiển thị. |
| `style` | `"red bold"` | Kiểu sử dụng nếu tuỳ chọn hiển thị được sử dụng bên trong. |
| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
#### Ví dụ
@ -462,24 +475,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | 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 nên kích hoạt các mô đun này. |
| `style` | `"bold blue"` | Kiểu cho module. |
| `disabled` | `false` | Vô hiệu mô đun `elixir`. |
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | 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 nên kích hoạt các mô đun này. |
| `style` | `"bold blue"` | Kiểu cho module. |
| `disabled` | `false` | Vô hiệu mô đun `elixir`. |
### Các biến
| Biến | Ví dụ | Mô tả |
| ------------- | -------- | -------------------------------- |
| `buf_version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Giá trị ghi đè tuỳ chọn `symbol` |
| `style`* | | Giá trị ghi đè của `style` |
| Biến | Ví dụ | Mô tả |
| --------- | -------- | -------------------------------- |
| `version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Giá trị ghi đè tuỳ chọn `symbol` |
| `style`* | | Giá trị ghi đè của `style` |
*: Biến này có thể chỉ được sử dụng như một phần của style string
@ -609,9 +622,9 @@ Mặc định, nó chỉ thay đổi màu. If you also want to change its shape
### Các biến
| Biến | Ví dụ | Mô tả |
| ------ | ----- | ----------------------------------------------------------------------------- |
| symbol | | Một phản ánh của một trong `success_symbol`, `error_symbol` or `vicmd_symbol` |
| Biến | Ví dụ | Mô tả |
| ------ | ----- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Các vị dụ
@ -794,12 +807,12 @@ The `container` module displays a symbol and container name, if inside a contain
### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
| ---------- | -------------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | Kiểu cho module. |
| `format` | `"[$symbol \\[$name\\]]($style) "` | Định dạng cho module. |
| `disabled` | `false` | Disables the `container` module. |
| Tuỳ chọn | Mặc định | Mô tả |
| ---------- | ---------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | Kiểu cho module. |
| `format` | `'[$symbol \[$name\]]($style) '` | Định dạng cho module. |
| `disabled` | `false` | Disables the `container` module. |
### Các biến
@ -817,7 +830,7 @@ The `container` module displays a symbol and container name, if inside a contain
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | Định dạng cho module. |
| `version_format` | `v${raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | Kiểu cho module. |
| `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
| `detect_files` | `["daml.yaml"]` | 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. |
| `disabled` | `false` | Disables the `daml` module. |
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | Định dạng cho module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | Kiểu cho module. |
| `detect_extensions` | `[]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
| `detect_files` | `["daml.yaml"]` | 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. |
| `disabled` | `false` | Disables the `daml` module. |
### Các biến
@ -993,7 +1006,7 @@ Cho ví dụ, `~/Dev/Nix/nixpkgs/pkgs` nơi `nixpkgs` là gốc của repo, và
| `read_only` | `"🔒"` | Biểu tượng để nhận biết thư mục hiện tại là chỉ đọc. |
| `read_only_style` | `"red"` | Style cho biểu tượng chỉ đọc. |
| `truncation_symbol` | `""` | Biểu tượng tiền tố cho các đường dẫn rút gọn. ví dụ: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `home_symbol` | `"~"` | Biểu tượng nhận biết thư mục home. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
@ -1480,16 +1493,16 @@ Mô đun `git_commit` hiển thị hash commit hiện tại và tag (nếu có)
### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | Độ dài của git commit hash được hiển thị. |
| `format` | `"[\\($hash$tag\\)]($style) "` | Định dạng cho module. |
| `style` | `"bold green"` | Kiểu cho module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Vô hiệu hiển thị thông tin tag trong mô đun `git_commit`. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Biểu tượng tag trước thông tin được hiển thị |
| `disabled` | `false` | Vô hiệu mô đun `git_commit`. |
| Tuỳ chọn | Mặc định | Mô tả |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | Độ dài của git commit hash được hiển thị. |
| `format` | `'[\($hash$tag\)]($style) '` | Định dạng cho module. |
| `style` | `"bold green"` | Kiểu cho module. |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Vô hiệu hiển thị thông tin tag trong mô đun `git_commit`. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Biểu tượng tag trước thông tin được hiển thị |
| `disabled` | `false` | Vô hiệu mô đun `git_commit`. |
### Các biến
@ -1567,7 +1580,7 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | Định dạng cho module. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | Định dạng cho module. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Các biến
@ -1588,7 +1601,7 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git Status
@ -1690,7 +1703,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). Mặc định module sẽ được hiển thị nếu có bất kì điều kiện nào dưới đây thoả mãn:
- Thư mục hiện tại chứa một tệp tin `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot`
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- Thư mục hiện tại chứa một tệp tin với phần mở rộng `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc`
### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | Định dạng cho module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | 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 nên kích hoạt các mô đun này. |
| `symbol` | `"☕ "` | Một format string đại diện cho biểu tượng Java |
| `style` | `"red dimmed"` | Kiểu cho module. |
| `disabled` | `false` | Vô hiệu `java` module. |
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | Định dạng cho module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | 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 nên kích hoạt các mô đun này. |
| `symbol` | `"☕ "` | Một format string đại diện cho biểu tượng Java |
| `style` | `"red dimmed"` | Kiểu cho module. |
| `disabled` | `false` | Vô hiệu `java` module. |
### Các biến
@ -2258,6 +2271,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
| ------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. Bạn có thể sử dụng `""` để ẩn biểu tượng. |
| `format` | `"via [$symbol$project]($style) "` | Định dạng cho module. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | Kiểu cho module. |
| `disabled` | `false` | Disables the `meson` module. |
### Các biến
| Biến | Ví dụ | Mô tả |
| --------- | ---------- | -------------------------------- |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Giá trị ghi đè tuỳ chọn `symbol` |
| style\* | | Giá trị ghi đè của `style` |
*: Biến này có thể chỉ được sử dụng như một phần của style string
### Ví dụ
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory.
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | Định dạng cho module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | Kiểu cho module. |
| `disabled` | `false` | Disables the `openstack` module. |
| Tuỳ chọn | Mặc định | Mô tả |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | Định dạng cho module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | Kiểu cho module. |
| `disabled` | `false` | Disables the `openstack` module. |
### Các biến
@ -2495,7 +2547,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
@ -3077,16 +3129,16 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế
| Tuỳ chọn | Mặc định | Mô tả |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | Định dạng cho module. |
| `style` | `"white bold"` | Kiểu cho module. |
@ -3227,23 +3279,23 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế
### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Kiểu cho module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| Tuỳ chọn | Mặc định | Mô tả |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | Kiểu cho module. |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Các biến
@ -3288,13 +3340,13 @@ Mặc định, mô đun này được vô hiệu. Để kích hoạt nó, thiế
### Các tuỳ chọn
| Tuỳ chọn | Mặc định | Mô tả |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | Kiểu cho module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| Tuỳ chọn | Mặc định | Mô tả |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | Kiểu cho module. |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Các biến
@ -3762,7 +3814,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,7 +220,6 @@ Alternatively, install Starship using any of the following package managers:
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

View File

@ -55,11 +55,10 @@ description: Starship是一款轻量级、反应迅速、可自定义的高颜
```sh
brew install starship
```
使用 [Scoop](https://scoop.sh)
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. 将初始化脚本添加到您的 shell 的配置文件:

View File

@ -8,11 +8,11 @@ Starship 功能繁多,有时您必须在编辑 `starship.toml` 之外做更多
:::
## TransientPrompt in PowerShell
## PowerShell中的命令行提示(TransientPrompt)
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`.
可以用自定义字符串替换预设的命令行提示。 这在不经常需要所有提示信息的情况下很有用。 若要启用该功能,请在 shell 中运行 `Enable-TransitientPrompt`命令 若要永久启用该功能,请将 上述语句放在您的 `$PROFILE` 中。 通过在shell中运行 `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
默认情况下,输入的左侧是 `>`符号。 要自定义它,请定义一个新函数,名为 `Invoke-Starship-TransitentFunction`。 例如,要 在这里显示Starship的 `character` 模块,您需要如下操作:
```powershell
function Invoke-Starship-TransientFunction {
@ -24,28 +24,28 @@ Invoke-Expression (&starship init powershell)
Enable-TransientPrompt
```
## TransientPrompt and TransientRightPrompt in Cmd
## 在 Cmd 中的 命令行提示(TransitentPrompt )和 语法高亮(TransentRightPrompt)
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 set prompt.transient <value>`&lt;prompt.transient>之后跟以下单词中的一个:
- `always`: always replace the previous prompt
- `same_dir`: replace the previous prompt only if the working directory is same
- `off`: do not replace the prompt (i.e. turn off transience)
- `always`: 总是预设的提示
- `same_dir`: 仅在工作目录相同的情况下替换预设的提示
- `off`: 不要替换提示(即关闭命令行提示)
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
你只需要这样做一次。 对您的 `starship.lua` 进行以下更改,以自定义左侧和右侧显示的内容:
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
- 默认情况下,输入的左侧是 `>`符号。 要自定义它,请定义一个新函数,名为 `Invoke-Starship-TransitentFunction`。 This function receives the current prompt as a string that you can utilize. 例如,要 在这里显示Starship的 `character` 模块,您需要如下操作:
```lua
function starship_transient_prompt_func(prompt)
function starship_transitent_propt_func(empt)
return io.popen("starship module character"
.." --keymap="..rl.getvariable('keymap')
..." --keymap="..rl.getvariable('keymap')
):read("*a")
end
load(io.popen('starship init cmd'):read("*a"))()
load(io.popen('starship init cmd'):read("*a"))
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
- 默认情况下,输入的右侧为空。 要自定义它,请定义一个新函数,名为 `Invoke-Starship-TransitentFunction`。 This function receives the current prompt as a string that you can utilize. 例如,要在这里显示 最后一个命令开始的时间,您需要如下操作:
```lua
function starship_transient_rprompt_func(prompt)
@ -54,6 +54,32 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## 在 Fish 中的 命令行提示(TransitentPrompt)和语法高亮(TransentRightPrompt)
可以用自定义字符串替换预设的命令行提示。 这在不经常需要所有提示信息的情况下很有用。 若要启用该功能,请在 shell 中运行 `Enable-TransitientPrompt`命令 若要永久启用该功能,请将 上述语句放在您的 `~/.config/fish/config.fish` 中。 通过在shell中运行 `Disable-TransientPrompt`命令来禁用这项功能。
请注意对于Fish命令行提示只在命令行非空 和语法正确的情况下才会显示。
- 默认情况下,输入的左侧是 粗体绿色的❯</code>符号。 要自定义它,请定义一个新函数,名为 `Invoke-Starship-TransitentFunction`。 例如,要 在这里显示Starship的 `character` 模块,您需要如下操作:
```fish
function starship_transent_rmpt_func
starship module time
end
starship init fish | source
enable_transience
```
- 默认情况下,输入的右侧为空。 要自定义它,请定义一个新函数,名为 `Invoke-Starship-TransitentFunction`。 例如,要在这里显示 最后一个命令开始的时间,您需要如下操作:
```fish
function starship_transent_rmpt_func
starship module time
end
starship init fish | source
enable_transience
```
## 在 Cmd 中自定义提示符显示前和执行前的命令
Clink 提供了很灵活的 API能在 Cmd shell 中运行预提示和执行前命令。 在 Starship 中使用这些 API 很容易。 对你的 `starship.lua` 按需做出如下修改:
@ -78,11 +104,11 @@ end
load(io.popen('starship init cmd'):read("*a"))()
```
## 在 Bash 中自定义提示和执行命令
## 在 Bash 中自定义提示符显示前和执行前的命令
Bash 并没有类似大多数其它 shell 的正式预执行/预命令框架。 因此,很难在 `bash` 中提供完全可自定义的 hook 机制。 然而Starship 确实能使您有限地在提示符渲染过程中插入自己的函数执行:
Bash 不像多数其他的 Shell 有成体系的预执行框架。 因此,很难在 `bash` 中提供完全可自定义的 hook 机制。 然而Starship 确实能使您有限地在提示符渲染过程中插入自己的函数执行:
- 若要在提示符显示之前运行自定义函数,需要定义此函数,然后将函数名赋值给 `starship_reserved_user_func`。 例如,要在提示符之前绘制一枚火箭,您应该写
- 若要在提示符显示之前运行自定义函数,需要定义此函数,然后将函数名赋值给 `starship_reserved_user_func`。 例如,如果想在提示符前绘制一个火箭,可以这样写:
```bash
function blastoff(){
@ -175,7 +201,7 @@ Invoke-Expression (&starship init powershell)
## 启用右侧提示
一些 Shell 支持右侧提示, 它与输入区渲染在同一行。 Starship 可以设置右侧提示的内容,使用 `right_format` 选项。 所有支持 `format` 的组件也同时支持 `right_format`。 未显式在 `format``right_format` 中使用的组件,会保存在变量 `$all` 中。
一些 Shell 支持右侧提示, 它与输入区渲染在同一行。 使用 `right_format` 选项来设置 Starship 的右侧提示。 所有支持 `format` 的组件也同时支持 `right_format`。 未显式在 `format``right_format` 中使用的组件,会保存在变量 `$all` 中。
注意:右侧提示和输入区显示在同一行。 如果需要在输入区的上方显示右对齐的组件,请查阅 [`fill` 组件](/config/#fill)。
@ -239,11 +265,11 @@ continuation_prompt = "▶▶"
- `<color>`
- `none`
`<color>` 是颜色说明符(下面解释)`fg:<color>``<color>` 的功能暂时相同,未来可能会更改。 `inverted` 会反转背景和文字的颜色。 字符串中的单词顺序不影响显示结果。
`<color>` 可以声明颜色,会在下面解释`fg:<color>``<color>` 的功能暂时相同,未来可能会更改。 `inverted` 会反转背景和文字的颜色。 字符串中的单词顺序不影响显示结果。
`none` 不是 `bg:` 的一部分,则它会覆盖其他的设置:比如 `fg:red none fg:blue` 不会更改任何样式。 `bg:none` 会设置成默认背景色,因此 `fg:red bg:none`、`red`、`fg:red` 的作用相同;类似,`bg:green fg:red bg:none`、`fg:red`、`red` 的作用也相同。 未来可能会将 `none` 与其它标识符一起使用视为一种错误。
`none` 不是 `bg:` 的一部分,则它会覆盖其他的设置:比如 `fg:red none fg:blue` 不会更改任何样式。 `bg:none` 会设置成默认背景色,因此 `fg:red bg:none`、`red`、`fg:red` 的作用相同;类似,`bg:green fg:red bg:none`、`fg:red`、`red` 的作用也相同。 未来可能会将 `none` 与其它单词一起使用视为错误。
颜色说明符可以是以下内容之一
颜色可以由以下任一内容定义
- 任一标准的终端颜色:`black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`。 您也可以使用前缀 `bright-` 定义浅色版本(例如 `bright-white`)。
- 一个 `#` 后跟一个六位十六进制数。 这将指定一个 [十六进制 RGB 颜色代码](https://www.w3schools.com/colors/colors_hexadecimal.asp)。
@ -251,8 +277,8 @@ continuation_prompt = "▶▶"
如果为文本/背景指定了多个颜色,字符串中最后指定的颜色将具有最高优先级。
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
并非每种类型的字符串都会被每个终端正确显示。 特别地,以下是已知的几种情况:
- Many terminals disable support for `blink` by default
- `hidden` is not supported on iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564).
- `strikethrough` is not supported by the default macOS Terminal.app
- 许多终端默认禁用对 `blink` 的支持
- `hidden` 在 iTerm (https://gitlab.com/gnachman/iterm2/-/issues/4564) 上不被支持。
- `strikethrough` 不被默认 macOS Terminal.app 支持

View File

@ -125,7 +125,7 @@ Starship 中的大多数组件允许您为其设置显示样式。 显示样式
以下符号在格式字符串中具有特殊用途,必须转义: `$ [ ] ( )`
Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). It is recommended to use a literal string (surrounded by single quotes) in your config. If you want to use a basic string (surrounded by double quotes), you must escape the backslash itself (i.e. use `\\`).
Note that TOML has [both basic strings and literal strings](https://toml.io/en/v1.0.0#string). 建议在你的配置中使用字面字符串(由单引号包围)。 如果你想使用一个基本的字符串(由双引号包围),你必须在双引号前面添加反斜杠符号进行转义(即使用\“abc\"输出"abc")。
For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent:
@ -144,9 +144,9 @@ format = '''
\$'''
```
### Negative matching
### 错误匹配
Many modules have `detect_extensions`, `detect_files`, and `detect_folders` variables. These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched.
许多模块都有 detect_extensions, detect_files, 和 detect_folders 变量。 These take lists of strings to match or not match. "Negative" options, those which should not be matched, are indicated with a leading "!" character. The presence of _any_ negative indicator in the directory will result in the module not being matched.
Extensions are matched against both the characters after the last dot in a filename, and the characters after the first dot in a filename. For example, `foo.bar.tar.gz` will be matched against `bar.tar.gz` and `gz` in the `detect_extensions` variable. Files whose name begins with a dot are not considered to have extensions at all.
@ -162,13 +162,15 @@ detect_extensions = ["ts", "!video.ts", "!audio.ts"]
### 配置项
| 选项 | 默认值 | 描述 |
| ----------------- | ----------------------------- | ---------------------------------------------------------------- |
| `format` | [见下文](#default-prompt-format) | 配置提示符的格式。 |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Starship 扫描文件的超时时间(单位:毫秒)。 |
| `command_timeout` | `500` | Startship 执行命令的超时时间(单位:毫秒)。 |
| `add_newline` | `true` | 在 shell 提示符之间插入空行。 |
| 选项 | 默认值 | 描述 |
| ----------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [见下文](#default-prompt-format) | 配置提示符的格式。 |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Starship 扫描文件的超时时间(单位:毫秒)。 |
| `command_timeout` | `500` | Startship 执行命令的超时时间(单位:毫秒)。 |
| `add_newline` | `true` | 在 shell 提示符之间插入空行。 |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### 示例
@ -186,6 +188,16 @@ scan_timeout = 10
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### 默认提示符格式
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +444,12 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
`display` 字段的子字段如下:
| 选项 | 默认值 | 描述 |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | 当前显示设置的电量上限(见示例) |
| `style` | `bold red` | 若组件被显示,则使用此样式 |
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
| 选项 | 默认值 | 描述 |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | 当前显示设置的电量上限(见示例) |
| `style` | `"red bold"` | 若组件被显示,则使用此样式 |
| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
#### 示例
@ -462,24 +475,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### 配置项
| 选项 | 默认值 | 描述 |
| ------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `elixir` module. |
| 选项 | 默认值 | 描述 |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `elixir` module. |
### Variables
| 字段 | 示例 | 描述 |
| ------------- | -------- | -------------------- |
| `buf_version` | `v1.0.0` | The version of `buf` |
| `symbol` | | `symbol`对应值 |
| `style`* | | `style`对应值 |
| 字段 | 示例 | 描述 |
| --------- | -------- | -------------------- |
| `version` | `v1.0.0` | The version of `buf` |
| `symbol` | | `symbol`对应值 |
| `style`* | | `style`对应值 |
*: This variable can only be used as a part of a style string
@ -609,9 +622,9 @@ By default it only changes color. If you also want to change its shape take a lo
### Variables
| 字段 | 示例 | 描述 |
| ------ | -- | --------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
| 字段 | 示例 | 描述 |
| ------ | -- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Examples
@ -794,12 +807,12 @@ The `container` module displays a symbol and container name, if inside a contain
### 配置项
| 选项 | 默认值 | 描述 |
| ---------- | -------------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | 此组件的样式。 |
| `format` | `"[$symbol \\[$name\\]]($style) "` | 组件格式化模板。 |
| `disabled` | `false` | Disables the `container` module. |
| 选项 | 默认值 | 描述 |
| ---------- | ---------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | 此组件的样式。 |
| `format` | `'[$symbol \[$name\]]($style) '` | 组件格式化模板。 |
| `disabled` | `false` | Disables the `container` module. |
### Variables
@ -817,7 +830,7 @@ The `container` module displays a symbol and container name, if inside a contain
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### 配置项
| 选项 | 默认值 | 描述 |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | 组件格式化模板。 |
| `version_format` | `v${raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | 此组件的样式。 |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
| 选项 | 默认值 | 描述 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | 组件格式化模板。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | 此组件的样式。 |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
### Variables
@ -993,7 +1006,7 @@ format = "via [🦕 $version](green bold) "
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `home_symbol` | `"~"` | The symbol indicating home directory. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
@ -1480,16 +1493,16 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### 配置项
| 选项 | 默认值 | 描述 |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | 显示的 git 提交哈希值的长度。 |
| `format` | `"[\\($hash$tag\\)]($style) "` | 组件格式化模板。 |
| `style` | `"bold green"` | 此组件的样式。 |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | 禁用 `git_commit` 组件。 |
| 选项 | 默认值 | 描述 |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | 显示的 git 提交哈希值的长度。 |
| `format` | `'[\($hash$tag\)]($style) '` | 组件格式化模板。 |
| `style` | `"bold green"` | 此组件的样式。 |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | 禁用 `git_commit` 组件。 |
### Variables
@ -1567,7 +1580,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | 组件格式化模板。 |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | 组件格式化模板。 |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
@ -1588,7 +1601,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git Status
@ -1690,7 +1703,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
### 配置项
| 选项 | 默认值 | 描述 |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | 组件格式化模板。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | 此组件的样式。 |
| `disabled` | `false` | 禁用 `java` 组件。 |
| 选项 | 默认值 | 描述 |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | 组件格式化模板。 |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | 此组件的样式。 |
| `disabled` | `false` | 禁用 `java` 组件。 |
### Variables
@ -2258,6 +2271,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### 配置项
| 选项 | 默认值 | 描述 |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. |
| `format` | `"via [$symbol$project]($style) "` | 组件格式化模板。 |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `meson` module. |
### Variables
| 字段 | 示例 | 描述 |
| --------- | ---------- | ------------------------------ |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | `symbol`对应值 |
| style\* | | `style`对应值 |
*: This variable can only be used as a part of a style string
### 示例
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
`hg_branch` 组件显示当前目录的 hg 仓库的活动分支。
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### 配置项
| 选项 | 默认值 | 描述 |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | 组件格式化模板。 |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `openstack` module. |
| 选项 | 默认值 | 描述 |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | 组件格式化模板。 |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | 此组件的样式。 |
| `disabled` | `false` | Disables the `openstack` module. |
### Variables
@ -2495,7 +2547,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
@ -3077,16 +3129,16 @@ The `shell` module shows an indicator for currently used shell.
| 选项 | 默认值 | 描述 |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | 组件格式化模板。 |
| `style` | `"white bold"` | 此组件的样式。 |
@ -3227,23 +3279,23 @@ The `status` module displays the exit code of the previous command. If $success_
### 配置项
| 选项 | 默认值 | 描述 |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | 此组件的样式。 |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| 选项 | 默认值 | 描述 |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | 此组件的样式。 |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables
@ -3288,13 +3340,13 @@ The `sudo` module displays if sudo credentials are currently cached. The module
### 配置项
| 选项 | 默认值 | 描述 |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | 此组件的样式。 |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| 选项 | 默认值 | 描述 |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | 此组件的样式。 |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Variables
@ -3762,7 +3814,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,7 +220,6 @@ curl -sS https://starship.rs/install.sh | sh
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |

View File

@ -14,7 +14,7 @@
此预设使用括号来分隔所有组件的提示符,不使用 Starship 默认的分隔词“via”“on” 等等)。
[![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png "Click to view Bracketed Segments preset")](./bracketed-segments)
[![Bracketed Segments preset预设屏幕截图](/presets/img/bracketed-segments.png "Click to view Bracketed Segments preset")](./bracketed-segments)
## [纯文本符号](./plain-text.md)
@ -32,7 +32,7 @@
此预设模拟 [Pure](https://github.com/sindresorhus/pure) 的外观和行为。
[![Screenshot of Pure preset](/presets/img/pure-preset.png "Click to view Pure Prompt preset")](./pure-preset)
[![Pure 预设屏幕截图](/presets/img/pure-preset.png "Click to view Pure Prompt preset")](./pure-preset)
## [Pastel Powerline](./pastel-powerline.md)

View File

@ -4,7 +4,7 @@
此预设使用括号来分隔所有组件的提示符,不使用 Starship 默认的分隔词“via”“on” 等等)。
![Screenshot of Bracketed Segments preset](/presets/img/bracketed-segments.png)
![Bracketed Segments preset预设屏幕截图](/presets/img/bracketed-segments.png)
### 配置

View File

@ -4,7 +4,7 @@
此预设模拟 [Pure](https://github.com/sindresorhus/pure) 的外观和行为。
![Screenshot of Pure preset](/presets/img/pure-preset.png)
![Pure 预设屏幕截图](/presets/img/pure-preset.png)
### 配置

View File

@ -55,11 +55,10 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化
```sh
brew install starship
```
使用 [Scoop](https://scoop.sh)
With [Winget](https://github.com/microsoft/winget-cli):
```powershell
scoop install starship
winget install starship
```
1. 將初始化腳本 (script) 加入你的 shell 的設定檔:

View File

@ -54,6 +54,32 @@ end
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`.
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
- By default, the left side of input gets replaced with a bold-green ``. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
```fish
function starship_transient_prompt_func
starship module character
end
starship init fish | source
enable_transience
```
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
```fish
function starship_transient_rprompt_func
starship module time
end
starship init fish | source
enable_transience
```
## 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:

View File

@ -162,13 +162,15 @@ detect_extensions = ["ts", "!video.ts", "!audio.ts"]
### 選項
| Option | 預設 | 說明 |
| ----------------- | ---------------------------- | ---------------------------------------------------------------- |
| `format` | [連結](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| Option | 預設 | 說明 |
| ----------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `format` | [連結](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `""` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
### 範例
@ -186,6 +188,16 @@ scan_timeout = 10
# Disable the blank line at the start of the prompt
add_newline = false
# Set "foo" as custom color palette
palette = "foo"
# Define custom colors
[palettes.foo]
# Overwrite existing color
blue = "21"
# Define new color
mustard = "#af8700"
```
### Default Prompt Format
@ -252,6 +264,7 @@ $zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
@ -431,12 +444,12 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
`display` 選項是一個下列表格的陣列。
| Option | 預設 | 說明 |
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | 顯示選項的上界。 |
| `style` | `bold red` | 顯示選項使用時的風格。 |
| `charging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | `-` | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
| Option | 預設 | 說明 |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `threshold` | `10` | 顯示選項的上界。 |
| `style` | `"red bold"` | 顯示選項使用時的風格。 |
| `charging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `charging_symbol` option. |
| `discharging_symbol` | | Optional symbol displayed if display option is in use, defaults to battery's `discharging_symbol` option. |
#### 範例
@ -462,24 +475,24 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
### 選項
| Option | 預設 | 說明 |
| ------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `format` | `'with [$symbol($version \(Buf $buf_version\) )]($style)'` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `elixir` module. |
| Option | 預設 | 說明 |
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `"with [$symbol($version )]($style)"` | The format for the `buf` module. |
| `version_format` | `"v${raw}"` | The version format. |
| `symbol` | `"🦬 "` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["buf.yaml", "buf.gen.yaml", "buf.work.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `elixir` module. |
### Variables
| 變數 | 範例 | 說明 |
| ------------- | -------- | ------------------------------------ |
| `buf_version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
| 變數 | 範例 | 說明 |
| --------- | -------- | ------------------------------------ |
| `version` | `v1.0.0` | The version of `buf` |
| `symbol` | | Mirrors the value of option `symbol` |
| `style`* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
@ -609,9 +622,9 @@ By default it only changes color. If you also want to change its shape take a lo
### Variables
| 變數 | 範例 | 說明 |
| ------ | -- | --------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` |
| 變數 | 範例 | 說明 |
| ------ | -- | -------------------------------------------------------------------------------------------------------- |
| symbol | | A mirror of either `success_symbol`, `error_symbol`, `vimcmd_symbol` or `vimcmd_replace_one_symbol` etc. |
### Examples
@ -794,12 +807,12 @@ The `container` module displays a symbol and container name, if inside a contain
### 選項
| Option | 預設 | 說明 |
| ---------- | -------------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | 這個模組的風格。 |
| `format` | `"[$symbol \\[$name\\]]($style) "` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
| Option | 預設 | 說明 |
| ---------- | ---------------------------------- | ----------------------------------------- |
| `symbol` | `"⬢"` | The symbol shown, when inside a container |
| `style` | `"bold red dimmed"` | 這個模組的風格。 |
| `format` | `'[$symbol \[$name\]]($style) '` | The format for the module. |
| `disabled` | `false` | Disables the `container` module. |
### Variables
@ -817,7 +830,7 @@ The `container` module displays a symbol and container name, if inside a contain
# ~/.config/starship.toml
[container]
format = "[$symbol \\[$name\\]]($style) "
format = '[$symbol \[$name\]]($style) '
```
## Crystal
@ -867,16 +880,16 @@ The `daml` module shows the currently used [Daml](https://www.digitalasset.com/d
### 選項
| Option | 預設 | 說明 |
| ------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| `format` | `via [$symbol($version )]($style)` | The format for the module. |
| `version_format` | `v${raw}` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | 這個模組的風格。 |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
| Option | 預設 | 說明 |
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"Λ "` | A format string representing the symbol of Daml |
| `style` | `"bold cyan"` | 這個模組的風格。 |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `["daml.yaml"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `disabled` | `false` | Disables the `daml` module. |
### Variables
@ -993,7 +1006,7 @@ format = "via [🦕 $version](green bold) "
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_style` | | The style for the root of the git repo. The default value is equivalent to `style`. |
| `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `home_symbol` | `"~"` | The symbol indicating home directory. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
@ -1480,16 +1493,16 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
### 選項
| Option | 預設 | 說明 |
| -------------------- | ---------------------------------- | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `"[\\($hash$tag\\)]($style) "` | The format for the module. |
| `style` | `"bold green"` | 這個模組的風格。 |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
| Option | 預設 | 說明 |
| -------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
| `format` | `'[\($hash$tag\)]($style) '` | The format for the module. |
| `style` | `"bold green"` | 這個模組的風格。 |
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
| `tag_max_candidates` | `0` | How many commits to consider for tag display. The default only allows exact matches. |
| `tag_symbol` | `" 🏷 "` | Tag symbol prefixing the info shown |
| `disabled` | `false` | Disables the `git_commit` module. |
### Variables
@ -1567,7 +1580,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `only_nonzero_diffs` | `true` | Render status only for changed items. |
| `format` | `'([+$added]($added_style) )([-$deleted]($deleted_style) )'` | The format for the module. |
| `format` | `"([+$added]($added_style) )([-$deleted]($deleted_style) )"` | The format for the module. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
@ -1588,7 +1601,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
format = "[+$added]($added_style)/[-$deleted]($deleted_style) "
```
## Git Status
@ -1690,7 +1703,7 @@ Use Windows Starship executable on Windows paths in WSL
# ~/.config/starship.toml
[git_status]
windows_starship = '/mnt/c/Users/username/scoop/apps/starship/current/starship.exe'
windows_starship = "/mnt/c/Users/username/scoop/apps/starship/current/starship.exe"
```
## Go
@ -1852,21 +1865,21 @@ disabled = false
The `java` module shows the currently installed version of [Java](https://www.oracle.com/java/). By default the module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `.deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file
- The current directory contains a file with the `.java`, `.class`, `.gradle`, `.jar`, `.clj`, or `.cljc` extension
### 選項
| Option | 預設 | 說明 |
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", ".deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `java` 模組。 |
| Option | 預設 | 說明 |
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `detect_extensions` | `["java", "class", "gradle", "jar", "cljs", "cljc"]` | Which extensions should trigger this module. |
| `detect_files` | `["pom.xml", "build.gradle.kts", "build.sbt", ".java-version", "deps.edn", "project.clj", "build.boot"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |
| `symbol` | `"☕ "` | A format string representing the symbol of Java |
| `style` | `"red dimmed"` | 這個模組的風格。 |
| `disabled` | `false` | 停用 `java` 模組。 |
### Variables
@ -2258,6 +2271,45 @@ symbol = " "
style = "bold dimmed green"
```
## Meson
The `meson` module shows the current Meson developer environment status.
By default the Meson project name is displayed, if `$MESON_DEVENV` is set.
### 選項
| Option | 預設 | 說明 |
| ------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------- |
| `truncation_length` | `2^32 - 1` | Truncates a project name to `N` graphemes. |
| `truncation_symbol` | `"…"` | The symbol used to indicate a project name was truncated. You can use `""` for no symbol. |
| `format` | `"via [$symbol$project]($style) "` | The format for the module. |
| `symbol` | `"⬢ "` | The symbol used before displaying the project name. |
| `style` | `"blue bold"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `meson` module. |
### Variables
| 變數 | 範例 | 說明 |
| --------- | ---------- | ------------------------------------ |
| project | `starship` | The current Meson project name |
| symbol | `🐏` | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string
### 範例
```toml
# ~/.config/starship.toml
[meson]
disabled = false
truncation_symbol = "--"
symbol = " "
style = "bold dimmed green"
```
## Mercurial Branch
The `hg_branch` module shows the active branch of the repo in your current directory.
@ -2471,12 +2523,12 @@ The `openstack` module shows the current OpenStack cloud and project. The module
### 選項
| Option | 預設 | 說明 |
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `openstack` module. |
| Option | 預設 | 說明 |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `format` | `'on [$symbol$cloud(\($project\))]($style) '` | The format for the module. |
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
| `style` | `"bold yellow"` | 這個模組的風格。 |
| `disabled` | `false` | Disables the `openstack` module. |
### Variables
@ -2495,7 +2547,7 @@ The `openstack` module shows the current OpenStack cloud and project. The module
# ~/.config/starship.toml
[openstack]
format = "on [$symbol$cloud(\\($project\\))]($style) "
format = 'on [$symbol$cloud(\($project\))]($style) '
style = "bold yellow"
symbol = "☁️ "
```
@ -3077,16 +3129,16 @@ The `shell` module shows an indicator for currently used shell.
| Option | 預設 | 說明 |
| ---------------------- | ------------------------- | ------------------------------------------------------------ |
| `bash_indicator` | `bsh` | A format string used to represent bash. |
| `fish_indicator` | `fsh` | A format string used to represent fish. |
| `zsh_indicator` | `zsh` | A format string used to represent zsh. |
| `powershell_indicator` | `psh` | A format string used to represent powershell. |
| `ion_indicator` | `ion` | A format string used to represent ion. |
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
| `xonsh_indicator` | `xsh` | A format string used to represent xonsh. |
| `cmd_indicator` | `cmd` | A format string used to represent cmd. |
| `nu_indicator` | `nu` | A format string used to represent nu. |
| `bash_indicator` | `"bsh"` | A format string used to represent bash. |
| `fish_indicator` | `"fsh"` | A format string used to represent fish. |
| `zsh_indicator` | `"zsh"` | A format string used to represent zsh. |
| `powershell_indicator` | `"psh"` | A format string used to represent powershell. |
| `ion_indicator` | `"ion"` | A format string used to represent ion. |
| `elvish_indicator` | `"esh"` | A format string used to represent elvish. |
| `tcsh_indicator` | `"tsh"` | A format string used to represent tcsh. |
| `xonsh_indicator` | `"xsh"` | A format string used to represent xonsh. |
| `cmd_indicator` | `"cmd"` | A format string used to represent cmd. |
| `nu_indicator` | `"nu"` | A format string used to represent nu. |
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
| `format` | `"[$indicator]($style) "` | The format for the module. |
| `style` | `"white bold"` | 這個模組的風格。 |
@ -3227,23 +3279,23 @@ The `status` module displays the exit code of the previous command. If $success_
### 選項
| Option | 預設 | 說明 |
| --------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | 這個模組的風格。 |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments |
| `pipestatus_format` | `\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
| Option | 預設 | 說明 |
| --------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `format` | `"[$symbol$status]($style) "` | The format of the module |
| `symbol` | `"✖"` | The symbol displayed on program error |
| `success_symbol` | `""` | The symbol displayed on program success |
| `not_executable_symbol` | `"🚫"` | The symbol displayed when file isn't executable |
| `not_found_symbol` | `"🔍"` | The symbol displayed when the command can't be found |
| `sigint_symbol` | `"🧱"` | The symbol displayed on SIGINT (Ctrl + c) |
| `signal_symbol` | `"⚡"` | The symbol displayed on any signal |
| `style` | `"bold red"` | 這個模組的風格。 |
| `recognize_signal_code` | `true` | Enable signal mapping from exit code |
| `map_symbol` | `false` | Enable symbols mapping from exit code |
| `pipestatus` | `false` | Enable pipestatus reporting |
| `pipestatus_separator` | <code>&vert;</code> | The symbol used to separate pipestatus segments (supports formatting) |
| `pipestatus_format` | `'\[$pipestatus\] => [$symbol$common_meaning$signal_name$maybe_int]($style)'` | The format of the module when the command is a pipeline |
| `pipestatus_segment_format` | | When specified, replaces `format` when formatting pipestatus segments |
| `disabled` | `true` | Disables the `status` module. |
### Variables
@ -3288,13 +3340,13 @@ The `sudo` module displays if sudo credentials are currently cached. The module
### 選項
| Option | 預設 | 說明 |
| --------------- | ----------------------- | ------------------------------------------------------- |
| `format` | `[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
| Option | 預設 | 說明 |
| --------------- | ------------------------ | ------------------------------------------------------- |
| `format` | `"[as $symbol]($style)"` | The format of the module |
| `symbol` | `"🧙 "` | The symbol displayed when credentials are cached |
| `style` | `"bold blue"` | 這個模組的風格。 |
| `allow_windows` | `false` | Since windows has no default sudo, default is disabled. |
| `disabled` | `true` | Disables the `sudo` module. |
### Variables
@ -3762,7 +3814,7 @@ Automatic detection of shells and proper parameters addition are currently imple
[custom.foo]
command = "echo foo" # shows output of command
detect_files = ["foo"] # can specify filters but wildcards are not supported
when = """ test "$HOME" == "$PWD" """
when = """ test "$HOME" = "$PWD" """
format = " transcending [$output]($style)"
[custom.time]

View File

@ -220,7 +220,6 @@ Alternatively, install Starship using any of the following package managers:
| Arch Linux | [Arch Linux Community](https://archlinux.org/packages/community/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` |
| Fedora 31+ | [Fedora Packages](https://src.fedoraproject.org/rpms/rust-starship) | `dnf install starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixos.starship` |
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
| Manjaro | | `pacman -S starship` |
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |