mirror of
https://github.com/starship/starship.git
synced 2024-11-26 10:14:57 +01:00
docs(i18n): New Crowdin updates (#2733)
* New translations README.md (Arabic) * New translations README.md (Chinese Traditional) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Russian) * New translations README.md (Turkish) * New translations README.md (Chinese Simplified) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Spanish) * New translations README.md (French) * New translations README.md (Portuguese) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Russian) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Turkish) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (Polish) * New translations README.md (Arabic) * New translations README.md (German) * New translations README.md (Italian) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Dutch) * New translations README.md (Portuguese) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Russian) * New translations README.md (Turkish) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Traditional) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * Update source file README.md * Update source file README.md * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Turkish) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Russian) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Traditional) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Japanese) * New translations README.md (Korean) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (French) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Russian) * New translations README.md (Russian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (French) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Polish) * New translations README.md (Spanish) * New translations README.md (Dutch) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Russian) * New translations README.md (Japanese) * New translations README.md (Dutch) * New translations README.md (Polish) * New translations README.md (Portuguese) * New translations README.md (Turkish) * New translations README.md (Chinese Simplified) * New translations README.md (Chinese Traditional) * New translations README.md (Vietnamese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Korean) * New translations README.md (French) * New translations README.md (Spanish) * New translations README.md (Arabic) * New translations README.md (Sorani (Kurdish)) * New translations README.md (French) * New translations README.md (French) * New translations README.md (Korean) * New translations README.md (Portuguese) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Polish) * New translations README.md (French) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Japanese) * New translations README.md (Japanese) * New translations README.md (French) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (Italian) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Korean) * New translations README.md (Russian) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Portuguese) * New translations README.md (French) * New translations README.md (Polish) * New translations README.md (Dutch) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (Spanish) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Spanish) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Sorani (Kurdish)) * New translations README.md (Spanish) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Polish) * New translations README.md (Vietnamese) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Simplified) * New translations README.md (Turkish) * New translations README.md (Russian) * New translations README.md (Portuguese) * New translations README.md (Dutch) * New translations README.md (Spanish) * New translations README.md (Korean) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Arabic) * New translations README.md (French) * New translations README.md (Sorani (Kurdish)) * New translations README.md (French) * New translations README.md (Chinese Traditional) * New translations README.md (Chinese Traditional) * New translations README.md (Portuguese, Brazilian) * New translations README.md (Vietnamese) * New translations README.md (Chinese Simplified) * New translations README.md (Russian) * New translations README.md (Japanese) * New translations README.md (Italian) * New translations README.md (German) * New translations README.md (Spanish)
This commit is contained in:
parent
2f696d5590
commit
45a45baffa
@ -389,7 +389,17 @@ The character will tell you whether the last command was successful or not. It c
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
::: warning
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -780,7 +790,6 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -799,7 +808,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. |
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | The style for the module. |
|
||||
@ -2165,6 +2174,59 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### 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 R. |
|
||||
| `style` | `"blue bold"` | The style for the module. |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | ------------- | ------------------------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style | `"blue bold"` | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -163,6 +163,13 @@
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### Install via Package Manager
|
||||
|
||||
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -1,4 +1,4 @@
|
||||
# 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.
|
||||
|
||||
|
@ -389,7 +389,17 @@ The character will tell you whether the last command was successful or not. It c
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
::: warning
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -780,7 +790,6 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -799,7 +808,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. |
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | The style for the module. |
|
||||
@ -2165,6 +2174,59 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### 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 R. |
|
||||
| `style` | `"blue bold"` | The style for the module. |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | ------------- | ------------------------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style | `"blue bold"` | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -159,6 +159,13 @@
|
||||
بۆ نوێکردنەوەی Starship خۆی، نووسینەکەی سەرەوە ڕەن بکەوە. وەشانی ئێستا دەگۆڕێت بێ ئەوەی دەسکاری ڕێکخستنەکانی Starship بکات.
|
||||
|
||||
|
||||
**تێبینی** - بنەڕەتییەکانی سکریپتی دامەزراندن ئەتوانرێ بگۆڕدرێ سەیری یارمەتی نێوخۆیی بکە.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### دابمەزرێنە لەڕێگەی بەڕێوبەری گورزەوە
|
||||
|
||||
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -256,7 +256,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | Stil für dieses Modul. |
|
||||
| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| `disabled` | `false` | Deaktiviert das `aws`-Modul. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -389,7 +389,17 @@ Das Zeichen zeigt an ob der letzte Befehl erfolgreich war, oder einen Fehler erz
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
::: Warnung
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: Warnung
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### Optionen
|
||||
|
||||
@ -470,7 +480,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
|
||||
|
||||
## Befehlsdauer
|
||||
|
||||
Das `cmd_duration` Modul zeigt an wie lange der letzte Befehl ausgeführt wurde. Das Modul wird nur angezeigt wenn der letzte Befehl länger als zwei Sekunden ausgeführt wurde. Mit der `min_time` Option kann die Zeit eingestellt werden ab der `cmd_duration` angezeigt wird.
|
||||
Das `cmd_duration` Modul zeigt an wie lange der letzte Befehl ausgeführt wurde. Das Modul wird nur angezeigt wenn der letzte Befehl länger als zwei Sekunden ausgeführt wurde. Mit der `min_time` Option kann die Zeit eingestellt werden ab der <0>cmd_duration</0> angezeigt wird.
|
||||
|
||||
::: warning Nicht die DEBUG-trap in der Bash hooken
|
||||
|
||||
@ -780,7 +790,6 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -799,7 +808,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | Symbol das vor der dotnet-Version angezeigt wird. |
|
||||
| `heuristic` | `true` | Schnelle Versionserkennung nutzen um Starship bedienbar zu halten. |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | Stil für dieses Modul. |
|
||||
@ -2165,9 +2174,62 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### Optionen
|
||||
|
||||
| Option | Standardwert | Beschreibung |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"📐"` | A format string representing the symbol of R. |
|
||||
| `style` | `"blue bold"` | Stil für dieses Modul. |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Beispiel | Beschreibung |
|
||||
| -------- | ------------- | ------------------------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style | `"blue bold"` | Mirrors the value of option `style` |
|
||||
|
||||
### Beispiel
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
@ -2205,7 +2267,7 @@ symbol = "🔴 "
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `Gemfile`-Datei
|
||||
- The current directory contains a `.ruby-version` file
|
||||
@ -2245,7 +2307,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
|
||||
- Das aktuelle Verzeichnis enthält eine `Cargo.toml`-Datei
|
||||
- Das aktuelle Verzeichnis enthält eine Datei mit der `.rs`-Erweiterung
|
||||
@ -2492,7 +2554,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@ -2600,23 +2662,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 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 < x < 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 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 < x < 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"`. Andernfalls ist es standardmäßig `"%T"`. Manually setting `time_format` will override the `use_12hr` setting.
|
||||
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.
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Beispiel | Beschreibung |
|
||||
| --------- | ---------- | ----------------------------------- |
|
||||
| zeit | `13:08:10` | The current time. |
|
||||
| uhrzeit | `13:08:10` | The current time. |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
@ -2634,14 +2696,14 @@ utc_time_offset = "-5"
|
||||
time_range = "10:00:00-14:00:00"
|
||||
```
|
||||
|
||||
## Username
|
||||
## Benutzername
|
||||
|
||||
Das `username` Modul zeigt den Namen des aktiven Benutzers. Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
Das Modul `username` zeigt den Benutzernamen des aktiven Benutzers. Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
|
||||
- Der aktuelle Benutzer ist root
|
||||
- Der aktuelle Benutzer ist nicht der eingeloggte Benutzer
|
||||
- Der Benutzer ist aktuell via SSH verbunden
|
||||
- Die Variable `show_always` ist auf true gesetzt
|
||||
- Der aktuelle Benutzer ist nicht derjenige, der derzeit angemeldet ist
|
||||
- Der Benutzer ist über eine SSH-Sitzung verbunden
|
||||
- Die Variale `show_always` ist auf `true` gesetzt
|
||||
|
||||
::: Tipp
|
||||
|
||||
@ -2651,13 +2713,13 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
|
||||
|
||||
### Optionen
|
||||
|
||||
| Option | Standardwert | Beschreibung |
|
||||
| ------------- | ----------------------- | ---------------------------------------------- |
|
||||
| `style_root` | `"bold red"` | Stil wenn der Benutzer unter root läuft. |
|
||||
| `style_user` | `"bold yellow"` | Stil wenn der Benutzer nicht unter root läuft. |
|
||||
| `format` | `"[$user]($style) in "` | The format for the module. |
|
||||
| `show_always` | `false` | Immer das `username` Modul anzeigen. |
|
||||
| `disabled` | `false` | Deavktiviert das `username` Modul. |
|
||||
| Option | Standardwert | Beschreibung |
|
||||
| ------------- | ----------------------- | --------------------------------- |
|
||||
| `style_root` | `"bold red"` | Stil beim root-Benutzer. |
|
||||
| `style_user` | `"bold yellow"` | Stil bei allen anderen Benutzern. |
|
||||
| `format` | `"[$user]($style) in "` | The format for the module. |
|
||||
| `show_always` | `false` | `username`-Modul immer anzeigen. |
|
||||
| `disabled` | `false` | Deaktiviert das `username`-Modul. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2785,7 +2847,7 @@ format = "[🆅 $repo](bold blue) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). Das Modul wird gezeigt, wenn mindestens einer der folgenden Punkte erfüllt ist:
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). Das Modul wird nur dann angezeigt, wenn eine der folgenden Bedingungen zutrifft:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: Tipp
|
||||
|
||||
@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### Optionen
|
||||
|
||||
| Option | Standardwert | Beschreibung |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | Stil für dieses Modul. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Option | Standardwert | Beschreibung |
|
||||
| -------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `beschreibung` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | Stil für dieses Modul. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -163,6 +163,13 @@
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### Installation mithilfe eines Paket-Managers
|
||||
|
||||
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Konfiguration
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Konfiguration
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -49,9 +49,9 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
|
||||
|
||||
### Terminología
|
||||
|
||||
**Módulo**: un componente en el promt que provee información basada en información contextual de tu sistema operativo. For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project.
|
||||
**Módulo**: un componente en el promt que provee información basada en información contextual de tu sistema operativo. Por ejemplo, el módulo "nodejs" muestra la versión de NodeJS que tienes actualmente instalada en tu ordenador, si el directorio actual es un proyecto NodeJS.
|
||||
|
||||
**Variable**: subcomponentes más pequeños que contienen información proporcionada por el módulo. For example, the "version" variable in the "nodejs" module contains the current version of Node.js.
|
||||
**Variable**: subcomponentes más pequeños que contienen información proporcionada por el módulo. Por ejemplo, la variable "version" en el módulo "nodejs" contiene la versión actual de NodeJS.
|
||||
|
||||
Por convención, la mayoría de los módulos tienen un prefijo del color por defecto de la terminal (por ejemplo, `vía` en "nodejs") y un espacio vacío como sufijo.
|
||||
|
||||
@ -146,7 +146,7 @@ Esta es la lista de opciones de configuración del prompt.
|
||||
| ----------------- | ---------------------------------- | ------------------------------------------------------------------------------ |
|
||||
| `format` | [ver aquí](#default-prompt-format) | Configura el formato del prompt. |
|
||||
| `scan_timeout` | `30` | Tiempo de espera tras el que Starship escanea los archivos (en milisegundos). |
|
||||
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
|
||||
| `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. |
|
||||
|
||||
### Ejemplo
|
||||
@ -174,7 +174,7 @@ La varieble `format` por defecto se utiliza para definir el formato del prompt,
|
||||
```toml
|
||||
format = "$all"
|
||||
|
||||
# Which is equivalent to
|
||||
# El cual es equivalente a
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
@ -239,34 +239,34 @@ $character"""
|
||||
|
||||
## AWS
|
||||
|
||||
El módulo `aws` muestra la región y el perfil actual de AWS. Éste se basa en las variables de entorno `AWS_REGION`, `AWS_DEFAULT_REGION`, y `AWS_PROFILE` del fichero `~/.aws/config`. This module also shows an expiration timer when using temporary credentials.
|
||||
El módulo `aws` muestra la región y el perfil actual de AWS. Éste se basa en las variables de entorno `AWS_REGION`, `AWS_DEFAULT_REGION`, y `AWS_PROFILE` del fichero `~/.aws/config`. Este módulo también muestra un temporizador de caducidad al usar credenciales temporales.
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var and the credentials expiration date is read from the `AWS_SESSION_EXPIRATION` env var.
|
||||
Cuando se utiliza [aws-vault](https://github.com/99designs/aws-vault), el perfil se lee de la variable de entorno `AWS_VAULT` y la fecha de expiración de credenciales se lee de la variable de entorno `AWS_SESSION_EXPIRATION`.
|
||||
|
||||
Cuando uses [awsu](https://github.com/kreuzwerker/awsu) el perfil se obtiene de la variable de entorno `AWSU_PROFILE`.
|
||||
|
||||
When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFILE` env var and the credentials expiration date is read from the `AWSUME_EXPIRATION` env var.
|
||||
Cuando se utiliza [AWSume](https://awsu.me), el perfil se lee de la variable de entorno `AWSUME_PROFILE` y la fecha de expiración de credenciales se lee de la variable de entorno `AWSUME_EXPIRATION`.
|
||||
|
||||
### Opciones
|
||||
|
||||
| Opción | Por defecto | Descripción |
|
||||
| ------------------- | -------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\])]($style)'` | El formato del módulo. |
|
||||
| `symbol` | `"☁️ "` | El símbolo que se muestra antes del perfil de AWS. |
|
||||
| `region_aliases` | | Tabla de alias de región para mostrar además del nombre AWS. |
|
||||
| `style` | `"bold yellow"` | El estilo del módulo. |
|
||||
| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| Opción | Por defecto | Descripción |
|
||||
| ------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\])]($style)'` | El formato del módulo. |
|
||||
| `symbol` | `"☁️ "` | El símbolo que se muestra antes del perfil de AWS. |
|
||||
| `region_aliases` | | Tabla de alias de región para mostrar además del nombre AWS. |
|
||||
| `style` | `"bold yellow"` | El estilo del módulo. |
|
||||
| `expiration_symbol` | `X` | El símbolo mostrado cuando las credenciales temporales han caducado. |
|
||||
| `disabled` | `false` | Desactiva el módulo AWS. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Ejemplo | Descripción |
|
||||
| --------- | ---------------- | ------------------------------------------- |
|
||||
| region | `ap-northeast-1` | La región actual de AWS |
|
||||
| profile | `astronauts` | El perfil actual de AWS |
|
||||
| duration | `2h27m20s` | The temporary credentials validity duration |
|
||||
| symbol | | Refleja el valor de la opción `symbol` |
|
||||
| style\* | | Refleja el valor de la opción `style` |
|
||||
| Variable | Ejemplo | Descripción |
|
||||
| --------- | ---------------- | -------------------------------------------------------- |
|
||||
| region | `ap-northeast-1` | La región actual de AWS |
|
||||
| profile | `astronauts` | El perfil actual de AWS |
|
||||
| duration | `2h27m20s` | La duración de la validez de las credenciales temporales |
|
||||
| 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
|
||||
|
||||
@ -341,7 +341,7 @@ discharging_symbol = "💀 "
|
||||
|
||||
### Indicador de batería
|
||||
|
||||
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). Si no se provee ningún valor para `display` El valor por defecto es el siguiente:
|
||||
La opción de configuración `display` se utiliza para definir cuándo debe mostrarse el indicador de batería (threshold), qué symbol se utilizaría (symbol), y cómo sería (style). Si no se provee ningún valor para `display` El valor por defecto es el siguiente:
|
||||
|
||||
```toml
|
||||
[[battery.display]]
|
||||
@ -349,32 +349,31 @@ threshold = 10
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
The default value for the `charging_symbol` and `discharging_symbol` option is respectively the value of `battery`'s `charging_symbol` and `discharging_symbol` option.
|
||||
El valor por defecto para las opciones `charging_symbol` y `discharging_symbol` son respectivamente los valores `charging_symbol` y `discharging_symbol` de las opción de `battery`.
|
||||
|
||||
#### Opciones
|
||||
|
||||
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` | `-` | 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. |
|
||||
| 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. |
|
||||
|
||||
#### Ejemplo
|
||||
|
||||
```toml
|
||||
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
|
||||
[[battery.display]] # estilo "bold red" y discharning_symbol cuando la capacidad está entre 0% y 10%
|
||||
threshold = 10
|
||||
style = "bold red"
|
||||
|
||||
[[battery.display]] # "bold yellow" style and 💦 symbol when capacity is between 10% and 30%
|
||||
[[battery.display]] # estilo "bold yellow" y el símbolo 💦 cuando la capacidad está entre 10% y 30%
|
||||
threshold = 30
|
||||
style = "bold yellow"
|
||||
discharging_symbol = 💦
|
||||
|
||||
# when capacity is over 30%, the battery indicator will not be displayed
|
||||
# cuando la capadidad está por encima del 30% el indicador no se mostrará
|
||||
|
||||
```
|
||||
|
||||
@ -387,9 +386,19 @@ El carácter te dirá si el último comando funcionó o no. Se puede hacer de do
|
||||
- Cambiando el color (`red`/`green`)
|
||||
- Cambiando la forma (`.`/`✖`)
|
||||
|
||||
Por defecto sólo cambia el color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
Por defecto sólo cambia el color. Si también se quiere cambiar su forma, ver [este ejemplo](#with-custom-error-shape).
|
||||
|
||||
::: advertencia `error_symbol` no es compatible con el intérprete de comandos Elvish. :::
|
||||
::: aviso
|
||||
|
||||
`error_symbol` no es compatible con el intérprete de comandos Elvish.
|
||||
|
||||
:::
|
||||
|
||||
::: aviso
|
||||
|
||||
`vicmd_symbol` sólo es compatible con fish y zsh.
|
||||
|
||||
:::
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -440,7 +449,7 @@ vicmd_symbol = "[V](bold green) "
|
||||
|
||||
## CMake
|
||||
|
||||
The `cmake` module shows the currently installed version of [CMake](https://cmake.org/). Por defecto el módulo se activará si se cumplen cualquiera de las siguientes condiciones:
|
||||
El módulo `cmake` muestra la versión actualmente instalada de [CMake](https://cmake.org/). Por defecto el módulo se activará si se cumplen cualquiera de las siguientes condiciones:
|
||||
|
||||
- El directorio actual contiene un archivo `CMakeLists.txt`
|
||||
- El directorio actual contiene un archivo `CMakeCache.txt`
|
||||
@ -470,7 +479,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
|
||||
|
||||
## Tiempo de Ejecución
|
||||
|
||||
El módulo `cmd_duration` muestra cuánto tiempo tardó el último comando en ejecutarse. El módulo se mostrará solo si el comando llevó dos segundos o más, o el valor de `min_time` si existe.
|
||||
El módulo `cmd_duration` muestra cuánto tiempo tardó el último comando en ejecutarse. El módulo se mostrará solo si el comando llevó dos segundos o más, o el valor de `min_time`, si existe.
|
||||
|
||||
::: warning No utilizar DEBUG en Bash
|
||||
|
||||
@ -478,7 +487,7 @@ Si estás usando Starship con `bash`, no uses `DEBUG` después de ejecutar `eval
|
||||
|
||||
:::
|
||||
|
||||
Los usuarios de bash que necesiten la funcionalidad como preexec pueden usar el [framework bash_preexec de rcaloras](https://github.com/rcaloras/bash-preexec). Basta con definir los arrays `preexec_functions` y `precmd_functions` antes de ejecutar `eval $(starship init $0)`, y luego proceder como siempre.
|
||||
Los usuarios de bash que necesiten la funcionalidad preexec-like pueden usar el framework rcaloras's bash_preexec. Simplemente define los arrays preexec_functions y precmd_functions antes de ejecutar eval $(starship init $0), y continúa con normalidad. Basta con definir los arrays `preexec_functions` y `precmd_functions` antes de ejecutar `eval $(starship init $0)`, y luego proceder como siempre.
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -519,7 +528,7 @@ format = "underwent [$duration](bold yellow)"
|
||||
|
||||
## Conda
|
||||
|
||||
El módulo `conda` muestra el entorno conda actual, si `$CONDA_DEFAULT_ENV` está configurado.
|
||||
El módulo `conda` muestra el actual entorno conda, si la variable `$CONDA_DEFAULT_ENV` existe.
|
||||
|
||||
::: consejo
|
||||
|
||||
@ -598,7 +607,7 @@ format = "via [✨ $version](bold blue) "
|
||||
|
||||
## Dart
|
||||
|
||||
The `dart` module shows the currently installed version of [Dart](https://dart.dev/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones:
|
||||
El módulo `dart` muestra la versión instalada de [Dart](https://dart.dev/). Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes condiciones:
|
||||
|
||||
- El directorio actual contiene un archivo con la extensión `.dart`
|
||||
- El directorio actual contiene un directorio `.dart_tool`
|
||||
@ -673,11 +682,11 @@ format = "via [🦕 $version](green bold) "
|
||||
|
||||
## Directory
|
||||
|
||||
El módulo `directory` muestra la ruta hasta el directorio actual, mostrando tres directorios padre como máximo. Tu directorio se truncará a la raíz del repositorio git en el que te encuentres.
|
||||
El módulo `directory` muestra la ruta hasta el directorio actual, mostrando tres directorios padre como máximo. Tu directorio se truncará a la raíz del repositorio git en el que estés.
|
||||
|
||||
Cuando usas el estilo fish de la opción pwd, en lugar de ocultar la ruta truncada, verás una versión acortada del nombre de cada directorio basada en el número que activaste para la opción.
|
||||
Cuando usas el estilo fish de la opción pwd, en lugar de ocultar la ruta truncada, verás una versión acortada del nombre de cada directorio basada en el número que activa la opción.
|
||||
|
||||
Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repositorio y el valor de la opción es `1`. Ahora verás `~/D/N/nixpkgs/pkgs`, mientras que antes habría sido `nixpkgs/pkgs`.
|
||||
Por ejemplo, dado `~/Dev/Nix/nixpkgs/pkgs` donde `nixpkgs` es la raíz del repositorio y el valor de la opción es `1`. En ese caso, verás `~/D/N/nixpkgs/pkgs`, cuando antes hubiera sido `nixpkgs/pkgs`.
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -735,7 +744,7 @@ truncation_symbol = "…/"
|
||||
|
||||
## Docker Context
|
||||
|
||||
El módulo `docker_context` muestra el [contexto de Docker](https://docs.docker.com/engine/context/working-with-contexts/) actualmente activo si no está establecido en `por defecto`.
|
||||
El módulo `docker_context` muestra el [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) activo si no está a `default`.
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -771,7 +780,7 @@ format = "via [🐋 $context](blue bold)"
|
||||
|
||||
## Dotnet
|
||||
|
||||
The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. Si el SDK ha sido anclado en el directorio actual, se mostrará la versión fijada. De lo contrario, el módulo muestra la última versión instalada del SDK.
|
||||
El módulo `dotnet` muestra la versión usada de .NET Core SDK para el directorio actual. Si el SDK ha sido anclado en el directorio actual, se mostrará la versión fijada. De lo contrario, el módulo muestra la última versión instalada del SDK.
|
||||
|
||||
Por defecto, este módulo solo se mostrará en tu prompt cuando uno o más de de los siguientes archivos estén presentes en el directorio actual:
|
||||
|
||||
@ -780,14 +789,13 @@ Por defecto, este módulo solo se mostrará en tu prompt cuando uno o más de de
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
|
||||
También necesitarás tener instalado el SDK de .NET Core para poder usarlo correctamente.
|
||||
También necesitará tener instalado .NET Core SDK para poder usarlo correctamente.
|
||||
|
||||
Internamente, este módulo utiliza su propio mecanismo para la detección de versiones. Normalmente es el doble de rápido que ejecutar `dotnet --version`, pero puede mostrar una versión incorrecta si tu proyecto .NET tiene un diseño de directorio inusual. Si la precisión es más importante que la velocidad, puedes desactivar el mecanismo estableciendo `heuristic = false` en las opciones del módulo.
|
||||
Internamente, este módulo utiliza su propio mecanismo para la detección de versiones. Normalmente es el doble de rápido que ejecutar `dotnet --version`, pero puede mostrar una versión incorrecta si tu proyecto .NET tiene un diseño de directorio inusual. Si la precisión es más importante que la velocidad, puede desactivar el mecanismo estableciendo `heuristic = false` en las opciones del módulo.
|
||||
|
||||
El módulo también mostrará el Target Framework Moniker ([https://docs.microsoft. om/es/dotnet/standard/frameworks#supported-target-framework-versions](https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-framework-versions)) cuando exista un archivo csproj en el directorio actual.
|
||||
|
||||
@ -799,7 +807,7 @@ El módulo también mostrará el Target Framework Moniker ([https://docs.microso
|
||||
| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | Símbolo usado antes de mostrar la versión de .NET |
|
||||
| `heuristic` | `true` | Usa una detección de versiones más rápida para mantener a starship veloz. |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Qué extensiones deberían activar este módulo. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Qué extensiones deberían activar este módulo. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | 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. |
|
||||
@ -1635,7 +1643,7 @@ format = "via [🌕 $version](bold blue) "
|
||||
|
||||
El módulo `memory_usage` muestra la memoria del sistema actual y el uso de memoria de intercambio.
|
||||
|
||||
Por defecto, el uso de memoria de intercambio se muestra si no es cero.
|
||||
Por defecto, el uso de swap se muestra si el intercambio total del sistema no es cero.
|
||||
|
||||
::: consejo
|
||||
|
||||
@ -2165,6 +2173,59 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### Opciones
|
||||
|
||||
| Opción | Por defecto | Descripción |
|
||||
| ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. |
|
||||
| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"📐"` | A format string representing the symbol of R. |
|
||||
| `style` | `"blue bold"` | El estilo del módulo. |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Qué extensiones deben activar este módulo |
|
||||
| `detect_files` | `[".Rprofile"]` | Qué nombres de archivo deben activar este módulo |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Qué carpetas deben activar este módulo |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Ejemplo | Descripción |
|
||||
| -------- | ------------- | -------------------------------------- |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Refleja el valor de la opción `symbol` |
|
||||
| style | `"blue bold"` | Refleja el valor de la opción `style` |
|
||||
|
||||
### Ejemplo
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen:
|
||||
@ -2378,7 +2439,7 @@ El módulo `shlvl` muestra la variable de entorno actual `SHLVL` ("nivel de shel
|
||||
| `symbol` | `"↕️ "` | El símbolo utilizado para representar el `SHLVL`. |
|
||||
| `repeat` | `false` | Hace que el `symbol` se repita con la cantidad actual de `SHLVL`. |
|
||||
| `style` | `"bold yellow"` | El estilo del módulo. |
|
||||
| `disabled` | `true` | Deshabilita el módulo `shlvl`. |
|
||||
| `disabled` | `true` | Desactiva el módulo `shlvl`. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2508,7 +2569,7 @@ By default the `swift` module shows the currently installed version of [Swift](h
|
||||
| `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` | Deshabilita el módulo `swift`. |
|
||||
| `disabled` | `false` | Desactiva el módulo `swift`. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2555,7 +2616,7 @@ Por defecto, el módulo se mostrará si se cumplen cualquiera de las siguientes
|
||||
| `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` | Deshabilita el módulo `de terraforma`. |
|
||||
| `disabled` | `false` | Desactiva el módulo `terraform`. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2603,12 +2664,12 @@ Este módulo está deshabilitado por defecto. Para activarlo, establece `disable
|
||||
| Opción | Por defecto | Descripción |
|
||||
| ----------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"at [$time]($style) "` | La cadena de formato para el módulo. |
|
||||
| `use_12hr` | `false` | Activa el formato de 12 horas |
|
||||
| `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 |
|
||||
| `utc_time_offset` | `"local"` | Establece el desplazamiento UTC a utilizar. Rango de -24 < x < 24. Permite a los flotantes acomodar los desplazamientos de zona horaria de 30/45 minutos. |
|
||||
| `disabled` | `true` | Desactiva 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 |
|
||||
| `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 |
|
||||
|
||||
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`.
|
||||
|
||||
@ -2657,7 +2718,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` | Deshabilita el módulo `username`. |
|
||||
| `disabled` | `false` | Desactiva el módulo `username`. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -2753,24 +2814,24 @@ format = "via [V $version](blue bold) "
|
||||
|
||||
## VCSH
|
||||
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use.
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. El módulo sólo se mostrará si un repositorio está actualmente en uso.
|
||||
|
||||
### Opciones
|
||||
|
||||
| Opción | Por defecto | Descripción |
|
||||
| ---------- | -------------------------------- | ------------------------------------------------------ |
|
||||
| `symbol` | | The symbol used before displaying the repository name. |
|
||||
| `style` | `"bold yellow"` | El estilo del módulo. |
|
||||
| `format` | `"vcsh [$symbol$repo]($style) "` | El formato del módulo. |
|
||||
| `disabled` | `false` | Disables the `vcsh` module. |
|
||||
| Opción | Por defecto | Descripción |
|
||||
| ---------- | -------------------------------- | ------------------------------------------------------------ |
|
||||
| `symbol` | | El símbolo usado antes de mostrar el nombre del repositorio. |
|
||||
| `style` | `"bold yellow"` | El estilo del módulo. |
|
||||
| `format` | `"vcsh [$symbol$repo]($style) "` | El formato del módulo. |
|
||||
| `disabled` | `false` | Deshabilita el módulo `vcsh`. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Ejemplo | Descripción |
|
||||
| --------- | ------------------------------------------- | -------------------------------------- |
|
||||
| repo | `dotfiles` if in a VCSH repo named dotfiles | The active repository name |
|
||||
| symbol | | Refleja el valor de la opción `symbol` |
|
||||
| style\* | `black bold dimmed` | Refleja el valor de la opción `style` |
|
||||
| Variable | Ejemplo | Descripción |
|
||||
| ----------- | ----------------------------------------------------------- | -------------------------------------- |
|
||||
| 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` |
|
||||
|
||||
\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
|
||||
|
||||
@ -2787,7 +2848,7 @@ format = "[🆅 $repo](bold blue) "
|
||||
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). El módulo se muestra si algunas de las siguientes condiciones se cumplen:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
- El directorio actual contiene un archivo `.zig`
|
||||
|
||||
### Opciones
|
||||
|
||||
@ -2795,9 +2856,9 @@ By default the the `zig` module shows the currently installed version of [Zig](h
|
||||
| ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | El formato del módulo. |
|
||||
| `version_format` | `"v${raw}"` | El formato de versión. Las variables disponibles son `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
|
||||
| `symbol` | `"↯ "` | El símbolo usado antes de mostrar la versión de Zig. |
|
||||
| `style` | `"bold yellow"` | El estilo del módulo. |
|
||||
| `disabled` | `false` | Disables the `zig` module. |
|
||||
| `disabled` | `false` | Desactiva 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. |
|
||||
@ -2806,7 +2867,7 @@ By default the the `zig` module shows the currently installed version of [Zig](h
|
||||
|
||||
| Variable | Ejemplo | Descripción |
|
||||
| --------- | -------- | -------------------------------------- |
|
||||
| version | `v0.6.0` | The version of `zig` |
|
||||
| version | `v0.6.0` | La versión de `zig` |
|
||||
| symbol | | Refleja el valor de la opción `symbol` |
|
||||
| style\* | | Refleja el valor de la opción `style` |
|
||||
|
||||
@ -2821,87 +2882,89 @@ By default the the `zig` module shows the currently installed version of [Zig](h
|
||||
symbol = "⚡️ "
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
## Comandos personalizados
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
Los módulos `personalizados` muestran la salida de algunos comandos arbitrarios.
|
||||
|
||||
These modules will be shown if any of the following conditions are met:
|
||||
Estos módulos se mostrarán si se cumplen alguna de las siguientes condiciones:
|
||||
|
||||
- The current directory contains a file whose name is in `files`
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- El directorio actual contiene un archivo cuyo nombre está en `files`
|
||||
- El directorio actual contiene un directorio cuyo nombre está en `directories`
|
||||
- El directorio actual contiene un archivo cuya extensión está en `extensions`
|
||||
- El comando `when` devuelve 0
|
||||
- El sistema operativo actual (std::env::consts::OS) coincide con el campo `os` si está definido.
|
||||
|
||||
::: consejo
|
||||
|
||||
Multiple custom modules can be defined by using a `.`.
|
||||
Múltiples módulos personalizados pueden definirse usando una `.`.
|
||||
|
||||
:::
|
||||
|
||||
::: consejo
|
||||
|
||||
The order in which custom modules are shown can be individually set by including `${custom.foo}` in the top level `format` (as it includes a dot, you need to use `${...}`). By default, the `custom` module will simply show all custom modules in the order they were defined.
|
||||
El orden en el que se muestran los módulos personalizados se puede establecer individualmente incluyendo `${custom.foo}` en el `format` de nivel superior (ya que incluye un punto, necesita usar `${...}`). Por defecto, el módulo `custom` simplemente mostrará todos los módulos personalizados en el orden en que fueron definidos.
|
||||
|
||||
:::
|
||||
|
||||
::: consejo
|
||||
|
||||
[Issue #1252](https://github.com/starship/starship/discussions/1252) contains examples of custom modules. If you have an interesting example not covered there, feel free to share it there!
|
||||
[El issue #1252](https://github.com/starship/starship/discussions/1252) contiene ejemplos de módulos personalizados. Si tiene un ejemplo interesante no cubierto allí, no dude en compartirlo allí!
|
||||
|
||||
:::
|
||||
|
||||
### Opciones
|
||||
|
||||
| Opción | Por defecto | Descripción |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | El estilo del módulo. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | El formato del módulo. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Opción | Por defecto | Descripción |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | El comando cuya salida debe ser impresa. El comando se pasará en stdin al shell. |
|
||||
| `when` | | Comando de shell usado como condición para mostrar el módulo. El módulo se mostrará si el comando devuelve un código de estado `0`. |
|
||||
| `shell` | | [Ver abajo](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | La descripción del módulo que se muestra al ejecutar `starship explain`. |
|
||||
| `files` | `[]` | Los archivos que se buscarán en el directorio de trabajo para obtener una coincidencia. |
|
||||
| `directories` | `[]` | Los directorios que se buscarán en el directorio de trabajo para una coincidencia. |
|
||||
| `extensions` | `[]` | Las extensiones que se buscarán en el directorio de trabajo para obtener una coincidencia. |
|
||||
| `symbol` | `""` | El símbolo usado antes de mostrar la salida del comando. |
|
||||
| `style` | `"bold green"` | El estilo del módulo. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | El formato del módulo. |
|
||||
| `disabled` | `false` | Desactiva este módulo `custom`. |
|
||||
| `os` | | Nombre del sistema operativo en el que se mostrará el módulo (unix, linux, macos, windows, ... ) [Ver valores posibles](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Descripción |
|
||||
| --------- | -------------------------------------- |
|
||||
| output | The output of shell command in `shell` |
|
||||
| symbol | Refleja el valor de la opción `symbol` |
|
||||
| style\* | Refleja el valor de la opción `style` |
|
||||
| Variable | Descripción |
|
||||
| --------- | ----------------------------------------- |
|
||||
| output | La salida del comando de shell 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
|
||||
|
||||
#### Comando personalizado del intérprete de comandos
|
||||
|
||||
`shell` accepts a non-empty list of strings, where:
|
||||
`shell` acepta una lista no vacía de cadenas, donde:
|
||||
|
||||
- The first string is the path to the shell to use to execute the command.
|
||||
- Other following arguments are passed to the shell.
|
||||
- La primera cadena es la ruta al intérprete de comandos a usar para ejecutar el comando.
|
||||
- Otros argumentos siguientes son pasados al shell.
|
||||
|
||||
If unset, it will fallback to STARSHIP_SHELL and then to "sh" on Linux, and "cmd /C" on Windows.
|
||||
Si no está activado, se retornará a STARSHIP_SHELL y luego a "sh" en Linux, y "cmd /C" en Windows.
|
||||
|
||||
The `command` will be passed in on stdin.
|
||||
El `comando` será pasado en stdin.
|
||||
|
||||
If `shell` is not given or only contains one element and Starship detects PowerShell will be used, the following arguments will automatically be added: `-NoProfile -Command -`. This behavior can be avoided by explicitly passing arguments to the shell, e.g.
|
||||
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 -`. Este comportamiento puede evitarse pasando explícitamente argumentos al intérprete, p.ej.
|
||||
|
||||
```toml
|
||||
shell = ["pwsh", "-Command", "-"]
|
||||
```
|
||||
|
||||
::: warning Make sure your custom shell configuration exits gracefully
|
||||
::: advertencia Asegúrate de que tu configuración personalizada de shell salga con éxito
|
||||
|
||||
If you set a custom command, make sure that the default Shell used by starship will properly execute the command with a graceful exit (via the `shell` option).
|
||||
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`).
|
||||
|
||||
For example, PowerShell requires the `-Command` parameter to execute a one liner. Omitting this parameter might throw starship into a recursive loop where the shell might try to load a full profile environment with starship itself again and hence re-execute the custom command, getting into a never ending loop.
|
||||
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.
|
||||
|
||||
Parameters similar to `-NoProfile` in PowerShell are recommended for other shells as well to avoid extra loading time of a custom profile on every starship invocation.
|
||||
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.
|
||||
|
||||
Automatic detection of shells and proper parameters addition are currently implemented, but it's possible that not all shells are covered. [Please open an issue](https://github.com/starship/starship/issues/new/choose) with shell details and starship configuration if you hit such scenario.
|
||||
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.
|
||||
|
||||
:::
|
||||
|
||||
@ -2911,8 +2974,8 @@ Automatic detection of shells and proper parameters addition are currently imple
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
command = "echo foo" # muestra la salida del comando
|
||||
files = ["foo"] # se pueden especificar filtros
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
format = " transcending [$output]($style)"
|
||||
|
||||
|
@ -163,6 +163,13 @@
|
||||
Para actualizar Starship, vuelve a ejecutar el guión anterior. Reemplazará la versión actual sin tocar la configuración de Starship.
|
||||
|
||||
|
||||
**Nota** - Los valores por defecto del guión de instalación se pueden anular (ver la ayuda incorporada).
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### Instalar con un gestor de paquetes
|
||||
|
||||
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Segmentos entre Corchetes
|
||||
|
||||
Este ajuste cambia el formato de todos los módulos incorporados para mostrar su segmento entre corchetes en lugar de usar la redacción predeterminada de Starship ("via", "on", etc.).
|
||||
|
||||
Antes:
|
||||
|
||||
![Captura de pantalla de la configuración por defecto de Starship](/presets/bracketed-segments-before.png)
|
||||
|
||||
Después:
|
||||
|
||||
![Captura de pantalla de los ajustes predeterminados de los Segmentos entre Corchetes](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Configuración
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Símbolos de texto sin formato
|
||||
|
||||
Este ajuste preestablecido cambia los símbolos a texto sin formato. Si tu terminal/fuente no pudo renderizar el NerdFonts/emojis, ¡tal vez podría probar este ajuste preestablecido!
|
||||
|
||||
Antes (configuración por defecto con Fuente Fixedsys):
|
||||
|
||||
![Captura de pantalla de configuración por defecto de Starship con fuente Fixedsys](/presets/plain-text-symbols-before.png)
|
||||
|
||||
Después (Símbolos de texto sin formato):
|
||||
|
||||
![Captura de pantalla de los ajustes predeterminados de los Símbolos de Nerd Font](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Configuración
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -163,6 +163,13 @@
|
||||
Pour mettre à jour Starship, relancez le script ci-dessus. Cela remplacera la version actuelle sans toucher à la configuration de Starship.
|
||||
|
||||
|
||||
**Note** - Les valeurs par défaut du script d'installation peuvent être remplacées, voir l'aide intégrée.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### Installer via le gestionnaire de paquets
|
||||
|
||||
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Segments entre crochets
|
||||
|
||||
Cette configuration modifie le format de tous les modules intégrés pour afficher leur segment entre crochets au lieu d'utiliser le label par défaut de Starship ("via", "sur", etc.).
|
||||
|
||||
Avant:
|
||||
|
||||
![Capture d'écran de la configuration par défaut de Starship](/presets/bracketed-segments-before.png)
|
||||
|
||||
Après:
|
||||
|
||||
![Capture d'écran de la configuration Segments entre crochets](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Texte uniquement
|
||||
|
||||
Cette configuration change les symboles en texte brut. Si votre terminal/police ne peuvent pas afficher les émoticônes ou les symboles NerdFonts, vous pouvez peut-être essayer cette configuration !
|
||||
|
||||
Avant (réglage par défaut avec la police Fixedsys):
|
||||
|
||||
![Capture d'écran de la configuration Starship par défaut avec la police Fixedsys](/presets/plain-text-symbols-before.png)
|
||||
|
||||
Après (Texte uniquement):
|
||||
|
||||
![Capture d'écran de la configuration Texte uniquement](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -30,7 +30,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
|
||||
|
||||
### Prerequisiti
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
- Un [ Nerd Font ](https://www.nerdfonts.com/) installato e abilitato nel tuo terminale.
|
||||
|
||||
### Installazione Veloce
|
||||
|
||||
@ -44,7 +44,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
Per aggiornare Starship stesso, riavviare lo script sopra. Sostituirà la versione corrente senza toccare la configurazione di Starship.
|
||||
|
||||
|
||||
#### Installa con Package Manager
|
||||
@ -118,7 +118,7 @@ description: Starship è il prompt minimalista, super veloce ed estremamente per
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning Only elvish v0.15 or higher is supported. :::
|
||||
::: warning È supportato solo elvish v0.15 o superiore. :::
|
||||
|
||||
Aggiungi quanto segue alla fine di `~/.elvish/rc.elv`:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Nonostante Starship sia una shell versatile, a volte devi fare qualche modifica in più in `starship.toml` per ottenere alcune cose. Questa pagina descrive alcune tecniche di configurazione avanzate utilizzate in Starship.
|
||||
|
||||
::: Attenzione
|
||||
::: warning
|
||||
|
||||
Le configurazioni in questa sezione sono soggette a modifiche nelle future versioni di Starship.
|
||||
|
||||
@ -21,7 +21,7 @@ function blastoff(){
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Tuttavia, **devi** intrappolare il segnale DEBUG *prima di* inizializzare Starship! Starship può preservare il valore trappola di DEBUG, ma se la trappola viene sovrascritta dopo l'avvio di Starship, alcune funzionalità non funzioneranno.
|
||||
- Per eseguire una funzione personalizzata prima dell'esecuzione di un comando, è possibile utilizzare il meccanismo trappola [`DEBUG`](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). Tuttavia, **devi** intrappolare il segnale DEBUG *prima di* inizializzare Starship! Starship può preservare il valore trappola di DEBUG, ma se la trappola viene sovrascritta dopo l'avvio di Starship, alcune funzionalità non funzioneranno.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
@ -33,7 +33,7 @@ eval $(starship bash)
|
||||
|
||||
## Cambia il titolo della finestra
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish lo fa per impostazione predefinita. Starship non lo fa, ma è abbastanza semplice aggiungere questa funzionalità a `bash` o `zsh`.
|
||||
Alcune shell prompt cambieranno automaticamente il titolo della finestra (ad esempio per riflettere la directory di lavoro). Fish lo fa per impostazione predefinita. Starship non lo fa, ma è abbastanza semplice aggiungere questa funzionalità a `bash` o `zsh`.
|
||||
|
||||
Innanzitutto, bisogna definire una funzione per il cambio del titolo della finestra (identica sia per bash che zsh):
|
||||
|
||||
@ -57,9 +57,9 @@ In `zsh`, aggiungi questo `precmd_functions` all'array:
|
||||
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.
|
||||
Se ti piace il risultato, aggiungi queste righe al tuo file shell di configurazione (`~/.bashrc` o `~/.zshrc`) per renderlo permanente.
|
||||
|
||||
Ad esempio, se desideri visualizzare la directory corrente nel titolo della scheda del terminale, aggiungi la seguente snippet al tuo `~/. ashrc` or `~/.zshrc`:
|
||||
Ad esempio, se desideri visualizzare la directory corrente nel titolo della scheda del terminale, aggiungi la seguente snippet al tuo `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@ -81,9 +81,9 @@ Le stringhe di stile sono un elenco di parole, separate da spazi bianchi. Le par
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
dove `<color>` è un colore specifico (discusso in seguito). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. L'ordine delle parole nella stringa non conta.
|
||||
dove `<color>` è un colore specifico (discusso in seguito). `fg:<color>` e `<color>` attualmente fanno la stessa cosa, anche se questo potrebbe cambiare in futuro. `inverted` scambia lo sfondo e i colori in primo piano. L'ordine delle parole nella stringa non conta.
|
||||
|
||||
Il token `none` sovrascrive tutti gli altri token in una stringa se non fa parte di uno specificatore `bg:`, così ad esempio `fg:red none fg:blue` creerà una stringa senza stile. `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`. Potrà diventare un errore usare `nessuno` in combinazione con altri token in futuro.
|
||||
Il token `none` sovrascrive tutti gli altri token in una stringa se non fa parte di uno specificatore `bg:`, così ad esempio `fg:red none fg:blue` creerà una stringa senza stile. `bg:none` imposta come colore di sfondo quello predefinito così `fg:red bg:none` è equivalente a `red` o `fg:red` e `bg:green fg:red bg:none` è equivalente a `fg:red` o `red`. Potrà diventare un errore usare `none` in combinazione con altri token in futuro.
|
||||
|
||||
Uno colore specifico può essere uno di questi:
|
||||
|
||||
|
@ -1,33 +1,33 @@
|
||||
# Configurazione
|
||||
|
||||
To get started configuring starship, create the following file: `~/.config/starship.toml`.
|
||||
Per iniziare a configurare la starship, crea il seguente file: `~/.config/starship.toml`.
|
||||
|
||||
```sh
|
||||
mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
```
|
||||
|
||||
All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
|
||||
Tutta la configurazione per starship è fatta in questo file [TOML](https://github.com/toml-lang/toml):
|
||||
|
||||
```toml
|
||||
# Inserts a blank line between shell prompts
|
||||
# Inserisce una riga vuota tra gli prompt della shell
|
||||
add_newline = true
|
||||
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
|
||||
# Sostituisci il simbolo "❯" nel prompt con "➜"
|
||||
[character] # Il nome del modulo che stiamo configurando è "character"
|
||||
success_symbol = "[➜](grassetto)" # Il segmento "success_symbol" è impostato a "➜" con il colore "bold green"
|
||||
|
||||
# Disable the package module, hiding it from the prompt completely
|
||||
# Disabilita il modulo del pacchetto, nasconderlo dal prompt completamente
|
||||
[package]
|
||||
disabled = true
|
||||
```
|
||||
|
||||
You can change default configuration file location with `STARSHIP_CONFIG` environment variable:
|
||||
È possibile modificare la posizione predefinita del file di configurazione con la variabile d'ambiente `STARSHIP_CONFIG`:
|
||||
|
||||
```sh
|
||||
export STARSHIP_CONFIG=~/.starship/config.toml
|
||||
```
|
||||
|
||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
||||
Equivalentemente in PowerShell (Windows) potresti aggiungere questa riga al tuo `$PROFILE`:
|
||||
|
||||
```powershell
|
||||
$ENV:STARSHIP_CONFIG = "$HOME\.starship\config.toml"
|
||||
@ -35,23 +35,23 @@ $ENV:STARSHIP_CONFIG = "$HOME\.starship\config.toml"
|
||||
|
||||
### Logging
|
||||
|
||||
By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable:
|
||||
Per impostazione predefinita, starship salva i warning e gli errori in un file chiamato `~/.cache/starship/session_${STARSHIP_SESSION_KEY}. og`, dove la chiave di sessione è corrispondente a un'istanza del tuo terminale. Questo, tuttavia, può essere modificato utilizzando la variabile di ambiente `STARSHIP_CACHE`:
|
||||
|
||||
```sh
|
||||
export STARSHIP_CACHE=~/.starship/cache
|
||||
```
|
||||
|
||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
||||
Equivalentemente in PowerShell (Windows) potresti aggiungere questa riga al tuo `$PROFILE`:
|
||||
|
||||
```powershell
|
||||
$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
|
||||
```
|
||||
|
||||
### Terminology
|
||||
### Terminologia
|
||||
|
||||
**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project.
|
||||
**Modulo**: Un componente nel prompt che dà informazioni basate su informazioni contestuali dal tuo sistema operativo. Ad esempio, il modulo "nodejs" mostra la versione di Node.js attualmente installata sul computer, se la directory corrente è un progetto Node.js.
|
||||
|
||||
**Variable**: Smaller sub-components that contain information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of Node.js.
|
||||
**Variable**: Sotto-componenti più piccoli che contengono informazioni fornite dal modulo. For example, the "version" variable in the "nodejs" module contains the current version of Node.js.
|
||||
|
||||
By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix.
|
||||
|
||||
@ -389,7 +389,17 @@ The character will tell you whether the last command was successful or not. It c
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
::: warning
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -468,7 +478,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
## Command Duration
|
||||
## Durata del comando
|
||||
|
||||
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
|
||||
|
||||
@ -780,7 +790,6 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -799,7 +808,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. |
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | The style for the module. |
|
||||
@ -1405,7 +1414,7 @@ symbol = "🌟 "
|
||||
|
||||
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there is more than 1 job, or more than the `threshold` config value, if it exists. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: Attenzione
|
||||
::: warning
|
||||
|
||||
This module is not supported on tcsh.
|
||||
|
||||
@ -2165,6 +2174,59 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### 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 R. |
|
||||
| `style` | `"blue bold"` | The style for the module. |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | ------------- | ------------------------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style | `"blue bold"` | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
@ -2588,7 +2650,7 @@ format = "[🏎💨 $version$workspace]($style) "
|
||||
format = "[🏎💨 $workspace]($style) "
|
||||
```
|
||||
|
||||
## Time
|
||||
## Ora
|
||||
|
||||
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
|
||||
|
||||
@ -2616,7 +2678,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | ---------- | ----------------------------------- |
|
||||
| time | `13:08:10` | The current time. |
|
||||
| ora | `13:08:10` | The current time. |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
## Come posso ottenere il completamento dei comandi come mostrato nella GIF demo?
|
||||
|
||||
Completion support, or autocomplete, is provided by your shell of choice. Nel caso della demo, la demo è stata fatta con [Fish Shell](https://fishshell.com/), che fornisce i completamenti per impostazione predefinita. Se usi Z Shell (zsh), ti suggerirei di dare un'occhiata a [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
|
||||
Il supporto di completamento, o autocompletamento, è fornito dalla vostra shell di scelta. Nel caso della demo, la demo è stata fatta con [Fish Shell](https://fishshell.com/), che fornisce i completamenti per impostazione predefinita. Se usi Z Shell (zsh), ti suggerirei di dare un'occhiata a [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
|
||||
|
||||
## Il formato di primo livello `` e `<module>.disabled` fanno la stessa cosa?
|
||||
|
||||
@ -21,7 +21,7 @@ Sì, entrambi possono essere utilizzati per disabilitare i moduli nel prompt. Se
|
||||
- Disabilitare i moduli è più esplicito che ometterli dal primo `formato` di livello
|
||||
- I nuovi moduli creati saranno aggiunti al prompt come Starship viene aggiornato
|
||||
|
||||
## The docs say Starship is cross-shell. Why isn't my preferred shell supported?
|
||||
## I docs dicono Starship è cross-shell. Perché la mia shell preferita non è supportata?
|
||||
|
||||
Il modo in cui Starship è costruito, dovrebbe rendere possibile aggiungere il supporto per qualsiasi shell. Il binario di Starship è apolide e indipendente dalla shell, fino a quando la tua shell supporterà prompt personalizzati, Starship può essere utilizzato.
|
||||
|
||||
@ -46,7 +46,7 @@ Per un elenco di tutti i flag accettati da `starship prompt`, utilizzare il segu
|
||||
starship prompt --help
|
||||
```
|
||||
|
||||
The prompt will use as much context as is provided, but no flags are "required".
|
||||
Il prompt userà tanto contesto quanto è fornito, ma nessun flag è "richiesto".
|
||||
|
||||
## Come faccio a eseguire le distribuzioni Starship su Linux con vecchie versioni di glibc?
|
||||
|
||||
@ -56,9 +56,9 @@ Se si ottiene un errore come "_versione 'GLIBC_2. 8' non trovato (richiesta da S
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
## Vedo simboli che non capisco o mi aspetto, cosa significano?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
Se vedi simboli che non riconosci puoi usare `starship explain` per la spiegazione dei moduli correntemente mostrato.
|
||||
|
||||
## Perché non vedo un simbolo di glifo nel mio prompt?
|
||||
|
||||
@ -88,9 +88,9 @@ Starship è altrettanto facile da disinstallare come lo è da installare.
|
||||
|
||||
Se Starship è stato installato utilizzando un gestore di pacchetti, fai riferimento alla documentazione per le istruzioni di disinstallazione.
|
||||
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
Se Starship è stato installato utilizzando lo script di installazione, il seguente comando eliminerà il file binario:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
# Individua ed elimina il binario di starship
|
||||
sh -c 'rm "$(which starship)"'
|
||||
```
|
||||
|
@ -160,7 +160,14 @@
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
Per aggiornare Starship stesso, riavviare lo script sopra. Sostituirà la versione corrente senza toccare la configurazione di Starship.
|
||||
|
||||
|
||||
**Nota** - I valori predefiniti dello script di installazione possono essere sovrascritti, vedi la guida integrata.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### Installa via Package Manager
|
||||
|
@ -6,7 +6,7 @@ Questa guida è destinata ad attraversare questi grandi cambiamenti.
|
||||
|
||||
## `prompt_order` è stato sostituito da un formato root-level ``
|
||||
|
||||
Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship.
|
||||
Prima della v0.45.0, `prompt_order` avrebbe accettato un array di nomi di moduli nell'ordine in cui sarebbero stati renderizzati da Starship.
|
||||
|
||||
Starship v0.45.0 invece accetta un valore `format`, consentendo la personalizzazione del prompt al di fuori dei moduli stessi.
|
||||
|
||||
@ -111,7 +111,7 @@ error_symbol = "[✖](bold red)"
|
||||
|
||||
*Nota:* L'elemento `carattere` aggiunge dopo automaticamente uno spazio, quindi a differenza delle altre stringhe `formato`, non ne aggiungiamo uno specificamente agli esempi di cui sopra.
|
||||
|
||||
#### Command Duration
|
||||
#### Durata del comando
|
||||
|
||||
| Proprietà rimossa | Sostituta |
|
||||
| ----------------- | --------- |
|
||||
@ -235,7 +235,7 @@ behind = "⇣${count}"
|
||||
++ format = '[$symbol\[$env\]]($style) '
|
||||
```
|
||||
|
||||
#### Time
|
||||
#### Ora
|
||||
|
||||
| Proprietà rimossa | Sostituta |
|
||||
| ----------------- | ------------- |
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Configurazione
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Configurazione
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -21,7 +21,7 @@ function blastoff(){
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). しかし、Starship を初期化する前に DEBUG シグナルをトラップ*しなければいけません*! Starship は DEBUGトラップの値を保護できますが、 starship の起動後にトラップが上書きされると、いくつかの機能は壊れてしまうでしょう。
|
||||
- コマンドの直前に関数を実行するために、[`DEBUG` トラップの仕組み](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/)を使うことができます。 しかし、Starship を初期化する前に DEBUG シグナルをトラップ*しなければいけません*! Starship は DEBUGトラップの値を保護できますが、 starship の起動後にトラップが上書きされると、いくつかの機能は壊れてしまうでしょう。
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
@ -33,7 +33,7 @@ eval $(starship init bash)
|
||||
|
||||
## ウィンドウのタイトルの変更
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). 特に Fish はデフォルトで変更を行います。 Starship はこれをしませんが、この機能を `bash` や `zsh` に追加することは簡単にできます。
|
||||
いくつかのシェルプロンプトはあなたのためにウィンドウのタイトルを自動的に変更します(例えば、カレントディレクトリを反映するために)。 特に Fish はデフォルトで変更を行います。 Starship はこれをしませんが、この機能を `bash` や `zsh` に追加することは簡単にできます。
|
||||
|
||||
まず、ウィンドウのタイトルを変更する関数を定義してください( bash も zsh も同様に)
|
||||
|
||||
@ -57,7 +57,7 @@ starship_precmd_user_func="set_win_title"
|
||||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
もし結果に満足したら、永続化のためそれぞれの行をシェルの設定ファイル (`~/.bashrc` もしくは `~/.zshrc`) に追加してください。
|
||||
|
||||
たとえば、現在のディレクトリをターミナルタブのタイトルに表示したい場合は、 `~/.bashrc`または`~/.zshrc`に以下のスニペットを追加します。
|
||||
|
||||
@ -81,9 +81,9 @@ starship_precmd_user_func="set_win_title"
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
ここで、 `<color>` は色を指定します(以下で述べます)。 `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. 文字列中の単語の順序は関係ありません。
|
||||
ここで、 `<color>` は色を指定します(以下で述べます)。 現在 `fg:<color>` と `<color>` は同様の動作ですが、将来変更される可能性があります。 `inverted` は背景と前景の色を交換します。 文字列中の単語の順序は関係ありません。
|
||||
|
||||
`none` トークンは、文字列中の`bg:` 指定子の一部でない場合、他のすべてのトークンをオーバーライドします。そのため、たとえば、`fg:red none fg:blue` と指定した場合、スタイルなしの文字列が作られます。 `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`. 将来 `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` を他の単語と一緒に使用することはエラーになるかもしれません。
|
||||
|
||||
色は以下のいずれか1つを指定できます。
|
||||
|
||||
|
@ -257,7 +257,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
|
||||
| `region_aliases` | | AWS名に加えて表示するリージョンのエイリアスです。 |
|
||||
| `style` | `"bold yellow"` | モジュールのスタイルです。 |
|
||||
| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| `disabled` | `false` | `aws`モジュールを無効にします。 |
|
||||
|
||||
### 変数
|
||||
|
||||
@ -390,7 +390,17 @@ discharging_symbol = 💦
|
||||
|
||||
デフォルトでは、色だけが変更されます。 If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` はelvishシェルではサポートされていません。 :::
|
||||
::: warning
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### オプション
|
||||
|
||||
@ -781,7 +791,6 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -800,7 +809,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | dotnetのバージョンを表示する前に使用される記号です。 |
|
||||
| `heuristic` | `true` | より高速なバージョン検出を使用して、starshipの動作を維持します。 |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | どの拡張子がこのモジュールをアクティブにするか |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | どの拡張子がこのモジュールをアクティブにするか |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | どのファイル名がこのモジュールをアクティブにするか |
|
||||
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
|
||||
| `style` | `"bold blue"` | モジュールのスタイルです。 |
|
||||
@ -994,7 +1003,7 @@ format = "via [e $version](bold red) "
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ---------------- | ---------------------------------------------------------- | ----------------------------- |
|
||||
| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | moduleのフォーマットです。 |
|
||||
| `symbol` | `"☁️ "` | 現在のGCPプロファイルを表示する前に表示される記号です。 |
|
||||
| `symbol` | `"☁️ "` | 現在のGCPプロファイルを表示する前に表示される記号です。 |
|
||||
| `region_aliases` | | GCP名に加えて表示するリージョンのエイリアスです。 |
|
||||
| `style` | `"bold blue"` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | `gcloud`モジュールを無効にします。 |
|
||||
@ -1634,13 +1643,14 @@ format = "via [🌕 $version](bold blue) "
|
||||
|
||||
## メモリ使用量
|
||||
|
||||
`memory_usage` モジュールは、現在のシステムメモリとスワップ使用量を示します。
|
||||
`memory_usage</ 0>モジュールは、現在のシステムメモリとスワップ使用量を示します。</p>
|
||||
|
||||
デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。
|
||||
<p spaces-before="0">デフォルトでは、システムスワップの合計がゼロ以外の場合、スワップ使用量が表示されます。</p>
|
||||
|
||||
::: tip
|
||||
<p spaces-before="0">::: tip</p>
|
||||
|
||||
このモジュールはデフォルトで無効になっています。 有効にするには、設定ファイルで`disabled`を`false`に設定します。
|
||||
<p spaces-before="0">このモジュールはデフォルトで無効になっています。
|
||||
有効にするには、設定ファイルで<code>disabled`を`false`に設定します。
|
||||
|
||||
:::
|
||||
|
||||
@ -2166,6 +2176,59 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### オプション
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | moduleのフォーマットです。 |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"📐"` | A format string representing the symbol of R. |
|
||||
| `style` | `"blue bold"` | モジュールのスタイルです。 |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | どの拡張子がこのモジュールをアクティブにするか |
|
||||
| `detect_files` | `[".Rprofile"]` | どのファイル名がこのモジュールをアクティブにするか |
|
||||
| `detect_folders` | `[".Rproj.user"]` | どのフォルダーがこのモジュールをアクティブにするか |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### 変数
|
||||
|
||||
| 変数 | 設定例 | 説明 |
|
||||
| ------- | ------------- | ---------------------- |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | オプション `記号` の値をミラーする |
|
||||
| style | `"blue bold"` | オプション `style` の値をミラーする |
|
||||
|
||||
### 設定例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
@ -2657,8 +2720,8 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
|
||||
| `style_root` | `"bold red"` | ユーザーがrootのときに使用されるスタイルです。 |
|
||||
| `style_user` | `"bold yellow"` | 非rootユーザーに使用されるスタイルです。 |
|
||||
| `format` | `"[$user]($style) in "` | moduleのフォーマットです。 |
|
||||
| `show_always` | `false` | `username` モジュールを常に表示します。 |
|
||||
| `disabled` | `false` | `username` モジュールを無効にします。 |
|
||||
| `show_always` | `false` | `username`モジュールを常に表示します。 |
|
||||
| `disabled` | `false` | `username`モジュールを無効にします。 |
|
||||
|
||||
### 変数
|
||||
|
||||
@ -2832,6 +2895,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2853,19 +2917,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### オプション
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | モジュールのスタイルです。 |
|
||||
| `format` | `"[$symbol($output )]($style)"` | moduleのフォーマットです。 |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [この表の下を参照してください](#custom-command-shell) |
|
||||
| `説明` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | モジュールのスタイルです。 |
|
||||
| `format` | `"[$symbol($output )]($style)"` | moduleのフォーマットです。 |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### 変数
|
||||
|
||||
|
@ -163,6 +163,13 @@
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### パッケージマネージャー経由でインストール
|
||||
|
||||
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### 設定
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### 設定
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -389,7 +389,17 @@ The character will tell you whether the last command was successful or not. It c
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
::: warning
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -780,7 +790,6 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -799,7 +808,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. |
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | The style for the module. |
|
||||
@ -2165,6 +2174,59 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### 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 R. |
|
||||
| `style` | `"blue bold"` | The style for the module. |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | ------------- | ------------------------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style | `"blue bold"` | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -163,6 +163,13 @@
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### 패키지 매니저를 이용한 설치
|
||||
|
||||
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -389,7 +389,17 @@ The character will tell you whether the last command was successful or not. It c
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
::: warning
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -780,7 +790,6 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -799,7 +808,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. |
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | The style for the module. |
|
||||
@ -2165,6 +2174,59 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### 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 R. |
|
||||
| `style` | `"blue bold"` | The style for the module. |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | ------------- | ------------------------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style | `"blue bold"` | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -163,6 +163,13 @@
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### Install via Package Manager
|
||||
|
||||
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -389,7 +389,17 @@ The character will tell you whether the last command was successful or not. It c
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
::: warning
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -780,7 +790,6 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -799,7 +808,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. |
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | The style for the module. |
|
||||
@ -2165,6 +2174,59 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### 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 R. |
|
||||
| `style` | `"blue bold"` | The style for the module. |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | ------------- | ------------------------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style | `"blue bold"` | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -163,6 +163,13 @@
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### Install via Package Manager
|
||||
|
||||
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -30,7 +30,7 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
|
||||
|
||||
### Pré-requisitos
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
- Uma fonte [Nerd Font](https://www.nerdfonts.com/) instalada e ativada em seu terminal.
|
||||
|
||||
### Instalação
|
||||
|
||||
@ -44,7 +44,7 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
Para atualizar o Starship de maneira manual, execute novamente o script acima. Isto irá substituir a versão atual sem alterar as configurações do Starship.
|
||||
|
||||
|
||||
#### Instalar via Gerenciador de Pacotes
|
||||
@ -99,7 +99,7 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
|
||||
|
||||
#### 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.
|
||||
Adicione o comando a seguir ao final do arquivo `Microsoft.PowerShell_profile.ps1`. Você pode conferir a localização do arquivo consultando a varável `$PROFILE` no PowerShell. Normalmente o caminho é `~\Documentos\PowerShell\Microsoft.PowerShell_profile.ps1` ou `~/.config/powershell/Microsoft.PowerShell_profile.ps1` no -Nix.
|
||||
|
||||
```sh
|
||||
Invoke-Expression (&starship init powershell)
|
||||
@ -118,9 +118,9 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning Only elvish v0.15 or higher is supported. :::
|
||||
::: Atenção Apenas a versão v0.15 ou superior do elvish é suportada. :::
|
||||
|
||||
Add the following to the end of `~/.elvish/rc.elv`:
|
||||
Adicione o comando a seguir ao final do arquivo `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
@ -131,7 +131,7 @@ description: O Starship é o prompt minimalista, extremamente rápido e extremam
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
Adicione ao final do arquivo `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Advanced Configuration
|
||||
# Configuração avançada
|
||||
|
||||
Ainda que Starship se`ja um shell versátil, às vezes você precisará fazer algumas outras coisas além de editar o arquivo <code>starship.toml`. Esta página detalha algumas das configurações mais avançadas usadas em starship.
|
||||
|
||||
@ -27,7 +27,7 @@ starship_precmd_user_func="blastoff"
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
trap blastoff DEBUG # Trap Inicia o debug antes de iniciar o starship
|
||||
eval $(starship init bash)
|
||||
```
|
||||
|
||||
|
@ -142,7 +142,7 @@ This is the list of prompt-wide configuration options.
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
|
||||
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
|
||||
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
|
||||
@ -169,12 +169,12 @@ add_newline = false
|
||||
|
||||
### Default Prompt Format
|
||||
|
||||
The default `format` is used to define the format of the prompt, if empty or no `format` is provided. Os valores padrão são os seguintes:
|
||||
O `formato` padrão é usado para definir o formato do prompt, se um valor vazio ou não `formatado` for informado. Os valores padrão são os seguintes:
|
||||
|
||||
```toml
|
||||
format = "$all"
|
||||
|
||||
# Which is equivalent to
|
||||
# Que é equivalente a
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
@ -249,14 +249,14 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------------- | -------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\])]($style)'` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | O estilo do módulo. |
|
||||
| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\])]($style)'` | O formato do módulo. |
|
||||
| `symbol` | `"☁️ "` | O símbolo usado antes de exibir o perfil atual da AWS. |
|
||||
| `region_aliases` | | Tabela de aleases de regiões a serem exibidas, além do nome da AWS. |
|
||||
| `style` | `"bold yellow"` | O estilo do módulo. |
|
||||
| `expiration_symbol` | `X` | O simbolo exibido quando as credenciais temporárias estão expiradas. |
|
||||
| `disabled` | `false` | Desabilita o modulo `AWS`. |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -317,14 +317,14 @@ The `battery` module shows how charged the device's battery is and its current c
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| -------------------- | --------------------------------- | --------------------------------------------------- |
|
||||
| `full_symbol` | `" "` | The symbol shown when the battery is full. |
|
||||
| `charging_symbol` | `" "` | The symbol shown when the battery is charging. |
|
||||
| `discharging_symbol` | `" "` | The symbol shown when the battery is discharging. |
|
||||
| `unknown_symbol` | `" "` | The symbol shown when the battery state is unknown. |
|
||||
| `empty_symbol` | `" "` | The symbol shown when the battery state is empty. |
|
||||
| `format` | `"[$symbol$percentage]($style) "` | The format for the module. |
|
||||
| `format` | `"[$symbol$percentage]($style) "` | O formato do módulo. |
|
||||
| `display` | [link](#battery-display) | Display threshold and style for the module. |
|
||||
| `disabled` | `false` | Disables the `battery` module. |
|
||||
|
||||
@ -355,7 +355,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
|
||||
|
||||
The `display` option is an array of the following table.
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| -------------------- | ---------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `threshold` | `10` | The upper bound for the display option. |
|
||||
| `style` | `bold red` | The style used if the display option is in use. |
|
||||
@ -389,11 +389,21 @@ The character will tell you whether the last command was successful or not. It c
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
::: warning
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ---------------- | ------------------- | -------------------------------------------------------------------------------- |
|
||||
| `format` | `"$symbol "` | The format string used before the text input. |
|
||||
| `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. |
|
||||
@ -447,9 +457,9 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | -------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module |
|
||||
@ -482,11 +492,11 @@ Bash users who need preexec-like functionality can use [rcaloras's bash_preexec
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| -------------------- | ----------------------------- | ---------------------------------------------------------- |
|
||||
| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). |
|
||||
| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. |
|
||||
| `format` | `"took [$duration]($style) "` | The format for the module. |
|
||||
| `format` | `"took [$duration]($style) "` | O formato do módulo. |
|
||||
| `style` | `"bold yellow"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `cmd_duration` module. |
|
||||
| `show_notifications` | `false` | Show desktop notifications when command completes. |
|
||||
@ -529,12 +539,12 @@ This does not suppress conda's own prompt modifier, you may want to run `conda c
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. |
|
||||
| `symbol` | `"🅒 "` | The symbol used before the environment name. |
|
||||
| `style` | `"bold green"` | O estilo do módulo. |
|
||||
| `format` | `"via [$symbol$environment]($style) "` | The format for the module. |
|
||||
| `format` | `"via [$symbol$environment]($style) "` | O formato do módulo. |
|
||||
| `ignore_base` | `true` | Ignores `base` environment when activated. |
|
||||
| `disabled` | `false` | Disables the `conda` module. |
|
||||
|
||||
@ -566,10 +576,10 @@ The `crystal` module shows the currently installed version of [Crystal](https://
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `style` | `"bold red"` | O estilo do módulo. |
|
||||
| `detect_extensions` | `["cr"]` | Which extensions should trigger this module. |
|
||||
@ -606,9 +616,9 @@ The `dart` module shows the currently installed version of [Dart](https://dart.d
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🎯 "` | A format string representing the symbol of Dart |
|
||||
| `detect_extensions` | `["dart"]` | Which extensions should trigger this module. |
|
||||
@ -643,9 +653,9 @@ The `deno` module shows you your currently installed version of [Deno](https://d
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | -------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🦕 "` | A format string representing the symbol of Deno |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
@ -681,11 +691,11 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. |
|
||||
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. |
|
||||
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. |
|
||||
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | O formato do módulo. |
|
||||
| `style` | `"bold cyan"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `directory` module. |
|
||||
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
|
||||
@ -739,9 +749,9 @@ The `docker_context` module shows the currently active [Docker context](https://
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol$context]($style) "` | The format for the module. |
|
||||
| `format` | `"via [$symbol$context]($style) "` | O formato do módulo. |
|
||||
| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. |
|
||||
| `only_with_files` | `true` | Only show when there's a match |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module (needs `only_with_files` to be true). |
|
||||
@ -780,7 +790,6 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -793,13 +802,13 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. |
|
||||
| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. |
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | O estilo do módulo. |
|
||||
@ -835,7 +844,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `'via [$symbol($version \(OTP $otp_version\) )]($style)'` | The format for the module elixir. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
@ -878,9 +887,9 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🌳 "` | A format string representing the symbol of Elm. |
|
||||
| `detect_extensions` | `["elm"]` | Which extensions should trigger this module. |
|
||||
@ -908,7 +917,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
|
||||
format = "via [ $version](cyan bold) "
|
||||
```
|
||||
|
||||
## Environment Variable
|
||||
## Variáveis de Ambiente
|
||||
|
||||
The `env_var` module displays the current value of a selected environment variable. The module will be shown only if any of the following conditions are met:
|
||||
|
||||
@ -917,12 +926,12 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
| `format` | `"with [$env_value]($style) "` | O formato do módulo. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
|
||||
### Variables
|
||||
@ -954,9 +963,9 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | The symbol used before displaying the version of erlang. |
|
||||
| `style` | `"bold red"` | O estilo do módulo. |
|
||||
@ -990,9 +999,9 @@ The `gcloud` module shows the current configuration for [`gcloud`](https://cloud
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ---------------- | ---------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | The format for the module. |
|
||||
| `format` | `'on [$symbol$account(@$domain)(\($region\))]($style) '` | O formato do módulo. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current GCP profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the GCP name. |
|
||||
| `style` | `"bold blue"` | O estilo do módulo. |
|
||||
@ -1051,10 +1060,10 @@ The `git_branch` module shows the active branch of the repo in your current dire
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| -------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| `always_show_remote` | `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. |
|
||||
| `format` | `"on [$symbol$branch]($style) "` | The format for the module. Use `"$branch"` to refer to the current branch name. |
|
||||
| `format` | `"on [$symbol$branch]($style) "` | O formato do módulo. Use `"$branch"` to refer to the current branch name. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of git branch. |
|
||||
| `style` | `"bold purple"` | O estilo do módulo. |
|
||||
| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` graphemes. |
|
||||
@ -1091,10 +1100,10 @@ The `git_commit` module shows the current commit hash and also the tag (if any)
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| -------------------- | ------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | O formato do módulo. |
|
||||
| `style` | `"bold green"` | O estilo do módulo. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached `HEAD` state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
@ -1126,7 +1135,7 @@ The `git_state` module will show in directories which are part of a git reposito
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| -------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||
| `rebase` | `"REBASING"` | A format string displayed when a `rebase` is in progress. |
|
||||
| `merge` | `"MERGING"` | A format string displayed when a `merge` is in progress. |
|
||||
@ -1136,7 +1145,7 @@ The `git_state` module will show in directories which are part of a git reposito
|
||||
| `am` | `"AM"` | A format string displayed when an `apply-mailbox` (`git am`) is in progress. |
|
||||
| `am_or_rebase` | `"AM/REBASE"` | A format string displayed when an ambiguous `apply-mailbox` or `rebase` is in progress. |
|
||||
| `style` | `"bold yellow"` | O estilo do módulo. |
|
||||
| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | The format for the module. |
|
||||
| `format` | `'\([$state( $progress_current/$progress_total)]($style)\) '` | O formato do módulo. |
|
||||
| `disabled` | `false` | Disables the `git_state` module. |
|
||||
|
||||
### Variables
|
||||
@ -1166,7 +1175,7 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------ | ----------------------------------------------- | ----------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `"="` | This branch has merge conflicts. |
|
||||
@ -1258,9 +1267,9 @@ The `golang` module shows the currently installed version of [Golang](https://go
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🐹 "` | A format string representing the symbol of Go. |
|
||||
| `detect_extensions` | `["go"]` | Which extensions should trigger this module. |
|
||||
@ -1297,9 +1306,9 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["helmfile.yaml", "Chart.yaml"]` | Which filenames should trigger this module. |
|
||||
@ -1333,11 +1342,11 @@ The `hostname` module shows the system hostname.
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
|
||||
| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation |
|
||||
| `format` | `"[$hostname]($style) in "` | The format for the module. |
|
||||
| `format` | `"[$hostname]($style) in "` | O formato do módulo. |
|
||||
| `style` | `"bold dimmed green"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `hostname` module. |
|
||||
|
||||
@ -1371,9 +1380,9 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | 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. |
|
||||
@ -1413,10 +1422,10 @@ This module is not supported on tcsh.
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ----------- | ----------------------------- | ------------------------------------------------ |
|
||||
| `threshold` | `1` | Show number of jobs if exceeded. |
|
||||
| `format` | `"[$symbol$number]($style) "` | The format for the module. |
|
||||
| `format` | `"[$symbol$number]($style) "` | O formato do módulo. |
|
||||
| `symbol` | `"✦"` | A format string representing the number of jobs. |
|
||||
| `style` | `"bold blue"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `jobs` module. |
|
||||
@ -1451,9 +1460,9 @@ The `julia` module shows the currently installed version of [Julia](https://juli
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `["jl"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["Project.toml", "Manifest.toml"]` | Which filenames should trigger this module. |
|
||||
@ -1489,9 +1498,9 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `["kt", "kts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
@ -1540,10 +1549,10 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ----------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `symbol` | `"☸ "` | A format string representing the symbol displayed before the Cluster. |
|
||||
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | The format for the module. |
|
||||
| `format` | `'[$symbol$context( \($namespace\))]($style) in '` | O formato do módulo. |
|
||||
| `style` | `"cyan bold"` | O estilo do módulo. |
|
||||
| `context_aliases` | | Table of context aliases to display. |
|
||||
| `disabled` | `true` | Disables the `kubernetes` module. |
|
||||
@ -1577,7 +1586,7 @@ The `line_break` module separates the prompt into two lines.
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ---------- | ------- | ------------------------------------------------------------------ |
|
||||
| `disabled` | `false` | Disables the `line_break` module, making the prompt a single line. |
|
||||
|
||||
@ -1600,9 +1609,9 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | -------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🌙 "` | A format string representing the symbol of Lua. |
|
||||
| `detect_extensions` | `["lua"]` | Which extensions should trigger this module. |
|
||||
@ -1645,10 +1654,10 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ----------- | ----------------------------------------------- | -------------------------------------------------------- |
|
||||
| `threshold` | `75` | Hide the memory usage unless it exceeds this percentage. |
|
||||
| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | The format for the module. |
|
||||
| `format` | `"via $symbol [${ram}( \| ${swap})]($style) "` | O formato do módulo. |
|
||||
| `symbol` | `"🐏"` | The symbol used before displaying the memory usage. |
|
||||
| `style` | `"bold dimmed white"` | O estilo do módulo. |
|
||||
| `disabled` | `true` | Disables the `memory_usage` module. |
|
||||
@ -1684,11 +1693,11 @@ The `hg_branch` module shows the active branch of the repo in your current direc
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- |
|
||||
| `symbol` | `" "` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
|
||||
| `style` | `"bold purple"` | O estilo do módulo. |
|
||||
| `format` | `"on [$symbol$branch]($style) "` | The format for the module. |
|
||||
| `format` | `"on [$symbol$branch]($style) "` | O formato do módulo. |
|
||||
| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes |
|
||||
| `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. |
|
||||
| `disabled` | `true` | Disables the `hg_branch` module. |
|
||||
@ -1725,9 +1734,9 @@ The `nim` module shows the currently installed version of [Nim](https://nim-lang
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. |
|
||||
| `detect_extensions` | `["nim", "nims", "nimble"]` | Which extensions should trigger this module. |
|
||||
@ -1762,9 +1771,9 @@ The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------ | ---------------------------------------------- | ----------------------------------------------------- |
|
||||
| `format` | `'via [$symbol$state( \($name\))]($style) '` | The format for the module. |
|
||||
| `format` | `'via [$symbol$state( \($name\))]($style) '` | O formato do módulo. |
|
||||
| `symbol` | `"❄️ "` | A format string representing the symbol of nix-shell. |
|
||||
| `style` | `"bold blue"` | O estilo do módulo. |
|
||||
| `impure_msg` | `"impure"` | A format string shown when the shell is impure. |
|
||||
@ -1807,9 +1816,9 @@ The `nodejs` module shows the currently installed version of [Node.js](https://n
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string representing the symbol of Node.js. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
@ -1851,7 +1860,7 @@ The `ocaml` module shows the currently installed version of [OCaml](https://ocam
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )(\($switch_indicator$switch_name\) )]($style)"` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
@ -1891,9 +1900,9 @@ The `openstack` module shows the current OpenStack cloud and project. The module
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | The format for the module. |
|
||||
| `format` | `"on [$symbol$cloud(\\($project\\))]($style) "` | O formato do módulo. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current OpenStack cloud. |
|
||||
| `style` | `"bold yellow"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `openstack` module. |
|
||||
@ -1941,9 +1950,9 @@ The `package` module is shown when the current directory is the repository for a
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ----------------- | --------------------------------- | ---------------------------------------------------------- |
|
||||
| `format` | `"is [$symbol$version]($style) "` | The format for the module. |
|
||||
| `format` | `"is [$symbol$version]($style) "` | O formato do módulo. |
|
||||
| `symbol` | `"📦 "` | The symbol used before displaying the version the package. |
|
||||
| `style` | `"bold 208"` | O estilo do módulo. |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
@ -1980,7 +1989,7 @@ The `perl` module shows the currently installed version of [Perl](https://www.pe
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
@ -2018,9 +2027,9 @@ The `php` module shows the currently installed version of [PHP](https://www.php.
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🐘 "` | The symbol used before displaying the version of PHP. |
|
||||
| `detect_extensions` | `["php"]` | Which extensions should trigger this module. |
|
||||
@ -2057,9 +2066,9 @@ The `purescript` module shows the currently installed version of [PureScript](ht
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"<=> "` | The symbol used before displaying the version of PureScript. |
|
||||
| `detect_extensions` | `["purs"]` | Which extensions should trigger this module. |
|
||||
@ -2107,9 +2116,9 @@ By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
||||
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | The format for the module. |
|
||||
| `format` | `'via [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
|
||||
| `style` | `"yellow bold"` | O estilo do módulo. |
|
||||
@ -2165,6 +2174,59 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### Opções
|
||||
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"📐"` | A format string representing the symbol of R. |
|
||||
| `style` | `"blue bold"` | O estilo do módulo. |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variável | Exemplo | Descrição |
|
||||
| -------- | ------------- | ------------------------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style | `"blue bold"` | Mirrors the value of option `style` |
|
||||
|
||||
### Exemplo
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
@ -2173,9 +2235,9 @@ By default the `red` module shows the currently installed version of [Red](https
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🔺 "` | A format string representing the symbol of Red. |
|
||||
| `detect_extensions` | `["red"]` | Which extensions should trigger this module. |
|
||||
@ -2213,9 +2275,9 @@ By default the `ruby` module shows the currently installed version of [Ruby](htt
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||
| `detect_extensions` | `["rb"]` | Which extensions should trigger this module. |
|
||||
@ -2252,9 +2314,9 @@ By default the `rust` module shows the currently installed version of [Rust](htt
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||
| `detect_extensions` | `["rs"]` | Which extensions should trigger this module. |
|
||||
@ -2292,9 +2354,9 @@ The `scala` module shows the currently installed version of [Scala](https://www.
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ---------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [${symbol}(${version} )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `["sbt", "scala"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[".scalaenv", ".sbtenv", "build.sbt"]` | Which filenames should trigger this module. |
|
||||
@ -2334,7 +2396,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ---------------------- | ------------ | ------------------------------------------------------------ |
|
||||
| `bash_indicator` | `bsh` | A format string used to represent bash. |
|
||||
| `fish_indicator` | `fsh` | A format string used to represent fish. |
|
||||
@ -2344,7 +2406,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
| `elvish_indicator` | `esh` | A format string used to represent elvish. |
|
||||
| `tcsh_indicator` | `tsh` | A format string used to represent tcsh. |
|
||||
| `unknown_indicator` | | The default value to be displayed when the shell is unknown. |
|
||||
| `format` | `$indicator` | The format for the module. |
|
||||
| `format` | `$indicator` | O formato do módulo. |
|
||||
| `disabled` | `true` | Disables the `shell` module. |
|
||||
|
||||
### Variables
|
||||
@ -2371,10 +2433,10 @@ The `shlvl` module shows the current `SHLVL` ("shell level") environment variabl
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ----------- | ---------------------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `2` | Display threshold. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | The format for the module. |
|
||||
| `format` | `"[$symbol$shlvl]($style) "` | O formato do módulo. |
|
||||
| `symbol` | `"↕️ "` | The symbol used to represent the `SHLVL`. |
|
||||
| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. |
|
||||
| `style` | `"bold yellow"` | O estilo do módulo. |
|
||||
@ -2401,15 +2463,15 @@ format = "$shlvl level(s) down"
|
||||
threshold = 3
|
||||
```
|
||||
|
||||
## Singularity
|
||||
## Singularidade
|
||||
|
||||
The `singularity` module shows the current [Singularity](https://sylabs.io/singularity/) image, if inside a container and `$SINGULARITY_NAME` is set.
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ---------- | -------------------------------- | ------------------------------------------------ |
|
||||
| `format` | `'[$symbol\[$env\]]($style) '` | The format for the module. |
|
||||
| `format` | `'[$symbol\[$env\]]($style) '` | O formato do módulo. |
|
||||
| `symbol` | `""` | A format string displayed before the image name. |
|
||||
| `style` | `"bold dimmed blue"` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `singularity` module. |
|
||||
@ -2447,7 +2509,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ----------------------- | ----------------------------- | ---------------------------------------------------- |
|
||||
| `format` | `"[$symbol$status]($style) "` | The format of the module |
|
||||
| `symbol` | `"✖"` | The symbol displayed on program error |
|
||||
@ -2499,9 +2561,9 @@ By default the `swift` module shows the currently installed version of [Swift](h
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"🐦 "` | A format string representing the symbol of Swift |
|
||||
| `detect_extensions` | `["swift"]` | Which extensions should trigger this module. |
|
||||
@ -2546,7 +2608,7 @@ By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
@ -2588,7 +2650,7 @@ format = "[🏎💨 $version$workspace]($style) "
|
||||
format = "[🏎💨 $workspace]($style) "
|
||||
```
|
||||
|
||||
## Time
|
||||
## Horário
|
||||
|
||||
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
|
||||
|
||||
@ -2600,7 +2662,7 @@ This module is disabled by default. To enable it, set `disabled` to `false` in y
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"at [$time]($style) "` | The format string for the module. |
|
||||
| `use_12hr` | `false` | Enables 12 hour formatting |
|
||||
@ -2616,7 +2678,7 @@ If `use_12hr` is `true`, then `time_format` defaults to `"%r"`. Otherwise, it de
|
||||
|
||||
| Variável | Exemplo | Descrição |
|
||||
| --------- | ---------- | ----------------------------------- |
|
||||
| time | `13:08:10` | The current time. |
|
||||
| horário | `13:08:10` | The current time. |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
@ -2651,11 +2713,11 @@ SSH connection is detected by checking environment variables `SSH_CONNECTION`, `
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------- | ----------------------- | ------------------------------------- |
|
||||
| `style_root` | `"bold red"` | The style used when the user is root. |
|
||||
| `style_user` | `"bold yellow"` | The style used for non-root users. |
|
||||
| `format` | `"[$user]($style) in "` | The format for the module. |
|
||||
| `format` | `"[$user]($style) in "` | O formato do módulo. |
|
||||
| `show_always` | `false` | Always shows the `username` module. |
|
||||
| `disabled` | `false` | Disables the `username` module. |
|
||||
|
||||
@ -2687,9 +2749,9 @@ The `vagrant` module shows the currently installed version of [Vagrant](https://
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"⍱ "` | A format string representing the symbol of Vagrant. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
@ -2725,9 +2787,9 @@ The `vlang` module shows you your currently installed version of V. By default t
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | -------------------------------------------- | -------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `symbol` | `"V "` | A format string representing the symbol of V |
|
||||
| `detect_extensions` | `["v"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["v.mod", "vpkg.json", ".vpkg-lock.json" ]` | Which filenames should trigger this module. |
|
||||
@ -2757,11 +2819,11 @@ The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/v
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ---------- | -------------------------------- | ------------------------------------------------------ |
|
||||
| `symbol` | | The symbol used before displaying the repository name. |
|
||||
| `style` | `"bold yellow"` | O estilo do módulo. |
|
||||
| `format` | `"vcsh [$symbol$repo]($style) "` | The format for the module. |
|
||||
| `format` | `"vcsh [$symbol$repo]($style) "` | O formato do módulo. |
|
||||
| `disabled` | `false` | Disables the `vcsh` module. |
|
||||
|
||||
### Variables
|
||||
@ -2791,9 +2853,9 @@ By default the the `zig` module shows the currently installed version of [Zig](h
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | O formato do módulo. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
|
||||
| `style` | `"bold yellow"` | O estilo do módulo. |
|
||||
@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### Opções
|
||||
|
||||
| Option | Padrão | Descrição |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | O estilo do módulo. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `descrição` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | O estilo do módulo. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | O formato do módulo. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1,40 +1,40 @@
|
||||
# FAQ
|
||||
|
||||
## What is the configuration used in the demo GIF?
|
||||
## Qual é a configuração usada no GIF de demonstração?
|
||||
|
||||
- **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)
|
||||
- **Emulador de Terminal**: [iTerm2](https://iterm2.com/)
|
||||
- **Tema**: Minimal
|
||||
- **Esquema de Cores**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **Fonte**: [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)
|
||||
- **Configuração**: [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?
|
||||
## Como eu consigo obter autocompletar de comando, conforme mostrado no GIF de demonstração?
|
||||
|
||||
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).
|
||||
O suporte de autocompletar, é provido pelo shell que você escolher. No caso da demonstração, é utilizado o [Fish Shell](https://fishshell.com/), que prove autocompletar como padrão. Se você usa Z Shell (zsh), Eu sugiro que você dê uma olhada no [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
|
||||
|
||||
## Do top level `format` and `<module>.disabled` do the same thing?
|
||||
## De forma geral `format` e `<module>.disabled` fazem a mesma coisa?
|
||||
|
||||
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:
|
||||
Sim, ambos podem ser usados para desativar os mulos no prompt. Se seu objetivo geral é desativar modulos, `<module>.disabled` é o mais recomendado pelas seguintes razões:
|
||||
|
||||
- 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
|
||||
- Desabilitar módulos é mais explícito do que omiti-lo através do `format`
|
||||
- Modulos recém-criados serão adicionados quando o Starship for atualizado
|
||||
|
||||
## The docs say Starship is cross-shell. Why isn't my preferred shell supported?
|
||||
## As documentações dizem que o Starship é cross-shell. Porque minha shell preferida não é suportada?
|
||||
|
||||
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.
|
||||
A forma em que o Starship foi construído, faz com que ele seja compatível com qualquer 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
|
||||
# Recupera o status do último comando executado
|
||||
STATUS=$?
|
||||
|
||||
# Get the number of jobs running.
|
||||
# Recupera o número de jobs que estão rodando.
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
# Define a saída do prompt para ´starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
@ -60,37 +60,37 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
## Por que não consigo visualizar um simbolo glifo no meu 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:
|
||||
A causa mais comum é a configuração incorreta do sistema. Algumas distribuições Linux em particular não vem com suporte de fontes pronto para uso. Você deve conferir os pontos abaixo:
|
||||
|
||||
- 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/).
|
||||
- Sua localização está configurada como UTF-8, como por exemplo `de_DE.UTF-8` ou `ja_JP.UTF-8`. Se `LC_ALL` não estiver configurado como UTF-8, [você deve mudar](https://www.tecmint.com/set-system-locales-in-linux/).
|
||||
- Você tem uma fonte de emoji instalda. A maioria dos sistemas vem com uma fonte de emoji instalada como padrão, mas alguns não (principalmente o Arch Linux). Você pode instalar uma em seu sistema, através do gerenciador de pacotes-[noto emoji](https://www.google.com/get/noto/help/emoji/) é uma escolha popular.
|
||||
- Você está usando uma [Nerd Font](https://www.nerdfonts.com/).
|
||||
|
||||
To test your system, run the following commands in a terminal:
|
||||
Para testar seu sistema, execute o comando abaixo em um 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).
|
||||
A primeira linha deve produzir um [emoji de cobra](https://emojipedia.org/snake/), enquanto a segunda linha deve produzir um [um simbolo de bifurcação (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
|
||||
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)
|
||||
Se um dos símbolos acima falhar seu sistema ainda está configurado de forma errada. Infelizmente, obter a configuração de fontes correta as vezes é difícil. Usuários no Discord podem te ajudar. Se os dois símbolos acima exibirem de forma correta, mas você ainda continua sem visualizar no Starship, [registre um erro!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## How do I uninstall Starship?
|
||||
## Como eu desinstalo o Starship?
|
||||
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
O Starship é tão fácil de desinstalar tão como é para instalar.
|
||||
|
||||
1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship.
|
||||
1. Delete the Starship binary.
|
||||
1. Remova qualquer linha da configuração do seu shell (ex: `~/.bashrc`) usada para iniciar o Starship.
|
||||
1. Delete o binário do Starship.
|
||||
|
||||
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
|
||||
Se o Starship foi instalando usando algum gerenciador de pacotes, por favor consulte as documentações do mesmo para instruções de desinstalação.
|
||||
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
Se o Starship foi instalado usando o script de instalação, o comando abaixo irá remover o binário:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
# Localiza e deleta o binario do starship
|
||||
sh -c 'rm "$(which starship)"'
|
||||
```
|
||||
|
@ -147,7 +147,7 @@
|
||||
|
||||
### Primeiros passos
|
||||
|
||||
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
|
||||
**Nota:** Devido ao suporte a diversas plataformas, apenas um subconjunto de plataformas são demonstradas abaixo. Não achou a sua? Dê uma olhada nas [instruções extras das plataformas](https://starship.rs/installing/).
|
||||
|
||||
1. Instale o binário do **starship**:
|
||||
|
||||
@ -160,7 +160,14 @@
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
Para atualizar o Starship de maneira manual, execute novamente o script acima. Isto irá substituir a versão atual sem alterar as configurações do Starship.
|
||||
|
||||
|
||||
**Nota** - Os padrões de instalação do script podem ser alteradas e substituídas, consulte a ajuda de built-in.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### Instalar via gerenciador de pacotes
|
||||
@ -217,7 +224,7 @@
|
||||
|
||||
#### 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.
|
||||
Adicione o comando a seguir ao final do arquivo `Microsoft.PowerShell_profile.ps1`. Você pode checar a localização deste arquivo consultando a variável `$PROFILE` no PowerShell. Normalmente o caminho é `~\Documentos\PowerShell\Microsoft.PowerShell_profile.ps1` ou `~/.config/powershell/Microsoft.PowerShell_profile.ps1` no -Nix.
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
@ -237,7 +244,7 @@
|
||||
|
||||
#### Elvish
|
||||
|
||||
**Warning** Only elvish v0.15 or higher is supported. Add the following to the end of `~/.elvish/rc.elv`:
|
||||
**Atenção** Apenas a versão v0.15 ou superior do elvish é suportada. Adicione o comando a seguir ao final do arquivo `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
@ -248,7 +255,7 @@
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
Adicione ao final do arquivo `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
@ -260,7 +267,7 @@
|
||||
|
||||
Nós estamos sempre procurando contribuidores de **todos os níveis de conhecimento**! Se você está buscando um caminho mais fácil para começar no projeto, veja essas [boas issues para começar](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/).
|
||||
Se você é fluente em uma linguá não inglesa, nos ficaríamos gratos por qualquer ajuda em manter nossas documentações traduzidas e atualizadas em outras linguás. Se você deseja ajudar nas traduções, você pode contribuir no [Crowdin do Starship](https://translate.starship.rs/).
|
||||
|
||||
Se você está interessado em ajudar contribuindo com o projeto, dê uma olhada no nosso [Guia de Contribuição](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Além disso, sinta-se à vontade para entrar no nosso [servidor no Discord](https://discord.gg/8Jzqu3T) e dizer oi. 👋
|
||||
|
||||
|
@ -1,21 +1,21 @@
|
||||
# 🚀 Advanced Installation
|
||||
# 🚀 Instalação Avançada
|
||||
|
||||
To install starship, you need to do two things:
|
||||
Para instalar o Starship, você precisa de duas coisas:
|
||||
|
||||
1. Get the **starship** binary onto your computer
|
||||
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
|
||||
1. O binário do **Starship** em seu computador
|
||||
1. Altere seu shell para usar o binário do starship como seu prompt alterando os scripts init
|
||||
|
||||
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
Para a maioria dos usuários as instruções na [pagina principal](/guide/#🚀-installation) irá funcionar perfeitamente. No entanto para algumas plataformas mais especificas, instruções diferentes são necessárias.
|
||||
|
||||
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!
|
||||
Existem tantas plataformas que elas não cabem no arquivo README.md principal, então aqui estão algumas instruções de instalação para outras plataformas da comunidade. A sua não está aqui? Por favor, adicione-o aqui se você descobrir!
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Pré-requisitos
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
Vá para a [pagina de instalação do Chocolatey](https://chocolatey.org/install) e siga as instruções para instalar o Chocolatey.
|
||||
|
||||
### Installation
|
||||
### Instalação
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
@ -29,7 +29,7 @@ choco install starship
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### Installation
|
||||
### Instalação
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
@ -37,17 +37,17 @@ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir /data/data/com
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
### Obtendo o Binário
|
||||
|
||||
#### Imperatively
|
||||
#### Imperativamente
|
||||
|
||||
```sh
|
||||
nix-env -iA nixos.starship
|
||||
```
|
||||
|
||||
#### Declarative, single user, via [home-manager](https://github.com/nix-community/home-manager)
|
||||
#### Declarativo, usuário único, via [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
Ative o modulo `programs.starship` em seu arquivo `home.nix`, e adicione suas configurações
|
||||
|
||||
```nix
|
||||
{
|
||||
@ -69,15 +69,15 @@ Enable the `programs.starship` module in your `home.nix` file, and add your sett
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
então execute
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
#### Declarativo, em todo o sistema com NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
Adicione `pkgs.starship` em `environment.systemPackages` no arquivo `configuration.nix`, então execute
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
|
@ -1,16 +1,16 @@
|
||||
# Migrating to v0.45.0
|
||||
# Migrando para V0.45.0
|
||||
|
||||
Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization.
|
||||
Starship v0.45.0 é o lançamento com grandes mudanças, em preparação para a grande versão v1.0.0. Nos fizemos algumas grandes mudanças em como é feita as configurações do prompt. para aceitar uma customização maior.
|
||||
|
||||
This guide is intended to walk you through the breaking changes.
|
||||
Este guia tem a intenção de conduzi-lo através das grandes mudanças.
|
||||
|
||||
## `prompt_order` has been replaced by a root-level `format`
|
||||
## `prompt_order` foi substituido por um formato padrão `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.
|
||||
Antes da v0.45.0, `prompt_order` aceitaria um array de módulos com a ordem em que seriam renderizados pelo Starship.
|
||||
|
||||
Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves.
|
||||
Starship v0.45.0 aceita um valor `format`, permitindo uma customização do prompt fora dos módulos.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
**Exemplo de configuração pre-v0.45.0**
|
||||
|
||||
```toml
|
||||
prompt_order = [
|
||||
@ -31,7 +31,7 @@ prompt_order = [
|
||||
]
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
**Exemplo de configuração v0.45.0**
|
||||
|
||||
```toml
|
||||
format = """\
|
||||
@ -52,20 +52,20 @@ format = """\
|
||||
"""
|
||||
```
|
||||
|
||||
## Module `prefix` and `suffix` have been replaced by `format`
|
||||
## Modulo `prefix` e `suffix` foram substituídos por `format`
|
||||
|
||||
Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered.
|
||||
Antes da v0.45.0, alguns módulos aceitavam `prefix` e/ou `suffix` com o objetivo de estilizar a forma que o modulo seria renderizado.
|
||||
|
||||
Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output.
|
||||
Starship v0.45.0 aceita um valor `format`, que permite customizar como o modulo será renderizado. Em vez de definir um sufix e um prefix como variáveis de contexto, agora elas são substituídas por uma string que será a representação de como será a renderização do módulo.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
**Exemplo de configuração pre-v0.45.0**
|
||||
|
||||
```toml
|
||||
[cmd_duration]
|
||||
prefix = "took "
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
**Exemplo de configuração v0.45.0**
|
||||
|
||||
```toml
|
||||
[cmd_duration]
|
||||
@ -74,18 +74,18 @@ prefix = "took "
|
||||
format = "took [$duration]($style) "
|
||||
```
|
||||
|
||||
### Affected Modules
|
||||
### Módulos Afetados
|
||||
|
||||
#### Caractere
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| Propriedades Removidas | Substituição |
|
||||
| ----------------------- | ---------------- |
|
||||
| `symbol` | `success_symbol` |
|
||||
| `use_symbol_for_status` | `error_symbol` |
|
||||
| `style_success` | `success_symbol` |
|
||||
| `style_failure` | `error_symbol` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Alterações na Configuração Padrão**
|
||||
|
||||
```diff
|
||||
[character]
|
||||
@ -98,26 +98,26 @@ format = "took [$duration]($style) "
|
||||
++ vicmd_symbol = "[❮](bold green)"
|
||||
```
|
||||
|
||||
Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code.
|
||||
Anteriormente, a propriedade `use_symbol_for_status` era usada para configurar o prompt para exibir o `error_symbol` quando o ultimo comando resultou em um status diferente de zero.
|
||||
|
||||
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.
|
||||
Com a versão v0.45.0, nós agora sempre usamos `error_symbol` após status diferentes de zero, unificando as propriedades `use_symbol_for_status` e `error_symbol`.
|
||||
|
||||
To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file:
|
||||
Para configurar o prompt para usar a configuração antiga `use_symbol_for_status = true`, adicione o seguinte em seu arquivo de configuração:
|
||||
|
||||
```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.
|
||||
*Nota:* O elemento `charactere` adiciona automaticamente um espaço depois do mesmo, portanto ao contrario strings `format`, nós não adicionamos o espaço nos exemplos acima.
|
||||
|
||||
#### Tempo de execução do comando
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| Propriedades Removidas | Substituição |
|
||||
| ---------------------- | ------------ |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Alterações na Configuração Padrão**
|
||||
|
||||
```diff
|
||||
[cmd_duration]
|
||||
@ -127,11 +127,11 @@ error_symbol = "[✖](bold red)"
|
||||
|
||||
#### Diretório
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| Propriedades Removidas | Substituição |
|
||||
| ---------------------- | ------------ |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Alterações na Configuração Padrão**
|
||||
|
||||
```diff
|
||||
[directory]
|
||||
@ -139,14 +139,14 @@ error_symbol = "[✖](bold red)"
|
||||
++ format = "[$path]($style)[$read_only]($read_only_style) "
|
||||
```
|
||||
|
||||
#### Environment Variable
|
||||
#### Variáveis de Ambiente
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Propriedades Removidas | Substituição |
|
||||
| ---------------------- | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Alterações na Configuração Padrão**
|
||||
|
||||
```diff
|
||||
[env_var]
|
||||
@ -157,12 +157,12 @@ error_symbol = "[✖](bold red)"
|
||||
|
||||
#### Git commit
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Propriedades Removidas | Substituição |
|
||||
| ---------------------- | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Alterações na Configuração Padrão**
|
||||
|
||||
```diff
|
||||
[git_commit]
|
||||
@ -173,13 +173,13 @@ error_symbol = "[✖](bold red)"
|
||||
|
||||
#### Git Status
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ----------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| `show_sync_count` | `format` |
|
||||
| Propriedades Removidas | Substituição |
|
||||
| ---------------------- | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| `show_sync_count` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Alterações na Configuração Padrão**
|
||||
|
||||
```diff
|
||||
[git_status]
|
||||
@ -189,11 +189,11 @@ error_symbol = "[✖](bold red)"
|
||||
++ 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.
|
||||
Anteriormente, a propriedade `show_sync_count` era usada para configurar o prompt para exibir o numero de commits que o branch estava a frente ou atrás do branch remoto.
|
||||
|
||||
With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`.
|
||||
Com a versão v0.45.0, isto foi substituído em propriedades separadas, `ahead`, `behind`, e `diverged`.
|
||||
|
||||
To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file:
|
||||
Para configurar o prompt para utilizar a configuração antiga, altere a seguinte propriedade no seu arquivo de configuração: `show_sync_count = true`:
|
||||
|
||||
```toml
|
||||
[git_status]
|
||||
@ -204,12 +204,12 @@ behind = "⇣${count}"
|
||||
|
||||
#### Hostname
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Propriedades Removidas | Substituição |
|
||||
| ---------------------- | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Alterações na Configuração Padrão**
|
||||
|
||||
```diff
|
||||
[hostname]
|
||||
@ -218,15 +218,15 @@ behind = "⇣${count}"
|
||||
++ format = "[$hostname]($style) in "
|
||||
```
|
||||
|
||||
#### Singularity
|
||||
#### Singularidade
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `label` | `format` |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Propriedades Removidas | Substituição |
|
||||
| ---------------------- | ------------ |
|
||||
| `label` | `format` |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Alterações na Configuração Padrão**
|
||||
|
||||
```diff
|
||||
[singularity]
|
||||
@ -235,13 +235,13 @@ behind = "⇣${count}"
|
||||
++ format = '[$symbol\[$env\]]($style) '
|
||||
```
|
||||
|
||||
#### Time
|
||||
#### Horário
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ------------- |
|
||||
| `format` | `time_format` |
|
||||
| Propriedades Removidas | Substituição |
|
||||
| ---------------------- | ------------- |
|
||||
| `format` | `time_format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Alterações na Configuração Padrão**
|
||||
|
||||
```diff
|
||||
[time]
|
||||
@ -250,14 +250,14 @@ behind = "⇣${count}"
|
||||
++ format = "at 🕙[$time]($style) "
|
||||
```
|
||||
|
||||
#### Custom Commands
|
||||
#### Comandos Personalizados
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Remover Propriedade | Substituição |
|
||||
| ------------------- | ------------ |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
**Alterações na configuração padrão**
|
||||
|
||||
```diff
|
||||
[custom.example]
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Aqui tem uma coleção de predefinições de configuração criadas pela comunidade de Starship. Se você tem uma predefinição para compartilhar, por favor, [envie uma PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) atualizando este arquivo! 😊
|
||||
|
||||
## Nerd Font Symbols
|
||||
## Símbolos Nerd Font
|
||||
|
||||
Essa predefinição não altera nada exceto os símbolos usados para cada módulo. Se você não gosta de emojis, isso pode chamar sua atenção!
|
||||
|
||||
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Seguimentos entre colchetes
|
||||
|
||||
Está configuração altera o formato de todos os módulos integrados para que usem colchetes ao mostrar o seguimento ao invés de usar texto padrão do Starship ("via", "on", etc.).
|
||||
|
||||
Antes:
|
||||
|
||||
![Captura de tela da configuração padrão do Starship](/presets/bracketed-segments-before.png)
|
||||
|
||||
Depois:
|
||||
|
||||
![Captura de tela de segmentos predefinidos](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Configuração
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Símbolos de texto simples
|
||||
|
||||
Esta predefinição altera os símbolos em texto simples. Se seu terminal/fonte não consegue renderizar os NerdFonts/emojis, talvez você pode tentar esta predefinição!
|
||||
|
||||
Antes( configuração padrão com fonte ajustada):
|
||||
|
||||
![Captura de tela do padrão da configuração Starship com fonte Fixedsys ](/presets/plain-text-symbols-before.png)
|
||||
|
||||
Após(Símbolos de Textos Simples):
|
||||
|
||||
![Captura de tela da predefinição de símbolos de texto simples](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Configuração
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -389,7 +389,17 @@ The character will tell you whether the last command was successful or not. It c
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
::: warning
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -780,7 +790,6 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -799,7 +808,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. |
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | The style for the module. |
|
||||
@ -2165,6 +2174,59 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### 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 R. |
|
||||
| `style` | `"blue bold"` | The style for the module. |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | ------------- | ------------------------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style | `"blue bold"` | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -163,6 +163,13 @@
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### Install via Package Manager
|
||||
|
||||
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Configuration
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -44,7 +44,7 @@ description: Starship - минимальная, быстрая и бесконе
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
Для обновления Starship перезапустите этот скрипт. Он заменит текущую версию без изменения конфигурации.
|
||||
|
||||
|
||||
#### Установить через менеджер пакетов
|
||||
@ -120,7 +120,7 @@ description: Starship - минимальная, быстрая и бесконе
|
||||
|
||||
::: warning Only elvish v0.15 or higher is supported. :::
|
||||
|
||||
Add the following to the end of `~/.elvish/rc.elv`:
|
||||
Добавьте следующую строку в конец `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
@ -131,7 +131,7 @@ description: Starship - минимальная, быстрая и бесконе
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
Добавьте следующее в конец `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
@ -256,7 +256,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
|
||||
| `region_aliases` | | Таблица региона псевдонимов, отображаемая вместе с именем AWS. |
|
||||
| `style` | `"bold yellow"` | Стиль модуля. |
|
||||
| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| `disabled` | `false` | Отключение модуля `AWS`. |
|
||||
|
||||
### Переменные
|
||||
|
||||
@ -389,7 +389,17 @@ discharging_symbol = 💦
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
::: warning
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### Опции
|
||||
|
||||
@ -472,7 +482,7 @@ The `cmake` module shows the currently installed version of [CMake](https://cmak
|
||||
|
||||
Модуль `cmd_duration` показывает время исполнения последней команды. Модуль будет показан только, если команда заняла более двух секунд, или если задан параметр `min_time`.
|
||||
|
||||
::: warning Не подключайте ловушку DEBUG к Bash
|
||||
::: предупреждение Не подключайте ловушку DEBUG к Bash
|
||||
|
||||
Если вы испоьзуете Starship в `bash`, не подключайте ловушку `DEBUG` после запуска `eval $(starship init $0)`, иначе этот модуль сломается.
|
||||
|
||||
@ -780,7 +790,6 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -799,7 +808,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | Символ перед отображением текущей версии dotnet. |
|
||||
| `heuristic` | `true` | Использовать быстрое определение версии, для сохранения скорости. |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | Стиль модуля. |
|
||||
@ -1329,7 +1338,7 @@ format = "via [⎈ $version](bold white) "
|
||||
|
||||
## Имя хоста
|
||||
|
||||
Модуль `hostname` отображает имя системы (хоста).
|
||||
Модуль `hostname` отображает имя системного хоста.
|
||||
|
||||
### Опции
|
||||
|
||||
@ -1403,7 +1412,7 @@ symbol = "🌟 "
|
||||
|
||||
## Задачи
|
||||
|
||||
Модуль `jobs` отображает текущее количество запущенных работ. Модуль будет показан только если работы выполняются в фоне. Модуль покажет количество запущенных задач при наличии более чем 1 задачи, или больше, чем значение конфигурации `threshold`, если оно существует. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
Модуль `jobs` отображает текущее количество запущенных задач. Модуль будет показан только если выполняются фоновые задачи. Модуль покажет количество запущенных задач при наличии более чем 1 задачи, или больше, чем значение конфигурации `threshold`, если оно существует. If `threshold` is set to 0, then the module will also show when there are 0 jobs running.
|
||||
|
||||
::: warning
|
||||
|
||||
@ -2165,6 +2174,59 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### Опции
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `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 R. |
|
||||
| `style` | `"blue bold"` | Стиль модуля. |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Переменные
|
||||
|
||||
| Переменная | Пример | Описание |
|
||||
| ---------- | ------------- | ------------------------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style | `"blue bold"` | Отражает значение параметра `style` |
|
||||
|
||||
### Пример
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
@ -2636,7 +2698,7 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## Имя пользователя
|
||||
|
||||
Модуль `username` показывает имя текущего пользователя. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
Модуль `username` показывает имя активного пользователя. Модуль будет показан, если любое из следующих условий соблюдено:
|
||||
|
||||
- Текущий пользователь - root
|
||||
- Текущий пользователь отличается от залогиненного
|
||||
@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### Опции
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | Стиль модуля. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | Формат модуля. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `описание` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | Стиль модуля. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | Формат модуля. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Переменные
|
||||
|
||||
|
@ -160,13 +160,20 @@
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
Для обновления Starship перезапустите этот скрипт. Он заменит текущую версию без изменения конфигурации.
|
||||
|
||||
|
||||
**Примечание** - Значения по умолчанию из установочного скрипта могут быть переопределены. Для уточнения смотрите встроенную справку.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### Установить через менеджер пакетов
|
||||
|
||||
|
||||
##### Example: [Homebrew](https://brew.sh/):
|
||||
##### [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
@ -237,7 +244,7 @@
|
||||
|
||||
#### Elvish
|
||||
|
||||
**Warning** Only elvish v0.15 or higher is supported. Add the following to the end of `~/.elvish/rc.elv`:
|
||||
**Внимание** Поддерживается только elvish v0.15 или выше. Добавьте следующую строку в конец `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
@ -248,7 +255,7 @@
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
Добавьте следующее в конец `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Конфигурация
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Конфигурация
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -389,7 +389,17 @@ The character will tell you whether the last command was successful or not. It c
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
::: uyarı
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: uyarı
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
@ -780,7 +790,6 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -799,7 +808,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | The symbol used before displaying the version of dotnet. |
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | The style for the module. |
|
||||
@ -2165,6 +2174,59 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### 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 R. |
|
||||
| `style` | `"blue bold"` | The style for the module. |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | ------------- | ------------------------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style | `"blue bold"` | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
|
||||
@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -163,6 +163,13 @@
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### Install via Package Manager
|
||||
|
||||
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Yapılandırma
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Yapılandırma
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -256,7 +256,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
|
||||
| `region_aliases` | | Bảng của các region alias để hiển thị ngoài tên AWS. |
|
||||
| `style` | `"bold yellow"` | Kiểu cho module. |
|
||||
| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| `disabled` | `false` | Vô hiệu `AWS` module. |
|
||||
|
||||
### Các biến
|
||||
|
||||
@ -389,7 +389,17 @@ Kí tự sẽ nói cho bạn câu lệnh cuối liệu thành công hay thất b
|
||||
|
||||
Mặc định, nó chỉ thay đổi màu. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` không được hỗ trợ trên elvish shell. :::
|
||||
::: cảnh báo
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: cảnh báo
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### Các tuỳ chọn
|
||||
|
||||
@ -780,7 +790,6 @@ Mặc định, mô đun này sẽ chỉ được hiển thị trong dấu nhắc
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -799,7 +808,7 @@ Mô đun cũng sẽ hiện Target Framework Moniker (<https://docs.microsoft.com
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | Biểu tượng sử dụng để hiển thị trước phiên bản của dotnet. |
|
||||
| `heuristic` | `true` | Sử dụng phiên bản phát hiện thông minh hơn. |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | 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. |
|
||||
@ -2165,6 +2174,59 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### 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 R. |
|
||||
| `style` | `"blue bold"` | Kiểu cho module. |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Những tiện ích mở rộng nào sẽ kích hoạt mô-đun này |
|
||||
| `detect_files` | `[".Rprofile"]` | Tên tệp nào sẽ kích hoạt mô-đun này |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Thư mục nào sẽ kích hoạt mô-đun này |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Các biến
|
||||
|
||||
| Biến | Ví dụ | Mô tả |
|
||||
| ------- | ------------- | -------------------------------- |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Giá trị ghi đè tuỳ chọn `symbol` |
|
||||
| style | `"blue bold"` | Giá trị ghi đè của `style` |
|
||||
|
||||
### Ví dụ
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). Module cho sẽ được hiện nếu bất kì điều kiện nào dưới đây thoả mãn:
|
||||
@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: thử thuật
|
||||
|
||||
@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### Các tuỳ chọn
|
||||
|
||||
| Tuỳ chọn | Mặc định | Mô tả |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | Kiểu cho module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | Định dạng cho module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Tuỳ chọn | Mặc định | Mô tả |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `mô tả` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | Kiểu cho module. |
|
||||
| `format` | `"[$symbol($output )]($style)"` | Định dạng cho module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Các biến
|
||||
|
||||
|
@ -143,7 +143,7 @@
|
||||
|
||||
### Yêu cầu
|
||||
|
||||
- Đã cài đặt m [Nerd Font](https://www.nerdfonts.com/) và đã kích hoạt trong giao diện dòng lệnh của bạn (ví dụ, thử [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
|
||||
- Đã cài đặt [Nerd Font](https://www.nerdfonts.com/) và đã kích hoạt trong giao diện dòng lệnh của bạn (ví dụ, thử [Fira Code Nerd Font](https://www.nerdfonts.com/font-downloads)).
|
||||
|
||||
### Bắt đầu
|
||||
|
||||
@ -163,6 +163,13 @@
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### Cài đặt thông qua Trình quản lí gói
|
||||
|
||||
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### Cấu hình
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### Cấu hình
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -256,7 +256,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
|
||||
| `region_aliases` | | 地区缩写列表,用来显示在 AWS 主机名之后。 |
|
||||
| `style` | `"bold yellow"` | 此组件的样式。 |
|
||||
| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| `disabled` | `false` | 禁用 `AWS` 组件。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -389,7 +389,17 @@ discharging_symbol = 💦
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
::: warning
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### 配置项
|
||||
|
||||
@ -780,7 +790,6 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -799,7 +808,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | 这个字段的内容会显示在当前 .NET 版本之前。 |
|
||||
| `heuristic` | `true` | 使用更快的版本探测机制以保证 starship 的运行速度。 |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | 此组件的样式。 |
|
||||
@ -2165,9 +2174,62 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### 配置项
|
||||
|
||||
| Option | 默认值 | 描述 |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `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 R. |
|
||||
| `style` | `"blue bold"` | 此组件的样式。 |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| 字段 | 示例 | 描述 |
|
||||
| ------- | ------------- | ------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | `symbol`对应值 |
|
||||
| style | `"blue bold"` | `style`对应值 |
|
||||
|
||||
### 示例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 此组件将在符合以下任意条件之一时显示:
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 此组件只有满足以下条件之一时才会被显示:
|
||||
|
||||
- The current directory contains a file with `.red` or `.reds` extension
|
||||
|
||||
@ -2205,7 +2267,7 @@ symbol = "🔴 "
|
||||
|
||||
## Ruby
|
||||
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 此组件将在符合以下任意条件之一时显示:
|
||||
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 此组件只有满足以下条件之一时才会被显示:
|
||||
|
||||
- 当前目录包含 `Gemfile` 文件
|
||||
- The current directory contains a `.ruby-version` file
|
||||
@ -2245,7 +2307,7 @@ symbol = "🔺 "
|
||||
|
||||
## Rust
|
||||
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 此组件将在符合以下任意条件之一时显示:
|
||||
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 此组件只有满足以下条件之一时才会被显示:
|
||||
|
||||
- 当前目录包含 `Cargo.toml` 文件
|
||||
- 当前目录包含一个使用 `.rs` 扩展名的文件
|
||||
@ -2492,7 +2554,7 @@ disabled = false
|
||||
|
||||
## Swift
|
||||
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 此组件将在符合以下任意条件之一时显示:
|
||||
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 此组件只有满足以下条件之一时才会被显示:
|
||||
|
||||
- The current directory contains a `Package.swift` file
|
||||
- The current directory contains a file with the `.swift` extension
|
||||
@ -2636,7 +2698,7 @@ time_range = "10:00:00-14:00:00"
|
||||
|
||||
## Username
|
||||
|
||||
`username` 组件显示当前活跃的用户名。 此组件将在符合以下任意条件之一时显示:
|
||||
`username` 组件显示当前活跃的用户名。 此组件只有满足以下条件之一时才会被显示:
|
||||
|
||||
- 当前用户是 root
|
||||
- 当前用户与登录用户不相同
|
||||
@ -2785,7 +2847,7 @@ format = "[🆅 $repo](bold blue) "
|
||||
|
||||
## Zig
|
||||
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 此组件将在符合以下任意条件之一时显示:
|
||||
By default the the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 此组件只有满足以下条件之一时才会被显示:
|
||||
|
||||
- The current directory contains a `.zig` file
|
||||
|
||||
@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### 配置项
|
||||
|
||||
| Option | 默认值 | 描述 |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | 此组件的样式。 |
|
||||
| `format` | `"[$symbol($output )]($style)"` | 组件格式化模板。 |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Option | 默认值 | 描述 |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `描述` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | 此组件的样式。 |
|
||||
| `format` | `"[$symbol($output )]($style)"` | 组件格式化模板。 |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -163,6 +163,13 @@
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### 通过软件包管理器安装
|
||||
|
||||
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### 配置
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### 配置
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
@ -44,7 +44,7 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
如果想更新已安裝的 Starship,請重新執行上述指令。 指令只會更新 Starship 執行檔本身,不會影響到任何已撰寫的設定檔。
|
||||
|
||||
|
||||
#### 使用套件管理器安裝:
|
||||
|
@ -49,9 +49,9 @@ $ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
|
||||
|
||||
### 術語
|
||||
|
||||
**模組 (Module)**: 提示字元中的一個元件,基於你的作業系統提供的背景資訊來提供訊息。 For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project.
|
||||
**模組 (Module)**: 提示字元中的一個元件,基於你的作業系統提供的背景資訊來提供訊息。 舉例來說,如果你現在的資料夾是一個 Node.js 專案,"nodejs" 模組會顯示出現在安裝在你的電腦上的 Node.js 版本。
|
||||
|
||||
**Variable**: Smaller sub-components that contain information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of Node.js.
|
||||
變數 (**Variable**):模組的子元件,主要是由模組提供的訊息。 舉例來說,在 "nodejs" 模組中提供的 "version" 變數代表著當下使用的 Node.js 版本。
|
||||
|
||||
By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix.
|
||||
|
||||
@ -256,7 +256,7 @@ When using [AWSume](https://awsu.me) the profile is read from the `AWSUME_PROFIL
|
||||
| `region_aliases` | | 除了AWS名稱外,顯示區域別名表 |
|
||||
| `style` | `"bold yellow"` | 這個模組的風格。 |
|
||||
| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| `disabled` | `false` | 停用 `AWS` 模組。 |
|
||||
|
||||
### Variables
|
||||
|
||||
@ -389,7 +389,17 @@ discharging_symbol = 💦
|
||||
|
||||
By default it only changes color. If you also want to change its shape take a look at [this example](#with-custom-error-shape).
|
||||
|
||||
::: warning `error_symbol` is not supported on elvish shell. :::
|
||||
::: warning
|
||||
|
||||
`error_symbol` is not supported on elvish shell.
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
`vicmd_symbol` is only supported in fish and zsh.
|
||||
|
||||
:::
|
||||
|
||||
### 選項
|
||||
|
||||
@ -780,7 +790,6 @@ By default this module will only be shown in your prompt when one or more of the
|
||||
- `Directory.Build.props`
|
||||
- `Directory.Build.targets`
|
||||
- `Packages.props`
|
||||
- `*.sln`
|
||||
- `*.csproj`
|
||||
- `*.fsproj`
|
||||
- `*.xproj`
|
||||
@ -799,7 +808,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `".NET "` | 在顯示 dotnet 版本之前用的符號。 |
|
||||
| `heuristic` | `true` | 使用更快速的版本偵測法來保持 starship 的速度。 |
|
||||
| `detect_extensions` | `["sln", "csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["csproj", "fsproj", "xproj"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["global.json", "project.json", "Directory.Build.props", "Directory.Build.targets", "Packages.props"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `style` | `"bold blue"` | 這個模組的風格。 |
|
||||
@ -2165,6 +2174,59 @@ python_binary = "python3"
|
||||
detect_extensions = []
|
||||
```
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[python]
|
||||
# Display the version of python from inside a local venv.
|
||||
#
|
||||
# Note this will only work when the venv is inside the project and it will only
|
||||
# work in the directory that contains the venv dir but maybe this is ok?
|
||||
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||
```
|
||||
|
||||
## R
|
||||
|
||||
The `rlang` module shows the currently installed version of R. The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.R` extension.
|
||||
- The current directory contains a file with the `.Rd` extension.
|
||||
- The current directory contains a file with the `.Rmd` extension.
|
||||
- The current directory contains a file with the `.Rproj` extension.
|
||||
- The current directory contains a file with the `.Rsx` extension.
|
||||
- The current directory contains a `.Rprofile` file
|
||||
- The current directory contains a `.Rproj.user` folder
|
||||
|
||||
### 選項
|
||||
|
||||
| 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 R. |
|
||||
| `style` | `"blue bold"` | 這個模組的風格。 |
|
||||
| `detect_extensions` | `["R", "Rd", "Rmd", "Rproj", "Rsx"]` | Which extensions should trigger this module |
|
||||
| `detect_files` | `[".Rprofile"]` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[".Rproj.user"]` | Which folders should trigger this module |
|
||||
| `disabled` | `false` | Disables the `r` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| 變數 | 範例 | 說明 |
|
||||
| ------- | ------------- | ------------------------------------ |
|
||||
| version | `v4.0.5` | The version of `R` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style | `"blue bold"` | Mirrors the value of option `style` |
|
||||
|
||||
### 範例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[rlang]
|
||||
format = "with [📐 $version](blue bold) "
|
||||
```
|
||||
|
||||
## Red
|
||||
|
||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 這個模組在下列其中一個條件達成時顯示:
|
||||
@ -2831,6 +2893,7 @@ These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
- The current Operating System (std::env::consts::OS) matchs with `os` field if defined.
|
||||
|
||||
::: tip
|
||||
|
||||
@ -2852,19 +2915,20 @@ The order in which custom modules are shown can be individually set by including
|
||||
|
||||
### 選項
|
||||
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `description` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | 這個模組的風格。 |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| Option | 預設 | 說明 |
|
||||
| ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. The command will be passed on stdin to the shell. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | [See below](#custom-command-shell) |
|
||||
| `說明` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | 這個模組的風格。 |
|
||||
| `format` | `"[$symbol($output )]($style)"` | The format for the module. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
| `os` | | Operating System name on which the module will be shown (unix, linux, macos, windows, ... ) [See possible values](https://doc.rust-lang.org/std/env/consts/constant.OS.html). |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -1,31 +1,31 @@
|
||||
# FAQ
|
||||
# 常見問答
|
||||
|
||||
## What is the configuration used in the demo GIF?
|
||||
## 主頁示例圖中的效果是使用哪些配置達成的?
|
||||
|
||||
- **Terminal Emulator**: [iTerm2](https://iterm2.com/)
|
||||
- **Theme**: Minimal
|
||||
- **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
|
||||
- **終端模擬器**: [iTerm2](https://iterm2.com/)
|
||||
- **模擬器主題**: Minimal
|
||||
- **配色方案**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **字型**: [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)
|
||||
- **fish 設定**: [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).
|
||||
有關補全或是自動補齊的效果,主要是借助你使用的 Shell 本身提供的服務來達成。 而示例中環境是使用 [Fish Shell](https://fishshell.com/),原生就提供了補全功能。 如果你的環境是使用 Z Shell (zsh),建議參考一下 [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions)。
|
||||
|
||||
## Do top level `format` and `<module>.disabled` do the same thing?
|
||||
|
||||
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:
|
||||
對,他們都可以被用來關閉提示字元中的 module。 如果你單純只是想關閉 modules,推薦使用 `<module>.disabled`,原因如下所述:
|
||||
|
||||
- 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
|
||||
- 明確性:關閉 modules 的動作比在 top level `format` 標記忽略更爲清楚易懂
|
||||
- 當 Starship 更新後,新組件能被自動加入到提示字元中
|
||||
|
||||
## 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.
|
||||
Starship 構建方式基本上確立了他應當能支援所有 shell 的基礎。 Starship 的執行檔是不會紀錄狀態且不假設底下是哪種 Shell 的,所以只要你的 Shell 支援客製化命令提示字元以及 shell expansion,就應該要能使用 Starship。
|
||||
|
||||
Here's a small example getting Starship working with bash:
|
||||
以下是在 bash 上使用 Starship 的簡單例子:
|
||||
|
||||
```sh
|
||||
# Get the status code from the last command executed
|
||||
@ -38,27 +38,27 @@ NUM_JOBS=$(jobs -p | wc -l)
|
||||
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.
|
||||
順帶一提,其中 Starship [針對 Bash shell 的實作](https://github.com/starship/starship/blob/master/src/init/starship.bash) 稍微複雜一點,實踐了一些如 [Command Duration module](https://starship.rs/config/#command-duration) 的進階功能,也實踐了確保 Starship 設定能夠與系統上的 Bash 相兼容的功能。
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
使用以下指令來獲得 `starship prompt` 支援的所有參數。
|
||||
|
||||
```sh
|
||||
starship prompt --help
|
||||
```
|
||||
|
||||
The prompt will use as much context as is provided, but no flags are "required".
|
||||
Starship prompt 會盡可能的使用被提供的上下文參數,但使用者也不一定要提供任何參數。
|
||||
|
||||
## How do I run Starship on Linux distributions with older versions of glibc?
|
||||
## 我要如何在一些配有更舊版本 glibc 的 Linux 發行版上執行 Starship?
|
||||
|
||||
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`:
|
||||
如果在你使用的環境 (比如:CentOS 6 或 7) 下使用預編好的 Starship 執行檔時會產生一些像 "_version 'GLIBC_2.18' not found (required by starship)_" 的內容,你可以在執行安裝指令時嘗試選用不同的函式庫預先編譯而成的 Starship 版本,比如說 `musl` 而非 `glibc`,如下所示:
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
## 我發現一些看不懂或意料外的符號,那是代表什麼意思?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
如果你看見了一些不認得的符號,你可以使用 `starship explain` 來列出當下顯示出的 modules 的解釋。
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
@ -79,16 +79,16 @@ The first line should produce a [snake emoji](https://emojipedia.org/snake/), wh
|
||||
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## How do I uninstall Starship?
|
||||
## 我要如何從電腦中移除 Starship?
|
||||
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
移除 Starship 的過程與安裝過程一樣簡單。
|
||||
|
||||
1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship.
|
||||
1. Delete the Starship binary.
|
||||
1. 刪除 Shell 的設定檔案 (比如 `~/.bashrc`) 中用來初始化 Starship 的部分。
|
||||
1. 刪除 Starship 的執行檔
|
||||
|
||||
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
|
||||
如果你是透過套件管理器安裝 Starship 的,請到套件管理器的文件中尋找相關的移除步驟指示。
|
||||
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
如果你是透過安裝腳本來安裝 Starship 的,可以執行以下的命令來移除執行檔。
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
|
@ -160,7 +160,14 @@
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||
```
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
如果想更新已安裝的 Starship,請重新執行上述指令。 指令只會更新 Starship 執行檔本身,不會影響到任何已撰寫的設定檔。
|
||||
|
||||
|
||||
**Note** - The defaults of the install script can be overridden see the built-in help.
|
||||
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --help
|
||||
```
|
||||
|
||||
|
||||
#### 使用套件管理器安裝:
|
||||
@ -237,7 +244,7 @@
|
||||
|
||||
#### Elvish
|
||||
|
||||
**Warning** Only elvish v0.15 or higher is supported. 將以下內容放到 `~/.elvish/rc.elv` 的結尾:
|
||||
**注意** 只支援 elvish v0.15 以上的版本。 將以下內容放到 `~/.elvish/rc.elv` 的結尾:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
@ -264,22 +271,22 @@ If you are fluent in a non-English language, we greatly appreciate any help keep
|
||||
|
||||
如果你對貢獻 Starship 有興趣,請看我們的 [貢獻指南](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) 。 另外,請不用客氣加入我們的 [Discord 伺服器](https://discord.gg/8Jzqu3T) 並來問候一下。 👋
|
||||
|
||||
### Code Contributors
|
||||
### 專案貢獻者
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)].
|
||||
This project exists thanks to all the people who contribute. [[我要貢獻](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)]
|
||||
<a href="https://github.com/starship/starship/graphs/contributors"><img src="https://opencollective.com/starship/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
### Financial Contributors
|
||||
### 專案資助者
|
||||
|
||||
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
成為專案資助者,推動社群永續經營 [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
|
||||
#### Individuals
|
||||
#### 個人
|
||||
|
||||
<a href="https://opencollective.com/starship"><img src="https://opencollective.com/starship/individuals.svg?width=890"></a>
|
||||
|
||||
#### Organizations
|
||||
#### 組織
|
||||
|
||||
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
以組織名義資助專案 這裏會產生一個能連向您組織網站的連結標誌。 [[Contribute](https://opencollective.com/starship/contribute)]
|
||||
|
||||
<a href="https://opencollective.com/starship/organization/0/website"><img src="https://opencollective.com/starship/organization/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/starship/organization/1/website"><img src="https://opencollective.com/starship/organization/1/avatar.svg"></a>
|
||||
|
@ -81,6 +81,284 @@ symbol = " "
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[shlvl]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = "ﯣ "
|
||||
```
|
||||
|
||||
## Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
Before:
|
||||
|
||||
![Screenshot of default Starship configuration](/presets/bracketed-segments-before.png)
|
||||
|
||||
After:
|
||||
|
||||
![Screenshot of Bracketed Segments preset](/presets/bracketed-segments-after.png)
|
||||
|
||||
### 設定
|
||||
|
||||
```toml
|
||||
[aws]
|
||||
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
|
||||
|
||||
[cmake]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[⏱ $duration]($style)"
|
||||
|
||||
[conda]
|
||||
format = '\[[$symbol$environment]($style)\]'
|
||||
|
||||
[crystal]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[dart]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[deno]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[docker_context]
|
||||
format = '\[[$symbol$context]($style)\]'
|
||||
|
||||
[dotnet]
|
||||
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
|
||||
|
||||
[elixir]
|
||||
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
|
||||
|
||||
[elm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[erlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[gcloud]
|
||||
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
|
||||
|
||||
[git_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[git_status]
|
||||
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||
|
||||
[golang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[helm]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[hg_branch]
|
||||
format = '\[[$symbol$branch]($style)\]'
|
||||
|
||||
[java]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[julia]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kotlin]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[kubernetes]
|
||||
format = '\[[$symbol$context( \($namespace\))]($style)\]'
|
||||
|
||||
[lua]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[memory_usage]
|
||||
format = '\[$symbol[$ram( | $swap)]($style)\]'
|
||||
|
||||
[nim]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[nix_shell]
|
||||
format = '\[[$symbol$state( \($name\))]($style)\]'
|
||||
|
||||
[nodejs]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ocaml]
|
||||
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
|
||||
|
||||
[openstack]
|
||||
format = '\[[$symbol$cloud(\($project\))]($style)\]'
|
||||
|
||||
[package]
|
||||
format = '\[[$symbol$version]($style)\]'
|
||||
|
||||
[perl]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[php]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[purescript]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[python]
|
||||
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
|
||||
|
||||
[red]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[ruby]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[rust]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[terraform]
|
||||
format = '\[[$symbol$workspace]($style)\]'
|
||||
|
||||
[time]
|
||||
format = '\[[$time]($style)\]'
|
||||
|
||||
[username]
|
||||
format = '\[[$user]($style)\]'
|
||||
|
||||
[vagrant]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[vlang]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[zig]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
```
|
||||
|
||||
## Plain Text Symbols
|
||||
|
||||
This preset changes the symbols into plain text. If your terminal/font could not render the NerdFonts/emojis, maybe you could try this preset!
|
||||
|
||||
Before (default setting with Fixedsys font):
|
||||
|
||||
![Screenshot of default Starship configuration with Fixedsys font](/presets/plain-text-symbols-before.png)
|
||||
|
||||
After (Plain Text Symbols):
|
||||
|
||||
![Screenshot of Plain Text Symbols preset](/presets/plain-text-symbols-after.png)
|
||||
|
||||
### 設定
|
||||
|
||||
```toml
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vicmd_symbol = "[<](bold green)"
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
|
||||
[conda]
|
||||
symbol = "conda "
|
||||
|
||||
[crystal]
|
||||
symbol = "cr "
|
||||
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
|
||||
[dart]
|
||||
symbol = "dart "
|
||||
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
|
||||
[dotnet]
|
||||
symbol = ".NET "
|
||||
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
|
||||
[elixir]
|
||||
symbol = "exs "
|
||||
|
||||
[elm]
|
||||
symbol = "elm "
|
||||
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
|
||||
[golang]
|
||||
symbol = "go "
|
||||
|
||||
[hg_branch]
|
||||
symbol = "hg "
|
||||
|
||||
[java]
|
||||
symbol = "java "
|
||||
|
||||
[julia]
|
||||
symbol = "jl "
|
||||
|
||||
[kotlin]
|
||||
symbol = "kt "
|
||||
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
|
||||
[ocaml]
|
||||
symbol = "ml "
|
||||
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
|
||||
[perl]
|
||||
symbol = "pl "
|
||||
|
||||
[php]
|
||||
symbol = "php "
|
||||
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
|
||||
[python]
|
||||
symbol = "py "
|
||||
|
||||
[ruby]
|
||||
symbol = "rb "
|
||||
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user